4

I'm considering to rent a VPS with 384 MB memory. It would run on CentOS and would have cPanel with Apache 2 / MySQL and Phusion Passenger with nginx / sqlite.

What do you think, will it have enough memory? It would serve around 10 small traffic PHP/MySQL websites and 3-4 small traffic Ruby on Rails app.

Thanks for your suggestions.

1

9 Answers 9

9

That really depends on your applications. You might want to consider running a VMWare image with the same OS and amount of memory allocated, deploying your 10 or so small websites to that image, and running a stress test against the image that emulates the approximate traffic you expect.

3

Why not run some tests locally with those sites, and measure their memory usage? It's too hard to say otherwise, without knowing exactly what your sites are doing.

3

I am presently running multiple VMs at work. With 256Mb I can comfortably run Apache on CentOS with PHP. So, you should be able to handle it with 384Mb. Unfortunately, if I am not able to run java/Tomcat on it until I increase the memory.

Depends on the kind of VPS technology used. If the provider uses OpenVZ/VServer, you will be able to save several tens of MB of memory from running the Linux kernel. However, if it uses something like Xen, you will need to spend some memory on the Linux kernel.

If you do not need to use Apache, avoid using it. There are plenty of other light-weight web servers around. You have already mentioned nginx. You can also try lighttpd and I think that many RoR sites use it.

2

There's no way you're going to be able to get acceptable performance out of that configuration. The 4 Rails apps will take more memory than that on their own, before you start looking at Apache and (especially) MySQL.

2

I strongly suggest that you don't install cPanel. Just cPanel alone will probably eat more memory than everything else combined. Manually configuring a small VPS isn't really too hard or time-consuming, especially if you use Google Apps to host your email and use your registrar's name servers.

1

You could just rent the VPS for a month and see how well it works. Many providers will let you upgrade your VM to a more expensive plan. (I know Linode makes this easy, for example.)

I expect that 384 MB will be just barely sufficient. It might work, but you might also want a little more headroom for safety's sake.

0

I'd go out on a limb and say you'd be pushing the limits of that vps, but its doable. You'd have to make sure you limited your rails apps to about one instance each and ran Php as fcgi ... then it might just work.

But I'm with alberge ... just go to linode.com and rent a 360MB linode ($20/month) and start setting up stuff to see how it goes ... Install and configure the Rails apps first, because thats where most of your memory will go.

Watch the memory with htop. Report back :D

0

the more memory you'll give the less it'll swap i.e. less I/O on disk i.e. faster, centos + apache + mysql by itself, but once you have your apps up and running it might run out of memory very quickly... today memory is very inexpensive so i suggest to bump it up more

2
  • Many VPS provider will not allow you to swap anything.
    – Lothar
    Sep 6, 2009 at 12:39
  • ok, so then you need more memory on your box in order not to run out of memory assuming your application is somewhat decent and you going have some people come and use it
    – alexus
    Sep 8, 2009 at 0:17
0

384 MB is a decent starting point. You may get better results if you don't use cPanel, though -- it starts a number of processes which aren't necessary on a single-user VPS and which will use up a significant amount of memory.

You must log in to answer this question.