[vbox-dev] When is "largepages" necessary and what does it do?

Thorsten Schöning tschoening at am-soft.de
Mon May 28 14:39:33 UTC 2018

Hi all,

I'm suffering from heavy performance issues more detailed explained in
the forum[1] already. From what I've tested so far, there's a direct
relationship to the amount of memory assigned to a VM, problem occurs
with 48 GB of RAM, doesn't with 6, and it seems with the setting
"largepages" of VirtualBox itself. Current tests show that with 48 GB
of RAM in the VM and "largepages" enabled, the problem doesn't seem to
occur as well.

That is interesting, because that setting doesn't seem to be enabled
by default, the docs[2] only tell about ~5 % improvement, not that
it's necessary at all for decent performance at some RAM size, and
additionally there are circumstances in which "largepages" is ignored
by VirtualBox[3] altogether.

> 00:00:42.866663 PGMR3PhysAllocateLargePage: allocating large pages
> takes too long (last attempt 103 ms; nr of timeouts 11); DISABLE


So is it possible that "largepages" itself really makes such a
difference in performance after some amount of RAM assigned to a VM?
If so, what's the threshold after which "largepages" is necessary
instead of suggested/nice to have? Shouldn't that be mentioned in the
docs then or that setting even be enabled by default at some amount of

If "largepages" is necessary to get usable performance for some amount
of RAM, why is it allowed to fail while continuing the VM? In my case
the performance problems only occur after some runtime, maybe a few
days, but they do occur at some time. Wouldn't it be better to stop
starting the VM with some error message to give me the chance to make
"largepages" work again by restarting the VM-host or such? That way I
could be somewhat sure that the problem doesn't occur if the VM
started properly.

What does "largepages" do exactly? Is it only allocating some number
of "huge pages" from the OS to reduce the number of pages to deal
with? Is it preferring some "huge pages" size, like 2 MB in a default
linux or 1 GB or doesn't care what "huge" means at all under some OS?
How many of those pages is it allocating when, all needed according
the VM-configuration at startup time or in chunks as needed during
runtime like without "largepages"?

Thanks for your time!

[1]: https://forums.virtualbox.org/viewtopic.php?f=3&t=87904
[2]: https://www.virtualbox.org/manual/ch10.html#nestedpaging
[3]: https://www.virtualbox.org/ticket/16518#comment:2

Mit freundlichen Grüßen,

Thorsten Schöning

Thorsten Schöning       E-Mail: Thorsten.Schoening at AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

More information about the vbox-dev mailing list