Jump to:

23491 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » High CPU Usage

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

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

Page: 1
Go to End
Author Topic: 1199 Views
  • tv
    Avatar
    Community Member
    43 Posts

    High CPU Usage Link to this post

    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.

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: High CPU Usage Link to this post

    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?

  • tv
    Avatar
    Community Member
    43 Posts

    Re: High CPU Usage Link to this post

    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!

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: High CPU Usage Link to this post

    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.

    1199 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.