While trying to find the perfect balance to make my sites run well out of my small VPS I noticed that my CPU usage was spiking. Unlike memory issues the Virtuozzo Power Panel didn't issue a QoS alert for CPU overages. Apparently when you use too much CPU you just don't get cycles for a while. Due to the spiky nature of CPU usage you don't see the problem unless you catch it near the top of a spike.

I realized that my backup processes were helping to spike the CPU. I have a cron job to a mysql dump, and I have a remote machine regularly ssh/rsync in to copy files off. ssh and rsync use quite a bit of CPU. I should've realized that would happen, but "duhhhh". I changed all my nonessential scripts to "nice" the commands. rsync was a bit tricky to get "nice"d, but I found the answers via Googling. What's interesting is that Virtuozzo doesn't seem to count the nice'd processes against the VPS's CPU usage. They used spare host cycles apparently, and there are tons of spare host cycles. I think I actually sped my backups up with "nice".

It's tempting to try to run services nice'd, because I seem to get more "spare" cpu cycles than I get normal ones, but I have a feeling that will cause one problem or another down the line.