"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?
|