From owner-freebsd-questions@FreeBSD.ORG Wed Feb 2 13:55:35 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72D9916A4CE for ; Wed, 2 Feb 2005 13:55:35 +0000 (GMT) Received: from mail21.sea5.speakeasy.net (mail21.sea5.speakeasy.net [69.17.117.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id F29D243D31 for ; Wed, 2 Feb 2005 13:55:34 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 19580 invoked from network); 2 Feb 2005 13:55:34 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail21.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 2 Feb 2005 13:55:34 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 0521A83; Wed, 2 Feb 2005 08:55:32 -0500 (EST) Sender: lowell@be-well.ilk.org To: "Simon" References: <20050201212300.3FB6543D58@mx1.FreeBSD.org> From: Lowell Gilbert Date: 02 Feb 2005 08:55:32 -0500 In-Reply-To: <20050201212300.3FB6543D58@mx1.FreeBSD.org> Message-ID: <444qgvvzfv.fsf@be-well.ilk.org> Lines: 23 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: "freebsd-questions@freebsd.org" Subject: Re: User Limits X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "freebsd-questions@freebsd.org" List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Feb 2005 13:55:35 -0000 "Simon" writes: > I can't seem to find a way to limit FD per UID nor a way to limit memory per > UID Both of these can only be applied per process basis. Is there a reason > why FreeBSD still doesn't support these limits per UID? it would very useful > to be able to limit per UID as well as per process. My current problem is that > I have some user processes which need, let's say, 50mb of memory, but I > also want to make sure that no single user is using more than 500mb of > memory at any given time. Unfortunately, I also need to give users ability to > spawn more than 10 processes and without per UID limits, if I set a limit of > 20 processes per UID, 20 x 50mb would yield usage over 2x that of 500mb. I've been able to solve such problems by adding a limit on the number of processes per user, but that really only works because my environment is limited. I can imagine trying to write a daemon that would monitor usage and kill processes if they exceeded usage. It's a clunky solution, though. > PS: I wasn't sure if I could address this on freebsd-arch, so it's going here. If you're offering to write kernel modifications to do it, then you should take it there. Otherwise, this probably is the right place.