Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

From everything I have read, RHEL will use all available/unused RAM for caching to increase performance.

However, this becomes an issue for me in a VMware environment. VMware (ESX4) looks for guest OS to let it (ESX) know when the guest is done using the memory so it will make it available it to another server.

So lets say I have a guest that has a dB, the dB runs an intensive job, it finishes and now its idle. But since it cached all the memory, VMware still thinks that the dB server needs it, so it doesnt release the RAM to be used by my webserver that needs the extra RAM. Sure I can live with as many guests as I have RAM, but that is a waste of a huge virtualization feature, since over all my CPU utilization is under 10% and my RAM utilization (as far as VMware knows) is 75%.

Any ideas?

share|improve this question

1 Answer 1

One mechanism to reclaim memory from the DB server VM in your example would be the VMware Balloon driver (which is part of the VMware Tools):

This is VMware physical memory management driver which acts
like a "balloon" that can be inflated to reclaim physical pages
by reserving them in the guest and invalidating them in the
monitor, freeing up the underlying machine pages so they can
be allocated to other guests. The balloon can also be deflated
to allow the guest to use more physical memory.

See e.g. "3.3 Ballooning" in Understanding Memory Resource Management in VMware® ESX Server (pdf).

You could also run this little script

#!/bin/sh
sync && echo 3 > /proc/sys/vm/drop_caches

in the DB server VM to explicitly free pagecache, dentries and inodes if you are sure you don't need the caches anymore.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.