Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

High CPU Usage


Go to End


4 Posts   1743 Views

Avatar
tv

Community Member, 44 Posts

17 August 2011 at 7:52am

Edited: 17/08/2011 9:41am

Hi,

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.

Avatar
Ryan M.

Community Member, 309 Posts

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?

Avatar
tv

Community Member, 44 Posts

19 August 2011 at 4:00am

Edited: 19/08/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!

Avatar
Ryan M.

Community Member, 309 Posts

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.