Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running a CentOS 6 VPS with WHM/cPanel. I am trying to move some accounts, to reduce load, so I have to run /scripts/pkgacct, however the gzip and other processes run by this script cause a very high load on my server. I would like to keep load low as possible while still being able to complete this process.

share|improve this question
up vote 6 down vote accepted

You could set the nice and ionice value to a very high value. This won't lessen the load of the process but everything alse will always be prefered by the scheduler, resulting in a low performance loss.

share|improve this answer
If the command in question is already running, you can use renice -p <PID> <PRIORITY> and ionice -c <CLASS> -p <PID> to change their priorities. – Ladadadada Oct 10 '12 at 14:16

Why not use cPanel's build in load function? Just append this to your function:



/usr/local/cpanel/bin/cpuwatch 3 /scripts/pkgacct acctName

This will run /scripts/pkgacct acctName and pause the process when the CPU load reaches above 3. The process will resume when the CPU load is below 3. Run --help on cpuwatch for full help menu.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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