Best practice for a web farm?
dormando at rydia.net
Fri Feb 1 04:46:30 UTC 2008
More or less.
The most efficient-for-the-money method to start out with is to add more
RAM to your CPU nodes (dynamic webservers, whatever) and run a memcached
instance on there too. Cheap to add RAM to hardware you're using for
other things, but expensive to get entire boxes for it.
Very very few people actually peg memcached with CPU usage, and if you,
you should be able to afford a few dedicated machines :)
If you're worried about CPU thrashing a lot, you can use utilities like
schedutils to 'ping' memcached to a specific core on a specific CPU, and
'mask' your webserver processes to all of the rest. It can help a little
bit but isn't usually necessary.
Brian P Brooks wrote:
> The most general practice is to save on CPU and spend on RAM. Typical
> web applications choke when it comes to I/O and going out to disk;
> rarely will your CPU be fully utilized on a load-balanced farm
> (considering you're not doing image manipulation or any other intensive
> tasks that _could_ be a feature within your app).
> RAM size depends on what you cache, and how much of it you cache. If
> you're just caching a database for a relatively moderate sized
> application you could be surprised how far just a single gig of RAM will
> go as far as caching...
> As far as where you should fire up Memcached instances, I believe
> someone more experienced can answer this (Brad, Steve, Moon, dormando)?
> I don't think it should be a problem firing instances on your WWW
> servers... you can start out doing that, then do some testing to see
> whether it's beneficial to cache to dedicated boxes.
> Brian Brooks
> brian.brooks at colorado.edu <mailto:brian.brooks at colorado.edu>
> Mobile: 303.319.8663
> On Jan 31, 2008, at 11:44 AM, Karoly Negyesi wrote:
>> I am running a fairly typical web app (Drupal based) on a LAMP stack
>> and I am about to buy new servers. What's better, putting heaps of RAM
>> into each frontend (say, 8GB) and caching locally or have separate
>> boxes which only run memcached ? I plan quad core CPUs (Xeon 5405 or
>> so) for the web frontends, but even dual quad cores are not out of
>> question. If you guys say that go for separate boxes, what kind of CPU
>> power do I need to plan on?
More information about the memcached