From owner-soc-status@FreeBSD.ORG Mon May 28 16:14:26 2012 Return-Path: Delivered-To: soc-status@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23C791065673 for ; Mon, 28 May 2012 16:14:26 +0000 (UTC) (envelope-from rudotx@gmail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id A1ADA8FC12 for ; Mon, 28 May 2012 16:14:25 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so3069362wgb.31 for ; Mon, 28 May 2012 09:14:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=YUrs9EPTJRkHR07PV1FUdn1t0uQZJeMX6r9qzA6B5e8=; b=Hlv3Kplodli//Ycqk7wThQty1gFkVuxQadRSJjj4qvDhMpDPTRBqHOhn41sP6uZxHX aMD91Waw8XBb8I4JIlS+ACgLhFJxkxqcCqJKwE2w0L5lneB7KB2KvO7bCs0ijeCj/Oxd ltJbQgMLhGpxty9lS0yguSy13IuRIUHnWYRXCCCOv4gCZ1p+aXM2ASOTKgsaYE5mxFTm I/PLuwE9VOc50/Vnix3ddVYAYiAwiqH+hOvvB8k4q3VheizHBuqsEObA9FzSrINKqbnN c8F4BhuOOPM0igpeymqfkZ5ULFWU41AOZnlZ8e9+RH7TDtJzjlY9325K8qEfHbutlfZi n5dA== Received: by 10.216.208.71 with SMTP id p49mr5002524weo.172.1338221664563; Mon, 28 May 2012 09:14:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.231.98 with HTTP; Mon, 28 May 2012 09:14:04 -0700 (PDT) From: rudo tomori Date: Mon, 28 May 2012 18:14:04 +0200 Message-ID: To: soc-status@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: cpu limits status report X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 May 2012 16:14:26 -0000 Hi, the goal of my gsoc project is to enable the system administrators to configure %CPU limits using the rctl command. So that they can for example limit a particular user to 50% cpu time. Last week I added a new resource to the racct/rctl infrastructure that stores the %CPU utilization. I can now start a cpu intensive process that would normally consume almost 100% cpu time and using rctl, I can limit it to 40% for example. This works and I can watch it in top how the %cpu utilization for the process goes down to about the specified limit. There are still problems that I will try to address this week: 1. I may sometimes skip setting the pcpu resource for some processes. This makes now the aggregate pcpu utilization (for example per-user cpu utilization) incorrect. 2. I probably need to change the formula that calculates the CPU percentage utilization, because it does not work well for short-lived processes. I think I will use the same formula as is used in the ps command. rudo