1

Currently my company has 3 blogs and what I did was to install three instances of wordpress over Apache/MySQL, in different directories. The problem is that I have a Slicehost VPS with 256Mb RAM with Ubuntu8.04 and MySQL is crashing Linux or making it very slow and unresponsive. Is there some kind of optimal setup for this scenario? I know that my server is too cheap but I'm not sure either if an upgrade to 512 will fix things.

I'm thinking about migrating to nginx, but what about MySQL? Is there any solution to this? Is this the right site to post this question or is it serverfault?

Thanks

2
  • How much traffic? Do you have WP-SuperCache installed? How many Apache worker processes do you have?
    – ceejayoz
    Commented Jul 15, 2010 at 20:22
  • Low traffic sites actually.
    – licorna
    Commented Jul 16, 2010 at 23:15

3 Answers 3

3

Tuning a vserver takes a lot of time. Most of the time, you are playing the try & error game. And sometimes, the results are not very satisfying... But:

To tune mysql, run the tuning-primer against the mysql instance you are trying to optimize: http://www.day32.com/MySQL/tuning-primer.sh This script tells you which parameters should be changed.

If I recall correctly, there is a wordpress-mod, that uses sqlite instead of mysql, which frees lots of your precious RAM. hxxp://wordpress.org/extend/plugins/pdo-for-wordpress/

Remove all apache modules that are not in use by your applications.

Caching is always a good idea, chances are, that you will utlilize a disk cache.

Remove as many services as possible: Postfix? Not needed, take the Mailer of your ISP. Cron? It's usually a good idea to keep it. Ditching cron frees some more memory, as the scripts run by cron are no longer eating your RAM. On the other hand: you will have to rotate the logs on your own (and much more)... ssh? keep. ftp? no. use sftp (kind of ftp over ssh). It's safer and saves you RAM.

To be honest: your time and effort are most likely much more worth than an account upgrade to more RAM...

3

Wordpress MU might be overkill for just three blogs, but it will let you run everything against just one database and just one Wordpress install.

2
2

A. Apache is a memory hog. You would get a huge performance boost if you switched to nginx with PHP via fastcgi.

B. If MySQL is really your biggest problem (doubt it), you can disable InnoDB if you don't actually need InnoDB support for something else. Edit /etc/mysql/my.cnf and add a line saying "skip-innodb", then run "/etc/init.d/mysql restart". That should save you a few dozen megs of RAM.

C. You're not cheap, Slicehost are the cheapskates. Linode (main competitor) is now $19.95 for a 512 MB "slice". Yeah, and it was a free upgrade, too. http://blog.linode.com/2010/06/16/linode-turns-7-big-ram-increase/

2
  • I installed nginx with fastcgi and that did the trick. The server is working great now. Thanks
    – licorna
    Commented Jul 19, 2010 at 22:48
  • Glad to hear that helped. Also, do try out setting expire headers for static files. Will help reduce load (some), bandwidth use (maybe you care), but most importantly it'll help reduce page load time for visitors. And turn on gzip compression. The extra load (processor only, minimal w/nginx), is definitely worth it.
    – intlect
    Commented Jul 21, 2010 at 0:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.