4

When running VMs on an ESXi host, you can overcommit the memory.

Example: host == 20GB physical RAM

The amount of RAM allocated to each VM is

  • VM1 == 10gb
  • VM2 == 10gb
  • VM3 == 10gb
  • VM4 == 10gb

The result is even though there is only 20GB of ram available, We have actually allocated 40GB of it.

There is no problem with this if each machine uses and average of 5GB of "active" memory (inactive memory is swapped out in a few different manners).

The issue is, VM1 does a big file operation, the kernel writes an additional 5GB to it's RAM. As this is just written, the esx host considers it as active memory, and starts swapping out memory from the other running VMs (thus hitting their performance).

Flushing the cache after a big operation (using is not a great option as the host has already started penalising the other VMs.)

The above is a simplification (the actual problem VM has 32GB of RAM assigned), but essentially:

tl;dr

How do I limit the max size of the disk cache on a linux kernel.

1
  • Cgroups could be of help - by specifying a "guaranteed minimum" memory for all the VMs you might be able to at least slightly alleviate the problem.
    – peterph
    CommentedJan 18, 2013 at 23:05

1 Answer 1

1

What are your real numbers, versus the simplified representation above?

I'd argue that you shouldn't overcommit your RAM to that degree. Obviously, more RAM should be an option. Have you considered leveraging an SSD and enabling the Swap to SSD/host cache feature?

1
  • Actual problem VM size is 32GB. I completely agree that he should reduce the RAM allocation of this WM. I think the total over commit on the host is actually about 20% which is fine. I heard there was a way of limiting this disk cache size in windows, so assumed there would be in linux also. I think real solution would be to reduce RAM allocation on VM, but apparently it may be needed by program data (not disk cache)
    – Rqomey
    CommentedJan 21, 2013 at 10:57

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.