Can I run Drupal on 256MB VPS hosting ?

I know it depends on many factors, but I mean... can I run few Drupal websites on such VPS.. ?

What are important configuration settings to optimize performances ?

thanks

link|improve this question

What kind of traffic you expect? Tens of hits a day? Hundreds? Thousands? More? – Janne Pikkarainen Nov 5 '10 at 15:36
feedback

3 Answers

up vote 1 down vote accepted

I had Drupal running with MySQL on a VPS with only 64MB of RAM for about 2 years. So, 256MB will definitely work. Things that I did to get it work with 64MB of RAM:

  1. Configure MySQL to the minimum. On Debian based distributions, the example my-small.cnf provided would be a good sample to use.
  2. Use a light-weight web server like lighttpd/nginx.
  3. Limit the number of php instances running. In lighttpd/nginx, this would involve limiting the number of spawned instances. I could get 2 php-cgi instances running in 64MB.
  4. Use a light-weight MTA like minimal Exim4.
  5. Turn off everything else.

Good Luck.

Edit:

  1. Set vm.swappiness to 1 in /etc/sysctl.conf
  2. Hit the server with a simulated run (use something like siege would do).
  3. Watch the resource usage and ensure that the swap is not used.

The key is to avoid swap usage. So, tune/reduce resources to keep the server from swapping. The easiest thing to do is to reduce the number of PHP instances running.

link|improve this answer
One more thing: I've run free -m and I'm currently using 217M of memory and 28M are free. This is the state of my server in stand by (no requests, no traffic). is this too much? What are good values ? thnks – Patrick Nov 5 '10 at 9:08
@Patrick - edited answer. – sybreon Nov 5 '10 at 15:33
feedback

Assuming they're light duty websites and your OS has minimal requirements, I don't see why not.

link|improve this answer
feedback

For my heavy Drupal sites everything is ok with approx. 200 MB of RAM for one instance.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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