Changes

Jump to: navigation, search

Getting started with OpenVZ live CD

2,196 bytes removed, 05:05, 23 April 2007
Resource limiting: use new BC interface
The very important feature of VE is that you can limit it by resources: CPU, memory, disk space.
It is also performed via vzctl. Current usage values and limits of memory-related resources can be viewed through
[[/proc/user_beancounters]] bc/VEID/resources file:
<pre>
root@Knoppix:~# cat /proc/user_beancountersbc/60/resourcesVersion: 2.5 uid resource held maxheld barrier limit failcnt 101: kmemsize 628209 976969 2752512 2936012 0
lockedpages 0 0 32 32 0
privvmpages 5238 6885 49152 53575 0
shmpages 5012 5014 8192 8192 0
dummy 0 0 0 0 0
numproc 3 11 65 65 0
physpages 5084 6020 0 2147483647 0
dcachesize 0 0 1048576 1097728 0
numfile 106 339 2048 2048 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
numiptent 10 10 128 128 0
0: kmemsize 7843131 9967098 2147483647 2147483647 0
lockedpages 0 0 2147483647 2147483647 0
privvmpages 89600 127711 2147483647 2147483647 0
shmpages 63290 90159 2147483647 2147483647 0
dummy 0 0 2147483647 2147483647 0
numproc 73 78 2147483647 2147483647 0
physpages 85729 112341 2147483647 2147483647 0
vmguarpages 0 0 2147483647 2147483647 0
oomguarpages 85729 112341 2147483647 2147483647 1
numtcpsock 5 6 2147483647 2147483647 0
numflock 0 1 2147483647 2147483647 0
numpty 3 3 2147483647 2147483647 0
numsiginfo 0 3 2147483647 2147483647 0
tcpsndbuf 46620 48840 2147483647 2147483647 0
tcprcvbuf 81920 125476 2147483647 2147483647 0
othersockbuf 228660 339664 2147483647 2147483647 0
dgramrcvbuf 0 267484 2147483647 2147483647 0
numothersock 120 136 2147483647 2147483647 0
dcachesize 0 0 2147483647 2147483647 0
numfile 3111 3145 2147483647 2147483647 0
dummy 0 0 2147483647 2147483647 0
dummy 0 0 2147483647 2147483647 0
dummy 0 0 2147483647 2147483647 0
numiptent 15 15 2147483647 2147483647 0
root@Knoppix:~#
</pre>
First column is resource name, second is current usage, third is peak usage, forth and fifth are barrier and limit, and last column is fail counter.
Note that if you have failcounters nonzero values in the last column, it means that the appropriate this VEexperienced a resource shortage. This is very common reason why some application fail torun work in a VE. In this case you should increase limits/barriers accordingly; see
[[resource shortage]] for more info.

Navigation menu