LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-12-2010, 12:19 PM   #1
lukejgong
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?

Thanks.
 
Old 07-12-2010, 01:11 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
That depends on whether or not your cpu supports throttling.
 
Old 07-12-2010, 01:24 PM   #3
forrestt
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
David2010
Member
 
Registered: May 2009
Posts: 255

Rep: Reputation: 23
Quote:
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?

Thanks.
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:

http://www.thinkwiki.org/wiki/How_to_use_cpufrequtils

http://wiki.archlinux.org/index.php/Cpufrequtils
 
Old 07-13-2010, 10:21 AM   #5
lukejgong
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.

Thanks.
 
  


Reply


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


All times are GMT -5. The time now is 03:15 PM.

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