Turbo charge lighttpd with Linux AIO – Gain more performance

by on April 4, 2007 · 3 comments· Last updated October 9, 2007

Support for Linux kernel AIO (Asynchronous I/O) has been included in the version 2.6. By enabling Lighttpd AIO you can gain good performance gain. But what is AIO?

Usually your application needs to wait till I/O call is finished. AIO enables even a single application thread to overlap I/O operations with other processing, by providing an interface for submitting one or more I/O requests in one system call without waiting for completion, and a separate interface to reap completed I/O operations associated with a given completion group (see Linux AIO home page for more details).

Lighttpd 1.5.x support AIO. First make sure you have libaio installed:
# yum install libaio-devel

Next grab lighttpd source code and compile with --with-linux-aio option:
# ./configure --with-openssl --with-linux-aio

Install lighttpd
# make; make install

Create configuration file and put following directive in lighttpd.conf file:
server.network-backend = "linux-aio-sendfile"

Save and close the file. Restart lighttpd:
# /etc/init.d/lighttpd restart

Use httpd_load / ab command Performance Benchmarks a Web server.

Please note that I’ve tested above instructions on Redhat Enterprise Linux 4/5 and Cent OS.



You should follow me on twitter here or grab rss feed to keep track of new changes.

Featured Articles:

{ 3 comments… read them below or add one }

1 mumuri May 27, 2008 at 12:54 pm

what are your result (gain) with this feateures ?

Reply

2 Fujiko Fujio October 10, 2008 at 10:32 pm

Is it possible to do the same thing on Ubuntu? Currently using lighttpd 1.4.19

Reply

3 vivek October 10, 2008 at 10:47 pm

Yes, it should work under Ubuntu but you need Lighttpd 1.5.x version.

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 15 + 7 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Tagged as: , , , , , ,

Previous post:

Next post: