OpenVZ memory breakdown

After quite a bit of reading and piecing apart the memory segmentation of OPenVZ, I ran across a great website that broke it down nicely.

http://maxgarrick.com/understanding-openvz-resource-limits/

The guy had a great picture that is a great visual reminder of how memory is laid out inside of a container.
A brief description of each:

privvmpages – pretty much the entire containers visible ram.
kmemsize – memory allocated for kernel-related process handling.  I toss in 10Mb unless it’s a huge app, then I massage the container as needed.  Otherwise, toss in 40-50Mb and see how far it expands, then shrink it up.
oomguarpages – Memory guaranteed to exist without any kind of Out-of-memory restriction.. in spite of what may be happening on the host.
vmguarpages – Memory guaranteed to the VM.

Toss all of these together into a soup, and add the right spices, and you’re golden.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s