RAM caching causes severe performance drops

Posted by B T on Ask Ubuntu See other posts from Ask Ubuntu or by B T
Published on 2012-11-24T23:49:28Z Indexed on 2012/11/25 5:17 UTC
Read the original article Hit count: 350

Filed under:
|
|
|

I have read plenty of threads on memory caching and the standard response of "large cache is good, it shouldn't effect performance", "the kernel knows best".

I have recently upgraded from 12.04 to 12.10 and changed from VirtualBox to VMware Workstation and the performance differences are severe (I suspect it is because of the latter).

When I am running my virtual machine the system load monitor graph shows less than 50% memory usage generally.

System load indicator is showing me that the rest of my RAM is used in the cache all the time.

Plain and simple this is the comparison:

BEFORE

  • Cache was very sparingly used, pretty much none of my memory usage was the cache
  • Swappiness was 0 (caused my memory to be used first, then swap only if needed)
  • Performance was quite good and logical
    1. RAM was used fully first, caching was minimal. I could run enough software to utilize my full 4GB of RAM without any performance degradation whatsoever
    2. Swap space was then used as needed which was obviously slower (I am on a HDD) but was still usable when the current program was loaded into memory

AFTER

  • Cache is used to fill the full 4GB as soon as my virtual machine is run
  • Swappiness is 0 (same behaviour as before but cache uses full memory straight away)
  • Performance is terrible and unusable while running Ubuntu software
    1. Basic things like changing windows takes 2 minutes +
    2. Changing screens happens frame by frame over sometimes up to 5 minutes
    3. Cannot run an IDE and VM like I could with ease before

So basically, any suggestions on how to take my performance back to how it was before while keeping my current setup?

My suspicion is VMWare is the problem, but how do I see what is tied to the use of the cache? Surely there is a way to control this behaviour in software as polished as VMware?

Thanks

EDIT: Could also be important to note that the behaviour differs depending on whether VMware is open or closed. If VMware is open, then the ram will lock at like 50% and 50% cache and go into the complete lock up mentioned above. Contrastingly, if VMware is closed (after being open), then the RAM will continue to rise as it needs / cache will stay as the complete remaining memory and there is no noticeable performance degradation.

© Ask Ubuntu or respective owner

Related posts about 12.10

Related posts about vmware