ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

High server load

October 17, 2011 9:36am

Subscribe [4]
  • #1 / Oct 17, 2011 9:36am

    prokoudine

    12 posts

    Hi,

    I’m trying to get to the bottom of a particularly nasty issue.

    We have an account on shared hosting that has EE 2.2.2 running along few instances of a lightweight CMS (PHP-Fusion) that we are planning to subsitute with a single EE installation some time later.

    The hoster sets a limit for server load for shared hosting as 50. We only started tracking the server load a few weeks ago (that was foolish, I know), shortly before moving online installation of EE to production.

    The problem is that server load for the account never goes below 64, is mostly around 80, while amount of non-critical server overload warnings is between 77 and 110. Needless to say, the hoster isn’t quite happy about that.

    The overal amount of page views for the account is rather small right now - between 6K and 10K a day. The site running EE takes ca. 1/4 of that. That’s way too low to result in such a drama 😊

    I’ve already gone through all articles on optimization of EE I could find, customized the instance as much as possible, deinstalled all EE plug-ins we don’t really use, tuned up caching (while, admittedly, enabling gzip compression), but the performance is still far from what it should be like (as far as I can tell).

    When I log in via ssh and look at top output, then start loading pages on EE powered site, I see httpd processes %CPU bumping to 10-14% every time I load a new page. Doing the same on a local machine running Apache2 results in similar bumps of its process. For the other CMS installation it’s never higher than 1-2%.

    Hence the questions:

    1. Is this kind of CPU use normal for EE2?
    2. If it is, what can I do apart from moving to VPS?
    3. If it isn’t, what should I be looking for to figure out why it happens?

    P.S. Here is the list of currently enabled 3rd party modules: AJW DataGrab, Bjorn’s bitly, SEO Lite, Low Nospam, Tagger, teemthumb, woothemes_cp, wygwam.

  • #2 / Oct 18, 2011 10:09am

    Mark Bowen

    12637 posts

    Hi prokoudine,

    Hi,

    I’m trying to get to the bottom of a particularly nasty issue.

    We have an account on shared hosting that has EE 2.2.2 running along few instances of a lightweight CMS (PHP-Fusion) that we are planning to subsitute with a single EE installation some time later.

    Can I ask what you mean by “running along few instances of”? Have you modified ExpressionEngine in some way in order for it to work with this other CMS or did you possibly mean something else here?

    The hoster sets a limit for server load for shared hosting as 50. We only started tracking the server load a few weeks ago (that was foolish, I know), shortly before moving online installation of EE to production.

    Unfortunately I’m not too sure what your hoster means by 50. Is there any other information / description other than 50 as I’m not sure what that relates to here?

    The problem is that server load for the account never goes below 64, is mostly around 80, while amount of non-critical server overload warnings is between 77 and 110. Needless to say, the hoster isn’t quite happy about that.

    The overal amount of page views for the account is rather small right now - between 6K and 10K a day. The site running EE takes ca. 1/4 of that. That’s way too low to result in such a drama 😊

    Is this is a shared hosting environment you are on? 6K-10K page views a day is actually a fair amount and if on a shared server could possibly be getting hit by the limits set there.

    I’ve already gone through all articles on optimization of EE I could find, customized the instance as much as possible, deinstalled all EE plug-ins we don’t really use, tuned up caching (while, admittedly, enabling gzip compression), but the performance is still far from what it should be like (as far as I can tell).

    Above you had said :

    The site running EE takes ca. 1/4 of that. That’s way too low to result in such a drama…

    Sorry but I had taken that to mean that ExpressionEngine was actually running quite well here?

    When I log in via ssh and look at top output, then start loading pages on EE powered site, I see httpd processes %CPU bumping to 10-14% every time I load a new page. Doing the same on a local machine running Apache2 results in similar bumps of its process. For the other CMS installation it’s never higher than 1-2%.

    Have you turned on Admin > System Administration > Output and Debugging > Display Output Profiler? to see what ExpressionEngine is reporting as its usage for these pages?

    That may help to see what is causing this here.

    Hence the questions:

    1. Is this kind of CPU use normal for EE2?
    2. If it is, what can I do apart from moving to VPS?
    3. If it isn’t, what should I be looking for to figure out why it happens?

    Unfortunately giving support on server related issues is really beyond the scope of our support here and if you have ensured that your pages are as lean as possible then you may like to look at hiring someone to look into your site for you professionally.

    Mark

  • #3 / Oct 18, 2011 11:31am

    prokoudine

    12 posts

    Hi prokoudine,
    Can I ask what you mean by “running along few instances of”? Have you modified ExpressionEngine in some way in order for it to work with this other CMS or did you possibly mean something else here?

    It means that there is another lightweight CMS working on this account all by itself. It doesn’t talk to EE, nor EE talks to it. They coexist 😊

    Unfortunately I’m not too sure what your hoster means by 50. Is there any other information / description other than 50 as I’m not sure what that relates to here?

    Sorry. It’s about static CPU load, but the hoster doesn’t explain in details how they count it. I can specifically ask about it, if it helps.

    Is this is a shared hosting environment you are on?

    Yes, that’s what I said 😊

    6K-10K page views a day is actually a fair amount and if on a shared server could possibly be getting hit by the limits set there.

    Don’t get me wrong, but I’ve been using that account for nearly 6 years now, been through that (relatively small) amount of hits before and I don’t think I can easily recall a single 503 error. Which is now what I get every day. Besides, like I said, the site that runs EE gets no more than 2.5K hits daily so far.

    Have you turned on Admin > System Administration > Output and Debugging > Display Output Profiler? to see what ExpressionEngine is reporting as its usage for these pages? That may help to see what is causing this here.

    Yes, that’s the first thing I did. No db query is higher than 0.00, so I guess I’m safe there. Either way, “Cache Dynamic Channel Queries” option is enabled, and it seems to cut up to 50% of queries (in general it’s between 50 and 80 in the end, with few bumps of a little over 100, presumably, when cache expires).

    There are some small memory bumps in the template debugging section like here:

    (0.018055 / 4.37MB)    Including Files for Plugins and Modules
    (0.038311 / 5.90MB)    Files for Plugins and Modules All Included

    or here:

    (0.033904 / 5.91MB)    -> Class Called: Channel
    (0.033993 / 5.91MB)    -> Method Called: entries
    (0.068095 / 7.39MB)    -> Data Returned
    (0.068154 / 7.39MB)    Calling Class/Method: Channel/entries

    But I’m not sure if it’s related at all.

    Unfortunately giving support on server related issues is really beyond the scope of our support here and if you have ensured that your pages are as lean as possible then you may like to look at hiring someone to look into your site for you professionally.

    Sure, I don’t expect you to do the job of my hoster’s support service 😊, and yes, it’s probably apples and oranges, but when two CMSs coexist on one account, and the one with 4-5 times bigger db serves dynamic content with 10 times smaller peak CPU use, I’m naturally getting suspicious 😊 I do understand all the limitations of shared hosting, but before I go for VPS I’d really like to make sure that there is no simple and obvious solution I’ve overlooked 😊 Apart from Solpace Static Page Caching, of course.

  • #4 / Oct 19, 2011 10:29am

    Mark Bowen

    12637 posts

    Hi prokoudine,

    Unfortunately this is going to go out of the scope of support here.

    I’d suggest maybe hiring someone to take a look at all of this for you. I can’t comment on different systems as they all work in very different ways. I’ve seen some systems that fly like the wind in certain places and are as slow as a snail in others. It can sometimes be a bit of a swings and roundabouts affair I’m afraid although hiring someone professional to look at this for you might be your best bet.

    I’m going to move this thread over to the Community Help forums for you so that maybe other users can lend a hand here with this.

    Cheers,

    Mark

  • #5 / Oct 19, 2011 10:57am

    glenndavisgroup

    436 posts

    Hi prokoudine,

    Many hosts claim they don’t over load their servers but it still happens. Not to pick on them but GoDaddy is a perfect example. A few questions:

    1) Are you hosting on linux or windows?
    2) If on linux are you able to run simple linux commands via ssh?

    Mike

  • #6 / Oct 20, 2011 6:49am

    prokoudine

    12 posts

    Hi prokoudine,

    Many hosts claim they don’t over load their servers but it still happens. Not to pick on them but GoDaddy is a perfect example. A few questions:

    1) Are you hosting on linux or windows?
    2) If on linux are you able to run simple linux commands via ssh?

    Mike

    Hi Mike,

    The host is running Linux, and yes — logging via ssh is possible. It’s how I was able to determine that EE’s process makes a large-ish %CPU bump on each pageview: I logged in and ran the top command from console.

    I know that there are all kinds of factors that affect performance, but I need more experience to know exactly how each of them contributes to this or that. Hence any advice is highly appreciated 😊

  • #7 / Oct 20, 2011 11:35am

    glenndavisgroup

    436 posts

    Does this happen all the time or is it random?

  • #8 / Oct 20, 2011 5:58pm

    prokoudine

    12 posts

    Does this happen all the time or is it random?

    Yes, all the time. And I get pretty much same picture on the local installation (my desktop).

  • #9 / Nov 13, 2011 2:27pm

    prokoudine

    12 posts

    Just a follow-up. A 1+ week ago I moved to a server with guaranteed low amount of accounts (10 to 20). I don’t see the 503 error anymore, but the server load is still the same.

  • #10 / Nov 13, 2011 7:23pm

    handyman

    509 posts

    Think about it logically and work backwards - that’s my advice!

    Take a known value - for instance, mine.
    I’m running a mid to lower level dedicated server with a quad core 2.5 Xeon and 4 Gigs. I have another CMS or two running, as well as some straight HTML and other stuff - Gallery, etc. - but EE is 90% of the load.

    As I write this the server load is less than 1.0 - about .7
    It has never gone up past about 1.2 - and, if I understand correctly, since I have a 4 core CPU a value of 4 would be no waiting involved.

    EE shows about 500 people in the system at this moment - using their stats, which may be within a 20 minute period or something like that.
    Pageviews are about 100,000 on a busy day - but 10,000 in a peak hour, which probably relates more…...

    Obviously this is very rough calculating, but working backwards…

    1. I am confident my server could handle double the load without burping - so 20,000 pages in an hour….or 200,000 over a 24 hours (ups and downs).
    2. If I were on a shared hosting - and all other accounts used the same approx amount - then 20 accounts could be on the server and still each could server 10,000 pages per day with little problem.

    Of course, you have too many unknown variables to guess what the exact problems is. Some hosts have 50-100 or more accounts on one server. We are not sure of the server…or of the memory allocated to php, etc.

    One thing for sure - I noticed this on my old server which was way overloaded with the same EE setup…..the server matters. The last one was also dedicated, but was a dual 3.0 Pentium. The Xeon made a vast difference. Also, what I noticed on the last one was that once a server is overloads - that is, when the load gets high, the server breaks apart really quickly. So a load of 50 (with the Top command) does not mean the server has 10X the load it has with a 5. Once the wait backs up, all bets are off because of RAM and other processes having to be called.

    I did lots of optimizing, but in the end that only saved small percentages…..it took the Xeon and more RAM to really end the bottlenecks.

    Just for fun, what happens if you turn EE off for a minute and check the server load? If EE is making it high. then it should go right down…almost instantly. Also the same applies if you try it at a time of day when your web site has few users…the load should be way down…...

    Depending on the reputation and practices of the host, even the guarantee of less accounts may not mean much. Those are their servers, and we have no way of knowing if they are using other processes for their internal stuff…..or exactly what the others who share the server with you are doing.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases