3

I've noticed my computer gets sluggish when the load increases past 1 (ie, the first number after "load average:" from the "uptime" command).

Heavy-duty processes (like rsync) often raise the load above 1, even if I renice them lowest priority (+19). Renicing them helps a little, but not a lot.

Can I tell nice (or another program) to completely stop (kill -STOP) any +19 processes when the load increases over 1 (and resume when the load decreases to .75 or something)?

migrated from stackoverflow.com Oct 21 '11 at 16:43

This question came from our site for professional and enthusiast programmers.

  • load average doesn't mean particularly much... it's just the number of processes actively running in specific time intervals. A load of 1.0 doesn't mean the system's fully busy, just that there's at least 1 process running at all times. It could be 20 processes each running for 5% of the time. – Marc B Oct 21 '11 at 16:15
  • Oh, I know. I've seen load average go to 120 once (the system was completely unresponsive). Someone once told me this number indicated percentage of CPU used (with 120% possible because Unix fudges this the same way they fudge in "df"), but I now think that's not true. I've just personally noticed that my system gets sluggish when the load average goes to 1.50, for example. – barrycarter Oct 21 '11 at 16:48
1

FreeBSD has IDLE process class - see rtprio(1) manual page - so you can assign IDLE priority to rsync so it won't get timeslices when there are normal processes active.

http://www.freebsd.org/cgi/man.cgi?query=rtprio&apropos=0&sektion=0&manpath=FreeBSD+8.2-RELEASE&arch=default&format=html

Linux has ionice(1) for CFQ io scheduler: http://linux.die.net/man/1/ionice Very similar concept, but for I/O.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.