How to Reduce load of backup scripts with nice

Valic —  October 30, 2011 — Leave a comment

Running a backup script on a server system as a webhosting server can produce high load and longer latencys for other processes  or php pages load slow during backup because the backup script takes too much  CPU resources.

On Linux systems there are many utilities available for the programming to set the CPU for a appliaction or a script.

In this tutorial we will use nice.

To reduce the CPU priority, use the following command:

/usr/bin/nice -n 19 /location/of/your/script/backup.sh

The -n parameter can be in the range from -20 to 19.  Lower numbers means higher priority.

 

Valic

Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

No Comments

Be the first to start the conversation.

Leave a Reply