Date: Tue, 4 Sep 2001 12:12:41 -0400 (EDT) From: Chris BeHanna <behanna@zbzoom.net> To: <security@freebsd.org> Subject: Re: Need help with limits(1) Message-ID: <20010904121057.C47041-100000@topperwein.dyndns.org> In-Reply-To: <48396009431.20010904114449@internethelp.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 4 Sep 2001, Nickolay A.Kritsky wrote: > Hi, all. > I have a webserver running on FreeBSD 3.3. One of the perl scripts > located there has some bug, that puts him in the infinite loop. This > causes my webserver to stall, so that the only way to reboot is > hardware reset. I want to restrict user httpd to use no more than > 75% of CPU time. I read man limits(1) and man getrlimit(2) but they > only talk about limiting cputime in seconds, but not percents. It > means that I can restrict httpd process to run no more than 10 > seconds, but in this 10 seconds it will have access to all CPU power > of the computer, making administrative work quite impossible. How > can I add percent-based cputime restrictions for various users and > login classes? I don't know of a way to limit a user to a given percent of CPU, but you might be able to limit the user's process priority, so that even though the user would get 100% of the CPU when his process runs, that process would be easily preempted by another process that has a higher priority. -- Chris BeHanna Software Engineer (Remove "bogus" before responding.) behanna@bogus.zbzoom.net I was raised by a pack of wild corn dogs. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010904121057.C47041-100000>