[Users] Limits for low memory

Wolfgang Schnerring wosc at wosc.de
Wed Apr 25 09:43:40 EDT 2007


Hello!

I've been doing some experiments with OpenVZ, and one of them was, how
many VE's can I run on a single machine? The guinea pig machine was a
Pentium4/3GHz with 2GB RAM. 230 VE's run just fine, but upon starting
the 231st, I reproducably get a kernel panic, "out of memory" (VE
configuration is appended below).

What I'd really like to know is, why does that happen?
So I collected resource consumption numbers from /proc/bc for all VE's.
Summed up for 220 VE's (I didn't dare 230 ;-), the maxheld values are
  kmemsize 160957978
  socket buffers 167838032  (tcpsndbuf+tcprcvbuf+dgramrcvbuf+othersockbuf)
  physpages 143708

The physpages amount to 562MB; that should fit into 2GB nicely in my book.

If I understand <http://wiki.openvz.org/UBC_systemwide_configuration>
correctly, those two things need to go into low memory, and the
total amount for that on x86 is 832MB. 

-- Question: Where do the 832 MB come from?

The two numbers above are roughly 314 MB, that's nowhere near 832.
But the wiki-page has the formula kmemsize+sockbuf / 0.4*832MB should
be smaller than 1 to be safe. Interestingly enough, that quotient is
0.94, so there might be something up here.

-- Question: Where does the 0.4 come from?


Can anybody help me figure out what's going on here?

Thank you very much for your help,
Wolfgang

# VE configuration file
NUMFLOCK="100:110"
VMGUARPAGES="6144:2147483647"
OTHERSOCKBUF="132096:459776"
DISTRIBUTION="debian"
NUMPTY="16:16"
OOMGUARPAGES="6144:2147483647"
DGRAMRCVBUF="132096:132096"
CPUUNITS="1000"
NUMIPTENT="128:128"
NUMTCPSOCK="768:768"
PHYSPAGES="0:2147483647"
AVNUMPROC="50:50"
NUMPROC="100:100"
LOCKEDPAGES="32:32"
TCPSNDBUF="10485760:12451840"
VE_ROOT="/var/tmp/vte-wosc/vm33745/root"
NUMSIGINFO="256:256"
KMEMSIZE="5324800:5857280"
SHMPAGES="8192:8192"
TCPRCVBUF="10485760:12451840"
VE_PRIVATE="/var/tmp/vte-wosc/vm33745/private"
NUMFILE="3200:3200"
PRIVVMPAGES="32768:36044"
DCACHESIZE="1228800:1351680"
NUMOTHERSOCK="128:128"
OSTEMPLATE="debian-3.1"
HOSTNAME="vm0.local"
NETIF="ifname=eth0,mac=02:7B:6A:56:00:02,host_ifname=vif33745.0,host_mac=02:7B:6A:56:00:02"


More information about the Users mailing list