LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-10-2010, 07:49 PM   #1
rbpember
LQ Newbie
 
Registered: Sep 2010
Posts: 8

Rep: Reputation: 0
"nice" causing increased CPU time even in the absence of a load


I've just noticed that "nicing" long running computationally intensive, I/O unintensive, single-threaded executables on my system increases the CPU run time of those executables (as reported by /usr/bin/time as well as by wall clock) by a factor of 2-3 even in the absence of any load, i.e., "top" tells me that my program is getting 100% of a CPU. For example:

--------------------
%coot 248: /usr/bin/time -p ./a.out > out
real 97.47
user 85.64
sys 0.94
%coot 249: nice +4 /usr/bin/time -p ./a.out > out
real 248.31
user 231.94
sys 1.68
%coot 250:
----------------------

My system is running Ubuntu 7.10. If I run the same executable on two other machines I have access to -- one running Fedora 5 and the other Ubuntu 9.10 -- I don't see any discrepancy between the runtimes using nice and not using nice.

This behavior is executable independent, compiler dependent, and language dependent -- I'm seeing it across the board. I'm assuming I've somehow configured my system to behave this way, but I have no idea what I may have done. Also, this was the first time I'd ever done timing runs with "nice" (actually, "at"), so I'm not sure how long my system's been configured (if configured is the right word) this way.


Any suggestions?
 
Old 09-10-2010, 09:31 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
What kernels are all these machines running? Specifically which are before and which are after 2.6.23, when the CFS was introduced?
 
Old 09-13-2010, 06:14 PM   #3
rbpember
LQ Newbie
 
Registered: Sep 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Ubuntu 7.10: 2.6.22-16-generic
Ubuntu 10.04: 2.6.32-24-generic
Fedora 5: 2.6.20-1.2320.fc5
 
Old 09-13-2010, 06:35 PM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Edit: sorry, misread. Useless post.
 
Old 09-13-2010, 06:39 PM   #5
rbpember
LQ Newbie
 
Registered: Sep 2010
Posts: 8

Original Poster
Rep: Reputation: 0
The solution via a another forum is

sudo /etc/init.d/powernowd stop
 
Old 09-13-2010, 06:42 PM   #6
rbpember
LQ Newbie
 
Registered: Sep 2010
Posts: 8

Original Poster
Rep: Reputation: 0
> What kernels are all these machines running? Specifically which are
> before and which are after 2.6.23, when the CFS was introduced?

Here are the kernels:

Ubuntu 7.10 system: 2.6.22-16-generic
Ubuntu 10.04 system: 2.6.32-24-generic
Fedora 5 system: 2.6.20-1.2320.fc5
 
Old 09-13-2010, 06:57 PM   #7
rbpember
LQ Newbie
 
Registered: Sep 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Here's the link to the page where I found my solution:

http://ubuntuforums.org/showthread.php?t=762842
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Measure "CPU load" and "memory consumption" of a process DaneelGiskard Programming 3 08-30-2007 11:43 AM
Generate alert with "CPU load average" "CPU utilization" viky Linux - Hardware 3 07-25-2007 04:24 AM
Alert used "cpu load" and "cpu utilization" viky General 0 07-23-2007 03:19 AM
Could someone explain "nice time"? spaaarky21 Linux - General 12 11-22-2005 01:14 AM
"User" & "System" CPU load difference JJX Linux - General 3 06-06-2004 01:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:49 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
Open Source Consulting | Domain Registration