Hi! Im trying to limit memory usage for jails with the rctl API. But I don't really get it. I have compiled the kernel with the right options and rctl show me stuff like: jail:jail22:memoryuse:deny=268435456 jail:jail22:swapuse:deny=268435456 jail:jail20:memoryuse:deny=268435456 jail:jail20:swapuse:deny=268435456 jail:jail16:memoryuse:deny=268435456 jail:jail16:swapuse:deny=268435456 but when I try to allocate memory it doesn't seem to hit the limit. Also when I run # rctl -u jail:jail20 cputime=0 datasize=0 stacksize=0 coredumpsize=0 memoryuse=0 memorylocked=0 maxproc=0 openfiles=0 vmemoryuse=0 pseudoterminals=0 swapuse=0 nthr=0 msgqqueued=0 msgqsize=0 nmsgq=0 nsem=0 nsemop=0 nshm=0 shmsize=0 wallclock=0 it seems that no accounting is done. What's missing? Cant find anything in the manuals. # uname -srm FreeBSD 9.1-RELEASE-p1 amd64 /Peter.
Wiadomo?? napisana przez Peter Ankerst?l w dniu 2 mar 2013, o godz. 16:21:> Hi! > > Im trying to limit memory usage for jails with the rctl API. But I don't really get it. > > I have compiled the kernel with the right options and rctl show me stuff like: > jail:jail22:memoryuse:deny=268435456 > jail:jail22:swapuse:deny=268435456 > jail:jail20:memoryuse:deny=268435456 > jail:jail20:swapuse:deny=268435456 > jail:jail16:memoryuse:deny=268435456 > jail:jail16:swapuse:deny=268435456 > > but when I try to allocate memory it doesn't seem to hit the limit. Also when I run > # rctl -u jail:jail20 > cputime=0[..] Could you please do "jls jid name" and verify that a jail named "jail20" is actually running? -- If you cut off my head, what would I say? Me and my head, or me and my body?
On Mar 2, 2013, at 5:15 PM, Edward Tomasz Napiera?a <trasz at FreeBSD.org> wrote:>> > > [..] > > Could you please do "jls jid name" and verify that a jail named "jail20" is actually > running? > > -- > If you cut off my head, what would I say? Me and my head, or me and my body? > >Oh! My bad, I thought it was the name from rc.conf. But of course it is the name from the -n flag. Now everything seems to work. Thanks!