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.

Need help with a heavy traffic site

February 05, 2014 6:45pm

Subscribe [3]
  • #1 / Feb 05, 2014 6:45pm

    Dovla

    36 posts

    I’m currently running an EE installation on a website that gets anything between 15-25k visits per day.

    The main problem I have is the fact that the dedicated server my client has offers very little in terms of support.

    So far the site is stable but there are some peak times when everything slows down to a crawl. It is insanely fast whenever there is less than 300 users at a time but as soon as there’s around 500-600 it’s super slow

    The hosting is free and given as a favor and they cannot help much, they have given us full access though and I have another person trying to sort it out

    what can I do to minimize the page load?

    I’ve already done the standard minifying, gzipping, expires headers etc. I’m using stash for all the pages but I have yet to properly sort out caching, this is my no1 priority as I assume it makes the biggest difference

    the server is a quad core xeon 2.4 GHz and it has 16gb of ram. Should this be enough?

    How can I find potential bottlenecks and what should I investigate first? How can I find out if EE is using all the resources that are available (I’ve been told that’s currently not the case)

    I thought about subscribing to an Ellislab support plan but I’ve seen in the FAQ that they don’t offer this kind of help. It’s a shame really because I would gladly pay for it.

    Forgot to add that I’m running the latest EE version 2.7.3

  • #2 / Feb 06, 2014 1:08pm

    Shane Woodward

    2 posts

    It’s a little hard to judge without knowing more about the site, and what nature of “slowdowns” you’re experiencing.

    For example, if during page load the site responds fairly quickly but loading page resources (images, etc) takes a long time, then you’re probably dealing with ordinary throughput issues, and no amount of server-side caching is going to make a huge difference. If this is the case, you’re already heading down the right path with optimization and client side caching.

    If, on the other hand, you find that the site is particularly responding before page load (crunching tags/templates and spitting out a response), then you definitely want to look at server-side caching, and limiting the amount of query overhead wherever you can.

    Start by giving your templates a once-over, and make liberal use of the disable parameter wherever you can. It might not seem like much when looking at a single channel entries tag pair, but when you look at the number of tag pairs that are being parsed on a single page, multiplied by the number of active users, it can easy add up.

    Another thing I see people doing fairly often (as a shortcut) is filtering entries using conditionals inside a loop, instead of as part of the loop.

    {exp:channel:entries channel="some_channel"}
     {if some_conditional}
      Do something
     {/if}
    {/exp:channel:entries}

    In the example above, that channel entries tag is going to loop through every entry in the channel, but then only display content that matches the conditional. In terms of query overhead, it might be more efficient to try to exclude as many entries as you can up front. Some of this can be done using standard parameters, but in more obscure cases, it might be better to use the Query module, or AB Entry IDs in conjunction with your channel entries tag to exclude as many entries as possible from the loop.

    Another thing to look for is large blocks of content inside native EE conditionals. Because of EE’s parsing order, all of the content inside of the conditionals often gets parsed before the conditional itself, and then dropped afterwards. I common example of this is when developers try to use a single template to render different content based on url segment conditionals.

    {if segment_2 == ""}
     Feed code here
    {if:elseif segment_2 == "category"}
     Category feed code here
    {if:else}
     Single entry code here
    {/if}

    For big block conditionals like this, I recommend the use of Switchee. The addon description explains it fairly well.

    As far as caching goes, EE’s native template caching is decent, though not always the best option depending on the nature of your content. I strongly recommend you check out CE Cache.

    Typically I don’t cache an entire template with it, but pick and choose areas that I know will cause a significant amount of overhead. Use the global=“yes” parameter as much as you can for things like sidebar feeds that are common on multiple pages.

    Let me know if you have any questions about the above. If you’re willing to share a link to the site, or an example of a template that’s particularly slow, we might be able to narrow it down a little better for you.

  • #3 / Feb 07, 2014 4:01am

    franz

    8 posts

    Hi Dovla,

    What kind of site is that? Would you mind posting a link?
    - I’ve also been trying various ways to speed up EE. Here’s something that may be useful: http://www.causingeffect.com/software/expressionengine/ce-cache/user-guide/static

    It generates static HTML. Of course this plugin is not suitable for every type of site but it will definately reduce server load and speed up load time.

  • #4 / Feb 07, 2014 6:35am

    Dovla

    36 posts

    thanks guys! This was more than enough info needed to sort things out.

    I purchased CE cache and set it up on the site and saw a pretty big decrease in the number of queries. I initially wanted to use stash caching but being relatively new to stash I ran into some problems. Time being a factor I just purchased CE cache instead and it was super simple to use. I’m currently waiting for the host to either set up APC or memcache but I’ve also put the static cache driver to use on the front page.

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

ExpressionEngine News!

#eecms, #events, #releases