1

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.

2 Answers 2

5

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.

1
  • 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, 2012 at 14:16
1

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

/usr/local/cpanel/bin/cpuwatch

Example:

/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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .