I am new to server optimization and was wondering if anyone could help.
I have a Silverstripe site in staging on a MediaTemple dv 3.5 remote server. Whenever I do a ?flush=1 my CPU usage spikes to 100%. Is this normal?
I also noticed that when I visit certain pages on my site, I am getting CPU usage in the range of 20%. Is this normal and when the site goes live and has many visitors, will the CPU usage grow exponentially and crash the server?
Depending on how large your site is, flushing the cache can take up considerable CPU resources because it's rebuilding everything.
I wouldn't be worried about this, however 100% does sound pretty hefty so there might be some inefficiencies in your code.
Certain pages might produce a spike if you're in dev mode and have the cache set to flush on every page load. Other than that, I can only think of inefficient code.
Are you using any performance monitoring solution or service, like New Relic or SIlverStripe Dawn?
Thanks for the tips Ryan. I'll look into the monitoring services and look into my code. This is only my second Silverstripe site, so inefficiency definitely isn't out of the question!
I also have been doing some benchmark tests and have noticed that my pages are only getting about 7 to 8 requests per second. With partial cacheing enabled and with APC installed ( I have SS set up to you use APC memory for the partial cacheing), does this number seem low to you? I think I mentioned I'm on a Media Temple dv 3.5 with 1GB of RAM.
On a site that averages around 10,000 page views a day and 30,000 to 40,000 hits per day is my requests per second too low?