Performance - Suggestions for "general use" Aegir server setup

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

I think this discussion about server configuration may benefit many. I know it will benefit me.

The facts:

  • Ubuntu 9.x on Linode VPS, 540MB RAM
  • Aegir
  • 50 small sites that get a couple of visits every hour
  • a few busy sites that should be able to handle a spikes of, say, 30 concurrent users
  • a moderate dose of "module-itis"
  • mostly anon users - say 90%
  • content and login is not shared between many sites, but a few may use Domain module (or similar)
  • using Pressflow

I'm really interested in hearing about how to get the best possible performance from such a setup.

The ambiguities:

  • php.ini - need a suggested sample
  • my.cnf - need a suggested sample
  • apache2.cnf - need a suggested sample

Speculation:

  • boost, varnish, mercury?
  • use parallel module to serve css, images, etc more quickly?
  • inclined to switch all databases to innodb ...?
  • Use ssl for /admin - necessary? problematic?

Comments

Parallel

timwood's picture

There is a trade off when you parallelize your page assets. When you add multiple hostnames, you force additional dns requests on the user which can take extra time. If your site has a lot of individual images, css and javascript on each page it can offset the additional dns requests required by using Parallel. That being said, we are planning on using that module with a new site soon.

Other tools for testing page load time on the browser end is Firebug + Yslow (http://developer.yahoo.com/yslow/) or Google Page Speed (http://code.google.com/speed/page-speed/).

-Tim

Parallel

barwonhack's picture

Thanks Tim,
I have set up parallel but am using just one subdomain (of a possible 3) as the issue of additional DNS lookups and also suspected the possibly overloading apache.

1) Re DNS lookups - what the the best way manage this? I had read that virtual hosts can be a bit more resource-intensive. Could not find conclusive info here, but some have alluded to removing the wildcard (*:80) from the vhost config as a performance booster.
2) Re Parallel - Does my idea to use one of 3 possible subdomains make sense? I imagine that this minimises the risk of overloading Apache "sessions".

Not sure

timwood's picture
  1. Not sure about Apache specific performance boosters like that, but for a smaller site you shouldn't need to do too many Apache tweaks like that. I have heard that disabling Apache from reading all .htaccess files throughout your websites can help, but there are probably other security concerns you have to watch out for when you do that.
  2. We are planning on using something like www, www1 and www2 for our additional hosts. I guess I could have done something more like images or media, but either will work. All you really need to do is add a ServerAlias line in the current VirtualHost (or apache wide config if you decide to not use virtualhosts) with the additional hostnames. It's all loading from the same Drupal Document Root/folder.

Two disclaimers:

  1. We are not using Aegir (initially) for the website I keep referring to, so I'm not sure what if anything Aegir adds that might degrade performance.
  2. Our site is probably 98% anonymous traffic, so I've looked into a lot of optimizations related to non-authenticated connections. There are many more optimizations you can do to help make your authenticated users experience better. Khalid from 2bits has a lot of great articles about Drupal performance (http://2bits.com/contents/articles). I also found his presentation from DrupalCon SF 2010 very helpful. Simple enhancements you can make with minimal to no patching. Most of what he suggested was even overkill for the site we are putting up.

Varnish

barwonhack's picture

Thanks ghankstef.

So the use of Boost or Varnish for Aegir managed multisites is not problematic then?
I have been using boost for a while and find it to be a great quick win. I'll probably have a look into varnish in a month or so.

I'll try Boost in some time,

playfulwolf's picture

I'll try Boost in some time, but Cacherouter with APC as user-cache works with Aegir 0.4-alpha7

drupal+me: jeweler portfolio

Aegir hosting system

Group organizers

Group categories

Group notifications

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