Hi, folks --- I have a beta patch to add memory limits (on the basis of RSS) to jails, and would love to get some people to test it out. The patch files (below) are against RELENG_6 from earlier this morning, but should work against anything recent. They should be applied under /usr/src.

This creates a kernel process for each jail to intermittently 1) check whether the jail's overcommitted on RSS and 2) if so, to partially page out the processes in the same way that's used for when the system's short on memory. This permits short periods of over- use, with a tendency back to the limit. (Aside: this is the same way Solaris handles it.)

To test, use the new '-m MEM_LIMIT_IN_MB' flag to jail to set the memory limit for the jail; I've also included a trivial program which consumes and holds memory which can be run inside the jail. Take a look on the console for the debugging information, which is rather verbose at the moment.

I'm expecting patches for jail scheduling to be coming down the pipe soon.

Cheers,

Chris



Attachment: kern.patch
Description: Binary data

Attachment: sys.patch
Description: Binary data

Attachment: usr.sbin.patch
Description: Binary data

Attachment: useMemory.c
Description: Binary data

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to