Scaling Question

Events happening in the community are now at Drupal community events on www.drupal.org.
Vidus's picture

Hi,

I had a question on scaling and I wasn't sure about the specifics of it to Drupal, and thought this would be the best place to ask.

Currently, my workplace is running Drupal 6/7 sites on a 2gb server (1700 actual available).

I was wondering what the differences in performance would be if we split to two 1gb servers, with one handling the files and the other handling the databases.

We have around 100-120 sites that are being used on a regular basis, though only a few of the sites deal with even vaguely heavy traffic.

I'm a bit fuzzy about when going to a dedicated db-only server makes sense compared to throwing memory at a problem, especially with Drupal.

Extra info: we're currently on a LAMP stack, and I'd be interested in knowing how that would affect the stack, but also in the differences if we were talking about two LEMP stacks instead running Aegir.

Thank you, and apologies if I'm asking a really dumb question,
Vidus

Comments

Well, we can't really give

dalin's picture

Well, we can't really give advice without diagnosing what your issues are. What are your current bottlenecks?

With that said, for this question:

I'm a bit fuzzy about when going to a dedicated db-only server makes sense compared to throwing memory at a problem, especially with Drupal.

You will most likely get more bang for your buck by adding more RAM and doing some basic tuning rather than splitting off to two VPSes (unless your current bottleneck is CPU, in which case having more CPUs might be better).

But another generalization is that throwing hardware at a performance problem only helps some of the time. Often times a bit of simple tuning or refactoring of bad code can make several orders of magnitude difference.

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

Its about caching - not power

geofftech's picture

I thought I had already replied to this, but my reply seems to have disappeared...maybe it will come back and I will have two.

It's all about caching. You will get much much more performance if you can cache your responses than throwing more power at them.

Also, try and move as much load off server as possible - CDNs for images and CSS, etc..

My opinion, keeping it simple is better. Optimise what you have. Then, throw some extra RAM and CPU at the problem first.

When your load increases and you have no more RAM or CPU to throw at it - that is when you think about splitting off the Database.

And then after that, cluster the headend.

But first - cache cache cache

BOA has really good built in cacheing by the way - from other threads.

Ok, thank you to both of you

Vidus's picture

Ok, thank you to both of you for the response. The question is a bit light on detail because I don't have the servers up and running yet. Myself and a partner are in the first stages of planning a business model that we're thinking about implementing and I'm wanting to make sure we pick the right host when we get started.

We're currently looking at linode and stormondemand. Storm offers more disk space and higher memory at a better price point for our use model (lots of storage needed, bandwidth not that big of a deal). Linode seems to have a better model at lower memory prices, 1gb or so, compared to Storm when we only use currently 400gb of bandwidth per year (if our tracker on current server is correct).

If multiple servers made sense, then linode would be a better starting point, but if bigger memory is a better starting place, then storm is looking like where we'll need to set up shop.

I wouldn't go under 2GB of

geofftech's picture

I wouldn't go under 2GB of RAM if you can.

Alright, that makes sense.

Vidus's picture

Alright, that makes sense. The goal is to get things started at 1gb level, and as we get clients to scale up to 2gb when the funds are there to pay (which shouldn't take very many clients at all).

Our service would hopefully go live by August, and so starting with a 1gb that will scale efficiently cost-wise to the 2gb production level is what I'm hoping to do at this point.

segmenting instances or services

jdonson's picture

In terms of available hardware, supply MUST exceed demand.

Benchmarking hardware clarifies the supply. Load tests of each service clarify demand.

In answer to your inquiries,
most production instances of LAMP + CMS include a separate NFS mount for file content.

=> That would need its own NFS host with an exported filesystem.

Alternatively, many use CDN's for this file serving purpose. That costs $.

Moreover,
you seem to have apache, php and mysql running, apparently on one box.

The questions about where your bottlenecks lay are good questions.

Does this help? => http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html

Jeremy Donson
Database and Systems Engineer
New York City

Thanks, that does help with

Vidus's picture

Thanks, that does help with our Lamp setup

High performance

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: