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.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
- RSS feed or Weekly email newsletter
- Share on Twitter • Facebook • 3 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Yes, it should work under Ubuntu but you need Lighttpd 1.5.x version.
Is it possible to do the same thing on Ubuntu? Currently using lighttpd 1.4.19
what are your result (gain) with this feateures ?