6,534
edits
Changes
→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
<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
numproc 3 11 65 65 0
physpages 5084 6020 0 2147483647 0
dcachesize 0 0 1048576 1097728 0
numfile 106 339 2048 2048 0
numiptent 10 10 128 128 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.