[MITgcm-devel] "nice" levels and CPU speed on Linux laptops
Ed Hill
ed at eh3.com
Thu Aug 4 11:58:54 EDT 2005
Hi folks,
For those of us using laptops and running recent Linux versions (eg.
Fedora Core 2, 3, & 4) I've noticed an interesting set of circumstances
that you might want to be aware of:
If you "nice" your processes, you may see a *SIGNIFICANT*
slowdown!
Why? Well, recent (2.6.x) Linux kernels support SpeedStep and other
dynamic CPU clock frequency adjustment schemes. And they are tied to
how "busy" your processor is -- which is in turn scaled by the process
"nice" levels. So when running processes that have been "nice"-ed my
laptop reports:
$ renice +19 29070
...wait 15--30 seconds...
$ cat /proc/cpuinfo | grep '^cpu MHz'
$ cpu MHz : 599.627
and when running the exact same process (here, its doing APE data post-
processing in MatLAB) at the "normal" nice level:
$ renice +0 29070
...wait 15--30 seconds...
$ cat /proc/cpuinfo | grep '^cpu MHz'
$ cpu MHz : 1798.883
I get the full CPU speed.
This is a neat feature designed to save battery power on laptops. But
it can be a bit of a surprise when your analysis runs up to 3X slower
than you expected and you've done nothing other than "nice"-ed it to get
some other work done.
Ed
--
Edward H. Hill III, PhD
office: MIT Dept. of EAPS; Rm 54-1424; 77 Massachusetts Ave.
Cambridge, MA 02139-4307
emails: eh3 at mit.edu ed at eh3.com
URLs: http://web.mit.edu/eh3/ http://eh3.com/
phone: 617-253-0098
fax: 617-253-4464
More information about the MITgcm-devel
mailing list