Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking at using Linode at a VPS host for a PHP Webapp. Linode offers a variety of Linux distros. I'm basically after a config that will absolutely minimize memory usage while still keeping the site performant. So how should I configure it?

  • I've heard nginx has a smaller footprint (and is often faster) than Apache;
  • I want some form of opcode cache, be it APC, eAccelerator, Zend, XCache or something else;
  • I'll be running MySQL 5;
  • Suggested distro? I've heard Arch Linux is fairly barebones (I'm used to Ubuntu);
  • I'm using GMail for the domain email so need nothing there;
  • Linode seems to offer a DNS service separately (for free) so I won't need to run DNS servers will I?
  • Anything else I can do to keep memory usage low?
share|improve this question
If Linode offers a DNS service, you won't need to run a DNS server (and even if they don't, many domain registrars will let you set up DNS records with them). – David Z May 9 '09 at 0:13
What kind of traffic do you expect to be getting? – Ryan Guest May 9 '09 at 2:03

PHP is not very memory intensive, so I don't think you should worry too much about memory usage, unless your app needs it, in which case the memory footprint of PHP won't be too significant.

Perhaps you could look more into optimizing MySQL.

Could you tell us what kind of web app you'll be running? In the meantime, if you really want to squeeze out as much performance as possible, here are some resources:

share|improve this answer

I would definitely use a single-process web server (nginx or lighttpd) and use PHP via FastCGI. At all costs avoid Apache + mod_php as this will result in all Apache worker processes carrying the PHP overhead (and consuming lots of memory even if they then mostly just service static content).

If you are used to Ubuntu, then keep using it (as it's based on Debian, it is very flexible and you can install only those packages you really need).

share|improve this answer
I've switched to lighttpd w/ FastCGI and initially I'm pleased. If you use apache-specific modules, you will need to figure out the lighttpd analogs. Unfortunately there is no subversion module (that I'm aware of), so you'll need to use svnserve in that case. – Adam Plumb May 11 '09 at 20:42

I was running (now using nginx with html only site) nginx,php/FastCGI, xcache and mysql5 on a linode360 hosting a wordpress blog.
This is a very nice and lean hosting solution.
One thing to make sure you look at if you go down the FastCGI path is compiling php with php-fpm This gives some decent process management over just running php from spawn-fcgi.
The distribution you run is up to what you are comfortable maintaining as your the one doing the work.
My experience has shown, but YMMV, CentOS for servers requires less ongoing tinkering than Archlinux however the setup can be a bit more challenging as some packages tend to be a little out of date. ie: CentOS nginx = 0.6.34 Archlinux nginx = 0.7.60 and reuire building from SRPM.
I ran an Archlinux linode for 6months and 6then months ago went to a CentOS linode. I still run Archlinux at home.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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