22480 Posts in 7585 Topics by 2758 members
|Go to End|
17 August 2011 at 7:52am Last edited: 17 August 2011 9:41am
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?
Any thoughts would be really appreciated.
17 August 2011 at 6:22pm
Are you monitoring the CPU usage using top?
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?
19 August 2011 at 4:00am Last edited: 19 August 2011 4:00am
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?
Thanks again for your help on this!
30 August 2011 at 7:28pm
You shouldn't be focused on requests per second. The durations of the requests are a better indicator of server performance. Either way, 7 to 8 rps sounds normal, especially with caching enabled.
|Go to Top|