Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-12-2010, 12:19 PM   #1
LQ Newbie
Registered: Jul 2010
Posts: 2

Rep: Reputation: 0
How to control the cpu usage for the whole system in Linux?

I want to control the limit of cpu usage of the whole system to a certain percentage, similar to cap the VCPU usage of a virtual machine. Is it possible?

Old 07-12-2010, 01:11 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
That depends on whether or not your cpu supports throttling.
Old 07-12-2010, 01:24 PM   #3
Senior Member
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Why would you even want to. It makes sense to me to throttle back an individual process or groups of processes so you can have more processing power available to other processes, but to throttle back the enter cpu? Why not just go find a slower system?
Old 07-12-2010, 03:09 PM   #4
Registered: May 2009
Posts: 255

Rep: Reputation: 23
Originally Posted by lukejgong View Post
I want to control the limit of cpu usage of the whole system to a certain percentage, similar to cap the VCPU usage of a virtual machine. Is it possible?

I use cpufrequtils to limit the speed of my CPU.

But your CPU, Bios, and Motherboard has to support CPU limiting.

The only real reason to limit the speed of your CPU is to increase battery lifetime and keep the laptop cooler.

But its at a cost of a slower machine.

These two sites will help you install and set it up:
Old 07-13-2010, 10:21 AM   #5
LQ Newbie
Registered: Jul 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the reply.

Definitely we can control the CPU usage by throttling. But throttling might not be supported for all CPUs, so I am thinking if there is any other method to limit CPU usage.

One of the cases that we may need this feature is for power management. We can limit CPU speed to control the system power. But if CPU frequency scaling is not enabled, we have to control the CPU usage of the whole system instead of each individual process.

In Xen, we can limit CPU usage of each virtual machine by capping. I am wondering if similar approach is provided in non-virtualized environment.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
processes/CPU Usage/Mem Usage desktop wallpaper ceantuco Linux - Newbie 2 04-13-2009 02:14 PM
Strange high system CPU usage in a multithreaded program Strahlemann Programming 0 09-03-2007 01:58 PM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 09:43 PM
Why do I have a High System CPU Usage Bottleneck linuxboy69 Linux - Software 3 09-02-2004 04:55 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 05:45 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:23 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration