Book Image

Lighttpd

By : Andre Bogus
Book Image

Lighttpd

By: Andre Bogus

Overview of this book

Table of Contents (20 chapters)
Lighttpd
Credits
About the Author
About the Reviewer
Preface
HTTP Status Codes

Core Settings


Using this scenario as a starting point, we will enumerate the knobs to be turned. Here are some configuration settings that will make our Lighttpd serve large files faster and more reliably than the defaults. First, we make sure range requests are enabled using the following command:

# if we have disabled range requests for some reason:
server.range-requests = "enable"

We want to use the optimal network backend for sending out content. If in doubt, take a file of the size we want to serve or create (for example, we can use dd to create a 1GB file):

$ dd if=/dev/zero of=our_file bs=1024 count=10480576

Now, put this file into our document root and run an http_load test (refer to Chapter 9 for further details) with each network backend that we get to run. Then, pick the fastest network backend. Probably it is one of the following, depending on your system. Take your pick and be sure to test on our system; when in doubt, test all of them:

server.backend = "writev"             #...