From owner-freebsd-current@FreeBSD.ORG Wed Jul 27 19:57:45 2011 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 C40B0106566C for ; Wed, 27 Jul 2011 19:57:45 +0000 (UTC) (envelope-from etnapierala@googlemail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 5AAAB8FC16 for ; Wed, 27 Jul 2011 19:57:44 +0000 (UTC) Received: by wwg11 with SMTP id 11so3403369wwg.1 for ; Wed, 27 Jul 2011 12:57:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=+JnCeGmO03W0D3myaPY3mwvyupXofCPDKFwu21S+pcc=; b=WnZiUfXQVOT4ydNXMdJ0cMv387uMTWg9YBUpOS0XojLiVnWx94l7Bgr3nGWhXWFdye dLf9+gzHKJes8DgF/IdUunLfVptAbW6Jn9rf9i+qGY36sRL0mnspvnIHoAvnw/dbC2qQ Ng7pIZL8fuZotsFJNTPiotJrCH12EzO1tRhAU= Received: by 10.216.74.74 with SMTP id w52mr126117wed.113.1311795173291; Wed, 27 Jul 2011 12:32:53 -0700 (PDT) Received: from [192.168.1.106] (45.81.datacomsa.pl [195.34.81.45]) by mx.google.com with ESMTPS id w45sm143149wec.24.2011.07.27.12.32.51 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Jul 2011 12:32:52 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=iso-8859-2 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <4E2EC1D4.20302@rsu.ru> Date: Wed, 27 Jul 2011 21:32:49 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <5690C0E7-5FD5-49B1-B1C1-6D56EB95B810@FreeBSD.org> References: <4E2EC1D4.20302@rsu.ru> To: Alexander Pyhalov X-Mailer: Apple Mail (2.1244.3) Cc: freebsd-current@freebsd.org 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, 27 Jul 2011 19:57:45 -0000 Wiadomo=B6=E6 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. -- If you cut off my head, what would I say? Me and my head, or me and my = body?