Thursday, December 25, 2014

Windows 8 physical memory usage doesn't add up


I have an ultrabook with windows 8. 8GB of physical ram. I run Win7 inside a vmware image, which is assigned 4gb. However I can't make the numbers for physical memory usage add up.


The Win8 machine is doing not very much other than running the VM. Windows itself should have slightly less than 4GB to play in. Yet physical memory usage in task manager is constantly at 75-85% (and occasionally I get dire warnings "you're out of memory" and bluescreens). I can't figure out how that much is being used -- the numbers in task manager don't add up to that much! (either commit charge or working set). How could physical usage be higher than virtual usage?


I've run RamMap and it doesn't really explain things much (and i have no idea if these numbers are normal or indicate a problem). I don't want to have to learn all the gory details of windows memory management; I just want to know why this machine, that should have more than adequate physical RAM, runs out of memory.


I suspect caches/buffers, but CPU usage is low, and this memory doesn't get freed up quickly when it's needed.


Answer




How could physical usage be higher than virtual usage?



Windows, correctly in this case, assumes that using memory that isn't needed for any other purpose has zero cost. While seeing a large amount of free memory might make you happy, it shouldn't. Free memory is just memory that is wasted.


If you're thinking "I want lots of free memory now so I can use it later", forget it. You can use it now and use it later. You don't have to choose one or the other.


Free memory, essentially, represents a failure. The system couldn't find anything of any value at all to do with the memory and was forced to make it free. This is a pure loss -- if the memory isn't used later, making it free is wasted effort. If the memory is used later, making it free was wasted effort since now it just has to be made used again (transition the memory directly from one use to another is more efficient). Modern operating systems only make memory free if they have absolutely no other choice.


Now, the blue screens and warnings are not normal. You should tell us about them.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...