• 15Mar
    Author: ned Categories: Infrastructure Comments: 2

    drupal_icon1One of the questions we often help clients answer is: which EC2 instance size provides the best performance-per-cost for a given application? I recently did some load testing with a few different sample web configurations, including a “stock” Drupal installation… here are the results:

    Amazon EC2 offers five different instance types, ranging from a $.10/hour small instance to $.80/hour extra large instances.  Choosing the right instance sizes for your application depends on balancing cost and performance.  Every web site and CMS is different, but these tests should give you a good idea of the most cost-effective way to scale Drupal on Amazon’s EC2.

    drupal_withimages

    The most meaningful results came from load testing a “stock” Drupal 6.9 installation, with the default template.  This template is a reasonable approximation of a “normal” web site driven by Drupal – it’s probably a little light on images, but similarly light on plugins and custom code.  The key result here is that the c1.medium image is the best “bang for your buck” for Drupal app hosting.  In my test, the c1.medium instance came out at 20 requests/sec/penny.   Here’s  a table showing the cost-per-performance I measured for a “typical” Drupal site:

    EC2 Instance Size Cost/hour Requests/second/penny
    m1.small $.10 9
    c1.medium $.20 20
    m1.large $.40 8
    c1.xlarge $.80 11
    m1.xlarge $.80 7.5

     

    Choosing the right instance can yield a tremendous performance/cost improvement, but it depends on an application architecture that can be easily load-balanced across many servers.  For most web-based applications, load balancing with HAProxy (or the like) is almost free, but this model doesn’t necessarily apply to other applications. 

    drupal_perf

    Besides testing the “Drupal Frontpage w/Images”, shown above, I also tested each instance with empty HTML files, a static 3k image, and simply hammering on the Drupal front page (without loading the images).  The requests/second increase for the “Drupal Frontpage w/Images” tests since it’s lots easier to serve up images than dynamic database-drive PHP-content.  I guess it’s useful to see that you don’t get much additional performance with static content hosting among any of the EC2 instance types (besides the smallest), so the best performance-per-dollar is, again, the c1.medium instance. 

    Finally, a few notes on testing methodology: Applied Trust uses custom AMIs, but for this testing, I used an un-tuned version ofa recent  RightScale image (ami-d8a347b1, and it’s 64-bit compliment ami-c8ac48a1 ), Apache 2.2.3, and MySQL 5.0.67. For these tests, the web server and DB server were both located on the single EC2 instance. This is essentially a “virgin” Drupal installation – there is only one Drupal node (next time, I would use the Drupal develper plugin to create a bunch of nodes first).  I tested from an m1.small EC2 instance in the same availability zone with both Seige and ab, checking that I got consistent results from each. I am pretty confident anyone could reproduce almost identical results with the same test setup.

    [Slashdot] [Digg] [Reddit] [del.icio.us] [Technorati] [StumbleUpon]

2 Responses

WP_Floristica

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.