From owner-freebsd-hackers Mon Jan 11 17:00:22 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA01014 for freebsd-hackers-outgoing; Mon, 11 Jan 1999 17:00:22 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA01009; Mon, 11 Jan 1999 17:00:18 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.1/8.9.1) id QAA98452; Mon, 11 Jan 1999 16:59:31 -0800 (PST) (envelope-from dillon) Date: Mon, 11 Jan 1999 16:59:31 -0800 (PST) From: Matthew Dillon Message-Id: <199901120059.QAA98452@apollo.backplane.com> To: Bernie Doehner Cc: hackers@FreeBSD.ORG, questions@FreeBSD.ORG Subject: Re: limiting per process swap space utilization like Solaris ulimit? Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Hi: : :Due to a problem with qmail running away, I'd like to be able to limit the :per process swap space utilization under FreeBSD. : :How does one do this? : :Under Solaris ulimit provides a good interface to setting this limit, but :I could find no such limit (either setable via a program, or a system :call). : :Thanks. : :Bernie You can set the datasize resource limit apollo:/usr/src/sys# limit cputime unlimited filesize unlimited datasize 524288 kbytes <---------- stacksize 65536 kbytes coredumpsize unlimited memoryuse 32768 kbytes descriptors 1024 memorylocked unlimited maxproc 200 That's about as close as you can get. Try setting it to something like 20m. The real solution is to figure out why qmail is blowing up in the first place. If it's a matter of too many qmail processes running, that's a different problem that a per-process resource limit will not solve. I don't know what the solution under qmail is for that. Under sendmail it's relatively easy to limit the maximum number of running sendmail processes through the MaxDaemonChildren option. -Matt Matthew Dillon Engineering, HiWay Technologies, Inc. & BEST Internet Communications & God knows what else. (Please include original email in any response) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message