From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org)
	by nuthatch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-45958-garchives=archives.gentoo.org@gentoo.org>)
	id 1FzKIp-0007UO-3k
	for garchives@archives.gentoo.org; Sat, 08 Jul 2006 21:25:27 +0000
Received: from robin.gentoo.org (localhost [127.0.0.1])
	by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k68LNfca008421;
	Sat, 8 Jul 2006 21:23:41 GMT
Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186])
	by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k68LD58t004886
	for <gentoo-user@lists.gentoo.org>; Sat, 8 Jul 2006 21:13:05 GMT
Received: by nf-out-0910.google.com with SMTP id b2so236019nfe
        for <gentoo-user@lists.gentoo.org>; Sat, 08 Jul 2006 14:13:05 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth;
        b=H04gHeGZKX0ezostT/bCucXYHELTBY8EXlUJdKBEn3aRBVmvdFclGU/XCOrAY8uBBQNGzZd/y/kUxgb7wjCWAyryPhC2sAtWp2kEqo/lJtImMXdARLY/KPJ/Gh4iH/ghiAfv29Twk831zaDPb+kR7ncqYXRJC3JvWep5RK8c77Q=
Received: by 10.78.140.17 with SMTP id n17mr1203953hud;
        Sat, 08 Jul 2006 14:13:05 -0700 (PDT)
Received: by 10.78.20.11 with HTTP; Sat, 8 Jul 2006 14:13:05 -0700 (PDT)
Message-ID: <7573e9640607081413h57d23dabt95c4d3b4456b638f@mail.gmail.com>
Date: Sat, 8 Jul 2006 14:13:05 -0700
From: "Richard Fish" <bigfish@asmallpond.org>
Sender: richard.j.fish@gmail.com
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Per-process CPU % usage limit
In-Reply-To: <200607081740.01670.shrdlu@unlimitedmail.org>
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <200607081740.01670.shrdlu@unlimitedmail.org>
X-Google-Sender-Auth: e784da245bc00150
X-Archives-Salt: 49eed6fb-93d4-4fd9-ba4b-8500eabfc9b3
X-Archives-Hash: 7ee9cf15ee38cd1a21fe4184935f7c18

On 7/8/06, Etaoin Shrdlu <shrdlu@unlimitedmail.org> wrote:
> The problem is that some very CPU-consuming apps, even if started with
> the lowest priority (eg, nice -n 19), still eat up 100% CPU (with
> subsequent overheating, fan start, throttling, etc.) if the system is
> not busy and has nothing else to do. What I'd like to know is whether it
> is possible to impose such a CPU percentage usage limit.

Well, I would first upgrade my cooling fans so the processor couldn't
overheat! :-)

But you could also enable "CPU freqency scaling" in the kernel, with
the ondemand governor, and use the various settings in
/sys/devices/system/cpu/cpu0/cpufreq to control the clock speed and
behavior of the system.  You can use scaling_max_freq to specify the
maximum frequency of the processor so that it will not overheat or
throttle, no matter what the load is, and the
ondemand/ignore_nice_load setting will tell the governor not to
increase the clock speed for niced processes.

-Richard
-- 
gentoo-user@gentoo.org mailing list