How do you improve the speed of an Elgg site?

This questions is already asked many times in cummunity discussions.

From last 4-5 days community.elgg.org is responding very quickly and dramatically improve in TTBF which is from 2.0-3.0 sec to 0.200-0.300 sec.

So my question is that what you guys done to improve that. I am also facing slow TTFB on my elgg based website, even I am on fast vps. I tried a lot to improve this but no success.

I will really help me if some one provide any info to improve this.

FYI:- I have two websites on same server but second website is responding 5x times better then elgg with same load.

  • investigate your mysql performance for better speed improvemements... ;-)

     

  • @ghumanz - Glad you noticed because that's what I spent last weekend doing ;)

    I'll write up a blog post soon on what I changed to get better performance. First things first, you have to do some profiling to know what you need to change for your specific server. We use Cacti. It's a bit of a pain to set up, but I'll open source our custom plugins for it, too.

  • Thanks Brett to clarify things. You done a great Job to improve community performance. Now cummunity site is 10 times faster as compared to last week.

    I thing every one on community need a plugin to use cacti with elgg. Hope to get plugin for community members soon.

    Thanks a lot again. you rock again. :-)

     

  • my server itself made a world of difference... on godaddy premium shared... it sucked.. on mediatemple dv server... its almost as fast as facebook

  • @GH - you might want to check out Cacti + RRDTool in some detail running on VPS. Then maybe -- one could look at viability Elgg 'PlugIn packaging for that - to help w/ monitoriing network performance. It almost definitely will not be easy on Shared Hosting ;-( --> some necessity for SysAdm ops - that's not available for Shared.

  • We have a week of profiling going on with X-debug a.o. and like to present some results here also, as soon as we have removed our own hick-up.  Besides our own code-cleaning, it seems that MySQL tuning could give quite some benefits; the server does get quite often on 100% CPU load... just by some 'simple' queries.... we don't have the knowledge yet but we are trying to find it.

    @brett: Look forward to your post:)

  • @Brett waiting eagerly for your blog post! I'm really wondering what kind of changes you introduced for the community site - the difference is very visible. When we had performance issues with one of our sites, we implemented a lightweight, configurable bootstrap that was used for most ajax calls. It really did make a difference, especially on that particular, ajax-heavy site.

    Do you think, with all this speed gain, you could try enabling sorting and multiple filtering for the community plugins? The code is there, I know it crippled the server earlier, but maybe with all your refactorings it could work now.

     

  • Yes. Right after my rant about forking to a 1.8 standalone community site the site starting screaming. It went from intolerable, to zippy as heck. I hope this is the good sign I have been looking for and this is obviously a discussion to follow. Good luck sharing all the info on this and I would like to hear about various hosts out there as well. We are launching an extremely robust Elgg site soon.

  • We worked on some heavy optimizations for Elgg-based website for the last four months as well. We have some relatively simple solutions which improved number of supported users by 5 times. We also have a more complex solution which improves number of supported users by additional 50 times and limit page load times sometimes to 0.2 second, although last one requires some knowledge and approx. 150-200 workhours to apply to standard Elgg 1.8 website (and almost no extra work for new websites).

    We sent report about those simple modifications to core team, I hope they may appear in Elgg core at some point. At the same time we plan to launch a series of articles about optimization on http://vazco.eu . I think scaling is very important for social networks, a prove that Elgg can be fairly easy scaled to huge traffic may be a good promotion for the whole platform.

    Simple rules: 

    • use all kinds of caching where possible
    • limit SQL queries
    • use nginx
  • The best thing everyone can do is to see if the performance fixes can be build into a plugin or even better, be put on GitHub, so you can provide a pull request. This way, if it makes it to core, anyone can benefit from the performance increases. My personal opinion is that optimizing the database or server is certainly helping, but relatively the most gain is in Elgg core. Currently the Elgg 1.8 release provides for some mechanismes that should increase performance if plugins are using it correctly (JIT loaded Classes and Libraries), this mechanisme already reduced the memory footprint of default core. There are some new suggestions made by Cash and Evan for increasing performance. Both reducing the amount of queries needed for a single page by approximately 30% (sometimes more). This could be even a lot more, so share your suggestions, so we can all learn from it.

Performance and Scalability

Performance and Scalability

If you've got a need for speed, this group is for you.