Ask HN: What's necessary re: server RAM?
I'm signing up for Slicehost right now because I want more freedom with my server. Storage and bandwidth I don't care about much, because I don't do very much transfer-heavy work on my own sites, but how do I judge how effective their RAM offerings are? How much memory does a single hit to a site take? How many concurrent threads can be run with, say, 256MB of RAM versus a full GB? I don't recall ever reading about this before (other than "X site goes down thanks to Digg effect) and I was wondering if anybody had advice about figuring out which would best work.
24 comments
[ 4.9 ms ] story [ 63.2 ms ] threadA nice thing with Slicehost is you can start with the smallest, and then if it seems you need more RAM, can restart the same image on a bigger slice.
You will know if you need more RAM by watching your busy server with 'top' over time, and among other things, ensuring that it never begins swapping.
Almost any app can benefit from more RAM, especially if you use various levels of caching effectively (from the automatic linux disk cache through framework-level fragment- or page- caching to HTTP-server/proxy caching).
So when you're sure things work OK, but then want to make them snappy, throwing RAM at the problem (with a little engineering to use it wisely) is usually a good idea.
My one bump up was a tiny, almost vanilla image and took even less time.
And, if continuity of service is important, it's possible to launch the larger clone first, then do a near-instantaneous cutover in various ways (esp. if your site can be read-only for a short window, and you can forward hits from the old machine if DNS takes a while to update).
My understanding is that Xen is pretty tricky admin, but you can do your own ubuntu or CentOS VM under vmware ,give it x Meg RAM, throw ab or jmeter or trample at your app, see what happens.
512 MB: Apache2 / PHP, serves a dozen websites last time I checked, most notably a forum that has a few thousand hits a day and my blog, which when it gets spiky goes up to X0,000 hits in a day.
256 MB (until recently): Bingo Card Creator, which is Nginx => 2x Mongrel.
I bumped the 256 up to 512 (a process that took me above 5 minutes and a restart) when I started developing the new version, so that I could fit a staging server on the same box. Currently it has about 6 Rails instances running on it at any given time (2x Mongrels for the live site, 2x for the staging, 2x for DelayedJob or consoles). After I release the new version I'm probably going to put the staging server on another box and reallocate the saved memory to more instances for the production site.
How much traffic do your slices use?
http://www.slicehost.com/questions/#private-ips
Hello, permanent screen session and homepage!
To think of it, I'm not sure I want to trust my credit card number to new and unknown company on the internet (they only allow paying by card directly).
Going further down the cheapness route, you arrive to http://www.lowendbox.com/ which specifically lists providers that offer VPS for under $7, plus there are how-to's like this:
"Yes, You Can Run 18 Static Sites on a 64MB Link-1 VPS" http://www.lowendbox.com/blog/yes-you-can-run-18-static-site...