Suggested hardware and hosting requirements for large Elgg sites.

Posted: June 10th, 2010 | Author: | Filed under: Editorial, Elgg Development, Web Development | Tags: , , , , , | Comments Off

heavy load

Overview
As the popularity of Elgg grows, we’re getting more and more questions regarding the optimal hosting environment for large networks. We’ve created this post in response to that. It contains a growing, consolidated list of suggested hosting and hardware requirements for running large (5k+ user) Elgg installations. It’s based on community contributed best practices, Elgg’s documentation and Arck’s experience with the platform over the past two years. It’s intended to be used as a point of reference and makes no claim of being all-inclusive. If you have a suggestion or edit, please include it in a comment and we’ll review it for inclusion in the next version.

Many thanks to the Elgg community for all of the input contributed across Elgg forums and mailing lists.

OS / Software Requirements

  • Dedicated LAMP (Linux, Apache, MySQL 5+, PHP 5.2+) based server
  • Apache mod_rewrite module and multibyte string support
  • GD for graphics processing
  • JSON (included in PHP 5.2+)
  • memcached (100-150MB of RAM allocated)

Hardware Requirements

  • CPU: Quad 3ghz+
  • RAM: 4GB+
  • HDD: 1-2TB+ / SSD (Disk space can be estimated by multiplying the amount of space you wish to allocate to each user by the total number of users. This could range between 10MB and 100MB depending on your requirements.)

Optimizations

MySQL

  • Convert the following MySQL tables to the InnoDB engine: elggannotation, elggentities, elggentity_relationships, elggmetadata, elggmetastrings, elggusers_sessions.
  • Leave all remaining tables as MyISAM for FULLTEXT searching
  • Raise the InnoDB buffer size to utilize roughly 50% of your total RAM.
  • Add OPTIMIZE queries to a nightly cron for all Elgg tables

PHP

  • Increase the total amount of memory allocated to PHP from 8MB in PHP’s configuration file. We recommend at least 16MB.
  • Change the maximum uploaded file size in PHP’s configuration to at least 2MB.

Scripts

  • Minify all JS and CSS
  • Serve JS and CSS from separate sub-domains (i.e. css.yourhost.com and js.yourhost.com)

Plugin Execution Order

  • Plugins are loaded in the order they appear on the plugin administration page. The theme plugin should be loaded near the bottom of the list, as it applies styles to other plugins.

Load Testing
The hu_skawa_genusers Elgg plugin can be used to simulate any number of concurrent users on an Elgg site. We recommend volume testing using this plugin in combination with http_load, or any other load testing tool.

Load Balancing
For large Elgg sites, it is critical to isolate the database(s) from the web server. In a load-balanced configuration (see typical example below) the web servers are horizontally scalable. The load balancing technology could be an appliance from a known vendor like Cisco, Big IP, etc or simply a Linux host implementing the Linux-HA project.

At the database layer the simplest solution is an active passive approach with enough hardware horsepower to handle the expected query load. Load and volume testing is required in order to determine that is needed in your own environment. Additionally, a true active/active database cluster could be implemented at a higher cost using a commercial clustering solution from MySQL.

elgg load balanced configuration

elgg load balanced configuration

Read more about Arck Interactive’s Elgg Services.

Contact us.