Page 1 of 1

HostMemoryLow with plenty of RAM

Posted: 27. May 2013, 09:43
by eesclapes
Hi there,

I am getting a "HostMemoryLow: Unable to allocate and lock memory", while I do have plenty of RAM available.

At the start of the log file there is a "Host RAM: 7920MB total, 5432MB available" but a few minutes later I get a Meditation Guru error even though I only had my text editor open and a few of ssh sessions.

Guest is Ubuntu 12.04 with all packages up to date. I recently upgraded my laptop to 8Gb and the VM has been assigned only 3Gb.

Can you spot anything wrong in the logs? Don't know what to do next.

Thanks in advance.

PS: I know this is quite a common topic in the forums and have read many threads about it. I did update both Virtualbox and the Guest Additions (actually I am running a test build for the Guest Additions because of another bug hitting Ubuntu 12.04 guests)

Re: HostMemoryLow with plenty of RAM

Posted: 27. May 2013, 10:56
by noteirak
Well you may have lots of RAM free, but you also allocate lots of RAM to your guest (3GB)! And the errors start to appear about 30 min after, plenty of time to use all the remaining available RAM.
The error tells you all, you do run out of RAM, so you have 3 options :
1. Reduce RAM in the VM config
2. Free some RAM
3. Get more RAM

Re: HostMemoryLow with plenty of RAM

Posted: 27. May 2013, 12:56
by eesclapes
Thanks for looking at this.

I'd say there has to be something else because I used to run this same VM back when I had 4Gb available in the host. I split them 2Gb for host and 2Gb for guest without issues. Whenever the host RAM was almost full, the host was a little bit unresponsive, but still could be able to work. Once I did get more RAM both systems became much more responsive, but now I keep getting this errors.

I don't think the host ram gets to the limit at all with my current setup, I never use more than 1.5 Gb at any moment (by looking at the windows task manager*). Is there any way to know the available host RAM at the moment of the crash?

* About the task manager: I have noticed that the system is not locking the full RAM that has been assigned to the VM. When I boot the VM I still see that only about a 40% of the total RAM is being used and the the VBox processes are using only about 100Mb. Is that the normal behavior?

Thanks again.

Re: HostMemoryLow with plenty of RAM

Posted: 27. May 2013, 14:49
by mpack
The VM seems to be getting a number of IO errors prior to getting the memory error. At a guess I'd say that some memory is leaked on every error. I assume the error is related to host I/O caching.

I see you are using snapshots, and VMDK format disks (and snapshots). I admire your bravery.

Re: HostMemoryLow with plenty of RAM

Posted: 27. May 2013, 15:16
by eesclapes
I read in impactcore blog (not allowed to post links yet) about using this command to prealocate the RAM

Code: Select all

VBoxManage setextradata <VM NAME> VBoxInternal/RamPreAlloc 1
Is it a dangerous hack (as they warn in the blogpost)?
mpack wrote:The VM seems to be getting a number of IO errors prior to getting the memory error. At a guess I'd say that some memory is leaked on every error. I assume the error is related to host I/O caching.

I see you are using snapshots, and VMDK format disks (and snapshots). I admire your bravery.
I got the VM prepackaged, not sure why they chose VMDK. Should I use VDI as a more reliable format for snapshots?

About the IO error, is it related to the disk format and/or use of snapshots? Would cloning the current state solve the issue?

Thanks again

Re: HostMemoryLow with plenty of RAM

Posted: 27. May 2013, 15:38
by mpack
eesclapes wrote:Would cloning the current state solve the issue?
Unknown, but it's the first thing I'd do. If he problem continues I would next consider turning off host caching in the VM settings. I would completely avoid the use of snapshots of any kind.

I'm not familiar with the RamPreAlloc feature, but I doubt it would help if the problem is indeed caused by buffer memory being leaked after I/O errors.

Re: HostMemoryLow with plenty of RAM

Posted: 19. Jun 2013, 11:55
by ViSco
Hi eesclapes,
I see this thread late, and I've opened another one similar "Not enough physical memory" (sorry for that).
See my last post and what I've found in a win7 forum, it seems to be an old Win7 UNMA memory architecture issue.
Have you done any progress?
Cheers