From owner-freebsd-current@FreeBSD.ORG Wed Mar 28 12:30:10 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F4881065674; Wed, 28 Mar 2012 12:30:10 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id 068578FC1D; Wed, 28 Mar 2012 12:30:10 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1SCs1J-0001K2-MK; Wed, 28 Mar 2012 16:30:33 +0400 Date: Wed, 28 Mar 2012 16:30:33 +0400 From: Slawa Olhovchenkov To: Edward Tomasz Napiera?a Message-ID: <20120328123033.GD61230@zxy.spb.ru> References: <4E2EC1D4.20302@rsu.ru> <5690C0E7-5FD5-49B1-B1C1-6D56EB95B810@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5690C0E7-5FD5-49B1-B1C1-6D56EB95B810@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: freebsd-current@freebsd.org, Alexander Pyhalov Subject: Re: rctl limit cpu X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2012 12:30:10 -0000 On Wed, Jul 27, 2011 at 09:32:49PM +0200, Edward Tomasz Napiera?a wrote: > Wiadomo?? napisana przez Alexander Pyhalov w dniu 26 lip 2011, o godz. 15:32: > > Hello. > > I see in rctl man page, that I can limit cpu time in milliseconds, e.g., for jail. But I can't deny allocation of the resource (according to man page). > > In Solaris I can assign different amount of cpu shares to different projects. How can I achieve this with rctl? For example, I'd like to give jail:www 40% CPU, jail:db - 50% CPU and leave 10% to the base system... > > The cputime resource (it got renamed shortly before the code freeze to match > resource names in login.conf(5)) defines amount of CPU time used, not the percentage. > That's why you cannot deny it - if you could, it would just make the offending process > (jail, login class, user) hang indefinitely. > > The %CPU limit is not implemented yet. I plan to do this before sometime > after 9.0 is out. Any progress yet?