Increasing Drupal Performance by 265% in 10 Minutes
Installing a PHP accelerator can be an easy and effective way to speed up your applications.
PHP is a scripting language, meaning your code must be parsed, compiled on-the-fly, and finally executed for every page request. It's not difficult to see how this approach is less-than-optimal.
A PHP accelerator (or opcode cache) like APC works by keeping that compiled code in memory. The result can be a boost in performance anywhere from 2 to 7 times.
I installed APC on my Ubuntu 1.8GHz VPS with 1GB of memory from VPS.NET with a few short commands:
aptitude install php-pear
aptitude install php5-dev
aptitude install apache2-dev
pecl install apc
echo "extension=apc.so" > /etc/php5/apache2/conf.d/apc.ini
/etc/init.d/apache2 restart
I ran Apache benchmark before and after to get an idea of the gains. With 10 concurrent users requesting 100 pages each, my page loads jumped from 23 to 86 per second. 265% faster. Not bad for the default configuration!

Comments
Post new comment