Improving site performance


Improving site performance with nginx & eAccelerator.

The content is copied from Oxwall's wiki.


Fare warning: I am a newbie, and I just have superficial idea of what I am talking about. So please help me out. See if this can be implemented for elgg sites as well.

There are several ways of increasing your site performance. They can be divided into two categories: server optimizations (changing server configuration, installing third-party software) and software optimizations (code optimization, tasks distribution). We recommend using Nginx + eAccelerator for server optimization and use CDN (Cloud Files) for software optimization and better website performance as result.

Server optimization



Nginx does the same work Apache does yet does it much faster and uses less server resources. License: free Requirements: VPS or dedicated server

Nginx according to Wikipedia is: a lightweight, high-performance Web server/reverse proxy and e-mail (IMAP/POP3) proxy, licensed under a BSD-like license. It runs on UNIX, GNU/Linux, BSD variants, Mac OS X, Solaris, and Microsoft Windows.

Even though 60% of the world’s web sites are powered by Apache, Nginx is becoming more and more popular alternative, mostly because it is able to serve more requests per second with less server resources because of its architecture. Nginx can handle a large number of concurrent requests quickly with very little overhead.

So if Apache uses 4 worker processes (threaded mode), 30% CPU and 17MB of memory to server 6.500 requests per second, Nginx uses just one worker process, 15% CPU and just a megabyte of memory to serve 11.500 requests per second.

Below are some graphs from the web that indicates advantages of using Nginx:

Check the following link to see how can Nginx be installed on your server:

Also, you can contact your hosting company to get it installed for you.


eAccelerator speeds up PHP code execution by caching it in memory.

License: free Requirements: VPS or dedicated server

eAccelerator according to Wikipedia is: a PHP accelerator derived from the MMCache extension for the PHP programming language. eAccelerator provides a bytecode cache. eAccelerator is open source and thereby free to use and distribute.

eAccelerator is a free open-source PHP accelerator & optimizer. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.

eAccelerator stores compiled PHP scripts in shared memory and executes code directly from it. It creates locks only for a short time, while searching for a compiled PHP script in the cache, so one script can be executed simultaneously by several engines. Files that can't fit in shared memory are cached on disk only.

Below are charts of CPU and memory usage before installing eAccelerator:

And after installing eAccelerator:

Also, you can contact your hosting company to get it installed for you.

Performance and Scalability

Performance and Scalability

If you've got a need for speed, this group is for you.