poorly handles low memory on host

This is for discussing general topics about how to use VirtualBox.
Post Reply
Hugh2
Posts: 6
Joined: 15. Feb 2012, 06:28

poorly handles low memory on host

Post by Hugh2 »

I get a crash when I configure a guest with a bit too much RAM - say 600MB on a 2GB XP host, with a few other programs running.

The guest starts booting up but at some point crashes with an inscrutable "critical error has occurred" dialog. I have to search through the log file to figure out what happened and it turns out to be

Code: Select all

00:00:24.592 Console: VM runtime error: fatal=false, errorID=HostMemoryLow message="Unable to allocate and lock memory. The virtual machine will be paused. Please close applications to free up memory or close the VM"
Of course it would be much better if the GUI displayed that error message instead of something generic and mysterious!

But what is happening here? I would have expected insufficient host memory to be detected when the guest first starts. Is VB allocating host memory dynamically as the guest begins to use parts of its RAM? I can't find any reference to such a "feature".
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: poorly handles low memory on host

Post by mpack »

IMHO, everything you say is true, but it's really something to discuss with the developers, not us users. Search for a BugTracker ticket, add to it if found. Raise one if not.

BugTracker is a separate system, although you can use the same OSSO login you use here. On first login you'll be asked to choose a nickname for that site. It would make sense to use the same nickname as here, if it lets you.
Hugh2
Posts: 6
Joined: 15. Feb 2012, 06:28

Re: poorly handles low memory on host

Post by Hugh2 »

mpack wrote:Search for a BugTracker ticket, add to it if found. Raise one if not.
I was going to do this, but I wasn't sure quite how VB worked, and my report was phrased more as a question. I figured: bug tracker for statements, forum for questions.

Does anyone know about the dynamic memory allocation issue?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: poorly handles low memory on host

Post by scottgus1 »

I have had Sysinternals Process Explorer running on my 16GB Core-I7 Windows 7 64bit host, with the memory graph open, while openning guests. (VB 3.2.12, btw, and I think I've seen this in v4.0.16, too, on our server). The memory is not taken in one fell swoop, but gradually, as the guest OS needs it, eventually building up to the guest's full amount. On a lower-memory host I have had that error happen, but a pop-up appears with the "Unable to allocate and lock memory" error, and an option to unpause the guest when other programs have been closed, if I remember right. I have been able to close other programs and unpause the guest successfully. Maybe there's a "Don't show this again" check mark in that pop-up that got checked?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: poorly handles low memory on host

Post by mpack »

I don't think so. Assuming "memory ballooning" wasn't being used, the configured allocation would be grabbed by the guest on startup. The gradual increase in memory consumption which you see will be Win7's superfetch feature working - not something that that VirtualBox is doing deliberately.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: poorly handles low memory on host

Post by scottgus1 »

I may have been accidentally confusing in my earlier post, sorry. I forgot that my interaction with the out-of-memory pop-up and ability to close programs and unpause the guest was on an older XP host with 2GB memory (running 3.1.2). I don't think I ever tried to observe whether there was a ramp-up in memory usage on that old XP host.
The memory-usage ramp-up is observable on my Windows 7 16GB host. I haven't had any out-of-memory issues on this PC yet. Could be super-fetch, I'm going to have to pull a Seargent Schultz on that feature: "I know nothing!"
Post Reply