Page 1 of 2

Not enough physical memory

Posted: 16. Jun 2013, 15:08
by ViSco
LENOVO T410, 5GB RAM, M520 @2.50 GHz
BIOS: Virtualization enabled
Win7 SP1 Enterprise 64bit
Guest: Lubuntu 64/32 bit, Mint64/32 bit, etc.
VirtualBox 4.2.12 r84980

I used to run VirtualBox without any issue when this same PC was WinXP with 3GB RAM.
Now after upgrade to Win7 and 5GB RAM, VM can start only if is configured with max 128/256MB memory (depending on the moment), but this way it has bad performances.
It cannot start if configured with 256/512MB or more, this message is displayed:
“Not enough physical memory is available to power on this virtual machine with its configured settings.”
Same result with different guests 32/64 bit, different versions of VirtualBox, and similar result with the competitor VMWare Player. So I'd rather think about the BIOS or Win7 of this PC, or about how to configure virtualizator for getting the memory from Win7.
The task manager reports (Physical Memory (MB)): 44%
Total: 4915
Cached: 2259
Available: 2752
Free: 513

This is an extract from the log:
VirtualBox VM 4.2.4 r81684 win.amd64 (Oct 26 2012 18:55:21) release log
00:00:01.700512 Log opened 2013-06-08T13:53:05.663710700Z
00:00:01.700526 OS Product: Windows 7
00:00:01.700529 OS Release: 6.1.7601
00:00:01.700531 OS Service Pack: 1
00:00:01.700543 Host RAM: 4915MB total, 1992MB available
00:00:01.700547 Process ID: 7548
00:00:01.700548 Package type: WINDOWS_64BITS_GENERIC
00:00:01.701013 Installed Extension Packs:
00:00:01.701096 None installed!

00:00:41.312427 PGM: Failed to procure handy pages; rc=VERR_NO_MEMORY rcAlloc=VINF_SUCCESS rcSeed=VINF_SUCCESS cHandyPages=0x1e
00:00:41.312536 VM: Raising runtime error 'HostMemoryLow' (fFlags=0x2)
00:00:41.312562 AssertLogRel D:\tinderbox\win-4.2\src\VBox\VMM\VMMR3\VMM.cpp(1692) int __cdecl VMMR3EmtRendezvous(struct VM *,unsigned int,int (__cdecl *)(struct VM *,struct VMCPU *,void *),void *): !pVCpu->vmm.s.fInRendezvous
00:00:41.312598 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"
00:00:41.312805 Changing the VM state from 'RUNNING' to 'GURU_MEDITATION'.

Anyone could help?
Greatly appreciated.
Ciao

Re: Not enough physical memory

Posted: 16. Jun 2013, 15:49
by mpack
Help how? Obviously Win7-64bit hogs way more of your PCs memory than XP-32bit will, leaving less for a VM. The only solution is to look for ways to free up memory, or add more to the host.

Re: Not enough physical memory

Posted: 17. Jun 2013, 09:32
by ViSco
mapck,
please see the log, it reports a lot of memory available:
"Host RAM: 4915MB total, 1992MB available"
I wonder how many people here can run Linux guests, configured with more than 512MB, in a Win7 64bit host with less than 4GB of physical RAM.
Or isn't it really the case?
Thanks!

Re: Not enough physical memory

Posted: 17. Jun 2013, 11:18
by mpack
Well, if you want to discuss the contents of the log the please post the whole thing as a .zip attachment.

Re: Not enough physical memory

Posted: 17. Jun 2013, 16:29
by ViSco
Hi mpack

here the log
Please note: "Host RAM: 4915MB total, 3136MB available"
and then the errors:
'HostMemoryLow'
Unable to allocate and lock memory

Thanks a lot in advance

Re: Not enough physical memory

Posted: 17. Jun 2013, 16:51
by Perryg
Are you running Google (*) on the host?

http://social.technet.microsoft.com/For ... 184dec89ff

Re: Not enough physical memory

Posted: 17. Jun 2013, 16:58
by ViSco
No, I'm not running Chrome, nor I have a process like that "GoogleCrashHandler.exe" running in the task manager
Thx!

Re: Not enough physical memory

Posted: 17. Jun 2013, 17:17
by Perryg
I would still investigate what else you might be running on the host that is either using VMX or nested pages that would/could be in conflict with VirtualBox.
You show you have enough memory to do the job, and that is the only other thing that I have seen that has caused "Failed to procure handy pages" .
Some virus software has also caused this error by the way.

Re: Not enough physical memory

Posted: 17. Jun 2013, 18:23
by ViSco
Here I lack some skill about VMX or nested pages
I just see in the log:
"VMX enabled!
Enabled nested paging"

Re: Not enough physical memory

Posted: 17. Jun 2013, 18:40
by mpack
Basically the problem is that memory may be reported as available when its still in use (i.e. available is not the same as free). There's a feature which the latest versions of several OS's have adopted, which is to use all (or a large chunk) of free memory to cache something - lets say it caches the entire OS system folder. This memory is still reported to apps as available, and the intention is that the lower priority app will release this memory if a foreground app demands it.

Unfortunately there have been some apps that were buggy and didn't play ball: i.e. didn't release memory immediately on demand. GoogleCrashHandler is just one example of these. If I were you I'd look at the task list and see if you spot anything hogging an excessive amount of memory.

Re: Not enough physical memory

Posted: 17. Jun 2013, 19:13
by ViSco
I had noticed in task manager the free memory is much less than the available one.I just did a new attempt, closing as many apps as possible so to obtain 3GB available and about 500MB free: I can see the free memory consuming, but when the issue occurs there is still some 200MB available.
In the assumptions there is some app not playing fair and not releasing the free memory, I should have the same problem when launching whatever else application, but I've never observed a problem like this, also when the free one is very low, it seems to occur only when launching the VM. I'd tend to discard for a moment this hypothesis.
I'd rather think VirtualBox is not able to take the available memory in Win7, but I should not be the only one and I remind I've a similar issue with VMWare too.
So it seems more like it's Win7 that does not provide the available memory to virtualizators, or I'd rather say "my Win7", since I don't hear about similar problems from other people (I tried a search in the forum).
:(

Re: Not enough physical memory

Posted: 17. Jun 2013, 19:26
by ViSco
well, maybe I'm not the only one, just found this thread "HostMemoryLow with plenty of RAM"
It appears still unresolved.

Re: Not enough physical memory

Posted: 17. Jun 2013, 19:30
by mpack
As far as I'm aware the issue has always been pinned down to some rogue app hogging memory, either GoogleCrashHandler or some antivirus thing.

Re: Not enough physical memory

Posted: 19. Jun 2013, 11:32
by ViSco
Searching in the web, I've retrieved this very interesting one (www.sevenforums.com, author cdonner, Jan 2011):

"Unfortunately there is a bug in Windows 7 related to NUMA (non-uniform memory architecture) that will cause issues on certain platforms when the amount of Free memory goes down. For instance, on my Thinkpad T410 with 8GB of RAM the Free memory will approach zero when I load a large VM. When I stop the VM and exit VMWare, the Free memory does not recover - the memory remains allocated by the cache.
The problem with NUMA is that it prefers to allocate memory from banks that are attached to a CPU core (hence non-uniform, i.e. not all memory is considered equal). Unfortunately, the Windows 7 NUMA bug prevents memory from being allocated that is in the Available pool in this scenario. Since I have no Free memory, the machine begins to swap madly when I restart the VM (the same or another one does not matter) and freezes up for minutes - even though there are over 4GB "Available".
So, despite of what the others have said, the amount of "Free" memory is more important than what's in the "Available" pool.
"

Not 100% the same as my issue (and I have just a Thinkpad T410), but very very close to it.
And there seems to be a hotfix for it:
http://support.microsoft.com/kb/2155311/en-us

Any hint for avoiding this kind of issue?
I have an enterprise PC and I'm not authorixed installing system hot fixes

Cheers

Re: Not enough physical memory

Posted: 14. Aug 2013, 12:51
by MrBow
Hi ViSco,

Exactly the same hardware and problem. But now solved.

In my case the problem was the memory configuration (4GB+1GB). I removed the 1GB and now is working.

Hope it helps.