sorry but it does not work - for me.
I tried to set the limit and the barrier to 128MB.
root:~# vzctl set 4 --privvmpages 32768:32768 --oomguarpages 32768:32768 --physpages 32768:32768 --vmguarpages 32768:32768 --save
Saved parameters for VPS 4
root:~# vzctl start 4
Starting VPS ...
VPS is mounted
Adding IP address(es): 192.168.0.13
Setting CPU units: 1000
Set hostname: myhostname
File resolv.conf was modified
Setting quota ugidlimit: 99999999
VPS start in progress...
root:~# ssh 192.168.0.13
Password:
Last login: Sun Feb 19 09:26:03 2006 from 192.168.0.10
myhostname:~# perl -e '$a="a";for(;;) {$a.=$a; print "allocated ".int(length($a)/1024/1024)."MB\n";}'
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 0MB
allocated 1MB
allocated 2MB
allocated 4MB
allocated 8MB
allocated 16MB
allocated 32MB
allocated 64MB
allocated 128MB
allocated 256MB
allocated 512MB
allocated 1024MB
Out of memory!
I don't understand that...
Stefan