I've been struggling with cpbackup putting too much stress on the server (disk latency peaks, high CPU load and http load time peaks of multiple seconds, sometimes more than 10 seconds for a very short period of time) during backups. Tried all kinds of optimizations but nothing really worked. Pigz (cPanel 11.38) reduced the time for the backups to complete a bit, but the peaks stayed just as high.
Judging from the Munin-graphs, the disk utilization (peaking regularly at 100% during backups, especially for extremely large accounts) seemed to be the evildoer.
As I'm running the CloudLinux kernel (which I really like anyway) I got the idea to use its command line LVE-wrapper (Lightweight Virtual Environment) to wrap the cpbackup root process into an LVE, and then try to use the I/O throttling option of CloudLinux to moderate the disk I/O to more friendly values.
It took a bit of experimenting, but it works really well!
Average CPU load during backups dropped from 2 to less than 1. Even better is the reduction of the peak CPU load: from 6 down to 1 (practically no CPU peaks during backups)

An important real life test of course is the http loadtime. Loadtime during backups was reduced from 0.5 seconds average and more than 3 seconds peak to 0.15 seconds average and 0.5 seconds peak.

First days in the graphs show the 'old' situation, then I started experimenting with the LVE-wrapper parameters (resulting in varying values), and last night seems to be the winning configuration. The peak values were read from the graphs, but actual peaks can be much higher (but too short duration for Munin to register)
Overall, the server felt almost as responsive during backups as during daytime, which is a big win.
I'm sure some greater gains can be achieved by finetuning the LVE wrapper parameters some more but for now I'm happy with the results.
For reference some info on this server:
4 cores, 4GB memory, cPanel 11.38, CloudLinux 5 hybrid. Hosting a lot of large (4-16GB) accounts. Daily full backups over FTP to backup server.
I do understand this is the cPanel forum and most people are not running the CloudLinux kernel, but I hope some CloudLinux users could benefit from my experiences (or even better, convert your CentOS installation to CloudLinux :D )
crontab for lve wrapping:
my current configuration
this last line basically says: limit the disk I/O for the cpbackup process (50) to 6000kB/sec.
Judging from the Munin-graphs, the disk utilization (peaking regularly at 100% during backups, especially for extremely large accounts) seemed to be the evildoer.
As I'm running the CloudLinux kernel (which I really like anyway) I got the idea to use its command line LVE-wrapper (Lightweight Virtual Environment) to wrap the cpbackup root process into an LVE, and then try to use the I/O throttling option of CloudLinux to moderate the disk I/O to more friendly values.
It took a bit of experimenting, but it works really well!
Average CPU load during backups dropped from 2 to less than 1. Even better is the reduction of the peak CPU load: from 6 down to 1 (practically no CPU peaks during backups)

An important real life test of course is the http loadtime. Loadtime during backups was reduced from 0.5 seconds average and more than 3 seconds peak to 0.15 seconds average and 0.5 seconds peak.

First days in the graphs show the 'old' situation, then I started experimenting with the LVE-wrapper parameters (resulting in varying values), and last night seems to be the winning configuration. The peak values were read from the graphs, but actual peaks can be much higher (but too short duration for Munin to register)
Overall, the server felt almost as responsive during backups as during daytime, which is a big win.
I'm sure some greater gains can be achieved by finetuning the LVE wrapper parameters some more but for now I'm happy with the results.
For reference some info on this server:
4 cores, 4GB memory, cPanel 11.38, CloudLinux 5 hybrid. Hosting a lot of large (4-16GB) accounts. Daily full backups over FTP to backup server.
I do understand this is the cPanel forum and most people are not running the CloudLinux kernel, but I hope some CloudLinux users could benefit from my experiences (or even better, convert your CentOS installation to CloudLinux :D )
crontab for lve wrapping:
Code:
lve_suwrapper 50 /usr/local/cpanel/scripts/cpbackup
Code:
lvectl set 50 --ncpu=100 --cpu=75 --io=6000
Last edited: