BackupExec 2012 – How to Limit CPU Usage and Disk I/O on RALUS with Cron Jobs

Backup Exec on Linux, otherwise known as RALUS, is great but it has no provisions for limiting it’s disk I/O or CPU usage during different periods of the day. Unfortunately, BE for Windows doesn’t have that option either, so get on it Symantec, nudge, nudge.

If you’re like me, you might have backup jobs on File Servers that span several terabytes worth of data that can essentially run for a day or two on their own. The problem is that people get really bitchy when things don’t run at the normal speed that they are used to and the inconsiderate assholes don’t give a shit when you explain why.

Well here are a few cron job tasks that I came up with to help relieve some of that pressure on your file server.

This will change Backup Exec’s niceness level to the lowest priority to limit CPU usage on weekdays, starting at 5:59AM. As a side note, I am extremely curious to know the answer to this hypothetical question: If you were to set the niceness level to 20, would that basically halt or pause the backup job from running during those hours since it would allow 0 CPU usage but not cause the job to fail altogether? If so, I could see some cases where that would be highly beneficial to some and it is definitely worth some investigation.

59      5       *       *       1-5     $( renice -n 19 -p $( pgrep beremote ) ) > /dev/null 2&>1

This will set Backup Exec’s niceness level back to normal for the rest of the week, starting at 6:59PM.

59      18      *       *       1-5     $( renice -n 0 -p $( pgrep beremote ) ) > /dev/null 2&>1

This magnificent piece of sorcery lowers the disk I/O priority to idle for Backup Exec and all of it’s child processes during weekdays, starting at 5:59AM.

59 5 * * 1-5 $( for pid in $( ls /proc/$( pgrep beremote )/task ); do ionice -p $pid -c 3; done ) > /dev/null 2&>1

This will set the disk I/O priority for Backup Exec and all it’s child processes back to normal for the rest of the week, starting at 6:59PM.

59 18 * * 1-5 $( for pid in $( ls /proc/$( pgrep beremote )/task ); do ionice -p $pid -c 2 -n 4; done ) > /dev/null 2&>1

If you truly want to throttle a process by specifying it’s upper level of bandwidth throughput, you should search online for cgroup’s in Linux.

Leave a Reply