OpenVZ allows you to limit 6 different "kinds" of memory:

            lockedpages
            privvmpages
            shmpages
            physpages
            vmguarpages
            oomguarpages

What exactly to do limit? "privvmpages"? Have you checked OpenVZ bean
counters for processes hitting the limit in your VPSes?

Generally, if we won't go into the details, OpenVZ "privvmpages" and
having X megabytes of physical RAM in physical system is two very
different things. If you use "privvmpages", you effectively limit the
available address space of all processes inside VPS that they can
_allocate_. Java applications are fairly sensitive to this - if, for
example, you will run Java machines with -Xmx1024M in your "2.5GB RAM"
VPS, and it's really "2.5GB worth of privvmpages", you'd likely would
be able to run only 2 jvms: third one would fail mysteriously by
hitting the limit.


Thank you for answer!
But i would like to see a little details. I will ask lame quesion :)
Why i can start more than two "java -Xmx1024M" on physically 2GB and can't
do it with OpenVZ's "provvmpages" 2GB?
Is it because kernel working with "physically" (native, pure..) RAM allows me to allocate more memory than i have ("allocate" not means "use", i understand), but when kernel working with that VPS's "provvmpages" RAM it cannot allow me to allocate more than i have? :)

Reply via email to