Server performance trouble on small VPS: advice needed!

I moved my site from a shared server to VPS yesterday, because the shared server performance (mysql) was causing a lot of trouble. Basically, my site was most of the time quite slow.

Unfortunately, the performance has not improved on VPS... not at all! It takes very long until pages are loaded completely, i.e. widgets' content is built up. Even with not many users online (1 or 2) it already is a severe problem.

I think the default mysql config set up by my hoster is the main problem (actually my.cnf is almost empty), maybe also apache config. The VPS package has 1 CPU core and 512 MB RAM.

May I ask for advice regarding performance tuning of mysql? What config settings might be most promising to include to my.cnf, what settings (mysql, apache) should I check first?

I would also be interested in your my.cnf as an example. Please... any advice urgently needed!

  • Elgg currently uses lazy loading of widgets. That greatly increases the load on a server. Removing that will create a greater performance increase than any tweaking of the server's configuration.

    Also, before tweaking configuration parameters you need to know whether the issue is RAM or CPU.

  • If I understand you correctly, the lazy loading of widgets will only be removed with a later Elgg version. Am I right? Btw. still using Elgg 1.6.2...

    Currently, I'm trying to figure out if it's mainly a RAM or CPU issue.

    My current problem is that my hoster configured mysql with more or less an empty my.cnf:


    That's all. I don't know, if any parameters have been modified with mysql statements (I doubt it). So maybe some basic tweaking of my.cnf will already help at least to make the site useable.

    It might help me to have a my.cnf used in a similar Elgg installation (VPS, 1 CPU, 512 MB RAM). I believe I will have a long way to go nonetheless, but it seems to me that currently the buffer sizes might not fit at all and possibly no caching mechanisms (queries, threads, ... what else?) are in use.

  • @cash I read somewhere about the use of the innodb for some tables in the database will increase the performance ? 

  • @iionly - Yes, lazy loading will be removed but probably not until 1.8.

    @elHayaze - The benchmarking I've done with the community database shows extremely marginal differences between innodb and myisam for Elgg.  That said, if it makes a difference for you, definitely use it!  Be careful, though--innodb doesn't support fulltext indexing, so you can't convert tables that have a fulltext index or search will break.

  • Funny... or not(!)... Even on a VPS not all problems are "virtual". The Hoster upgraded the physical server from 4 GB to 16 GB memory and performance improved. It seems I was not the only one who complaint as I got two replies on my support ticket - one not addressed to me.

    But I'm still very interested in all input regarding mysql configuration. While overall performance improved noticeable (pages as such are displayed faster), pages with a lot of widgets like Profiles and Dashboard still hang sometimes. I guess this is the "lazy widgets" phenomenon. :)

    I hope this might be fixable with tweaking mysql settings. Any advice welcome. What could be the most promising starting point?

  • I am just going to point out Something I have recently found out.. As maybe everyone might know when it comes to SE Rankings and SEO even in it will show you if your site is loading Slower then a High percent of other sites or if it is of average speed. Some sites say fast and those are the highest ranked ones. Speed is one big factor with SEO and it can make or break your site if you are like me and trying to create a large community online. Any type of Speed and Loading enhancements that I can learn and hear about I am open to everything problem is I do not know how to do just about everything that you are all talking about above. I am still on GoDaddy grid hosting and soon I might need to upgrade to a VPS or even better. Issue is the cost involved since running a site like this is almost Non Profit forget about the Google Adsense the only other way I can recover some of the costs is by selling Text Link Advertising and so far I have made some of the cost back in just a month or so. I won't promote who is use to make money with Elgg but if anyone is interested I can share the Link and it is free of course. They only accept sites that have a Google Page Rank of atleast 3 I think or maybe 2. So be advised must be an established site with decent traffic. But it can do a hell of a lot better then Google Adsense can.

    VPS I have priced out already at $60 to $100+ Per Month... Over $600 a YEAR for running a busy Elgg site. Maybe Elgg should think about Selling VPS Account space?

  • Ok one more thing......... STATUSNET Vs ELGG

    STATUSNET I first ran this and once I had a MySQL database of users and all of around 100 MEGS the site got so slow it would take 5 minutes for a page to load! So far with ELGG even after a MASSIVE SPAM BOT ATTACK with over 4,500 or so Spam Auto Generated Accounts from someone the site is still runing decent. I wanted to just point this out.

  • Try to reduce http requests and css images which takes long time to load. I feel this is the main problem of elgg. check your website speed,size,http requests,java scripts and images by using 

Performance and Scalability

Performance and Scalability

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