Elgg performance tips~

We run a site based on Elgg 1.5, and have > 500k users, after we did those below things, it still run very fast!

1). use Memcached. (but there's a bug if you use it, and we still haven't fixed it.) 

2). convert most of Mysql tables to Innodb engine, include entities, metadata, metastrings, objects_entity, etc. (very important if your site has large data. but be careful with those tables having full text index.)

3). install an image cache server, like Squid.

4). customize Elgg if you can.

 

And here's our server's information: 

2.4GHz E5620, 16G memory. 

and we use Nginx, PHP-FPM, Mysql, Squid, Memcached, Postfix.  also include nodejs, mongodb for other services.

Mysql status:

Uptime:                 1 day 21 hours 32 min 34 sec

Threads: 12  Questions: 41501227  Slow queries: 6326  Opens: 751  Flush tables: 1  Open tables: 745  Queries per second avg: 253.127

 

And if you had elgg performance issue, we can provide professional services and advice, please contact me. :)

  • Thanks for the suggestions. I have a few comments about some of these:

    We run a site based on Elgg 1.5

    Upgrade to at least 1.7 as soon as possible. Elgg 1.5 is extremely outdated, contains many bugs, and contains many security issues!

    1). use Memcached. (but there's a bug if you use it, and we still haven't fixed it.) 

    Memcache support is experimental at best and there are significant bugs in it, especially in 1.5. It's not production ready. We've disabled it on the community site and I highly suggest *NOT* using it on a production site.

    2). convert most of Mysql tables to Innodb engine, include entities, metadata, metastrings, objects_entity, etc. (very important if your site has large data. but be careful with those tables having full text index.)

    This is a dangerous game with only a marginal payoff. Elgg's search uses full text indexes on many of the tables. The only table you can safely change to InnoDB is metastrings and metadata. I'd be interested to see the stats for performance gain by switching to InnoDB.

    3). install an image cache server, like Squid.

    This can definitely help for static images.

    4). customize Elgg if you can.

    Depending on what the customizations are, this may or may not help with performance. When you do customize Elgg, be sure to do it correctly with plugins and not by changing core or you'll have a difficult time upgrading.

    For reference, here is our MySQL stats:

    Uptime: 13 days 44 min 2 sec

    Threads: 7  Questions: 345152925  Slow queries: 5655  Opens: 200549  Flush tables: 1  Open tables: 64  Queries per second avg: 306.573

    As I said in this post, I'll be posting to blog.elgg.org with details on how we greatly improved the speed of this site with very few changes to the server.