1

If I run a process as root on an out-of-the-box fedora machine, is there any reason for a process to not be able to use up ~80% of the cpu?

3
  • Not that I'm aware of. Can you be more specific about why you think this is the case? Dec 25, 2009 at 0:02
  • 3
    This question is far more suited for ServerFault.
    – Dav
    Dec 25, 2009 at 0:02
  • If it's a multicore machine, it can use no more than 100% of one core. So, on a 4-core machine it will be limited to 25% CPU.
    – Artelius
    Dec 25, 2009 at 0:04

3 Answers 3

4

There are several reasons why a process might not use up all of the CPU. A process may have a limitation on how much CPU it uses, such as a loop that sleeps every once in a while in order to avoid using too much CPU or battery. Or a process may be I/O bound; that is, it needs to do I/O frequently (disk I/O, network I/O, or swapping in lots of memory). A process may also be niced to be lower priority and take up less CPU when another process needs it.

1

See the ulimit command

1

Any process can use 100% CPU. Even on a multicore machine - it could spawn threads or child processes which are run on the other cores. Generally if the process is using 100% CPU, it is because it is CPU bound and must do so to complete its work. There is nothing wrong with this, unless the app is written inefficiently.

You may want to look at renice if you want the process to share the CPU more nicely with other processes.

(Hope the link is OK by you, mgb.)

1
  • Upvoted for the mention of renice. Dec 25, 2009 at 7:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .