optimizing lighttpd for file hosting

On one of my server, i have 50 Mbps unmetered connection, but maximum bandwidth the server was able to push was 30 Mbps average. After some search i found this is due to i use “linux-sendfile” as server.network-backend. This is good for serving small files like image hosting server.

For larger file, you need to set

server.network-backend = “writev”

Once this is set, the server is able to push upto 80 Mbps.

MTRG below shows the increase in bandwidth usage after this change.

You can read about optimizing server for large file sharing here.

This entry was posted in file sharing and tagged , , . Bookmark the permalink.

3 Responses to optimizing lighttpd for file hosting

  1. Azo says:

    Hello.

    Nice article.
    I’m also interested in optimization for small files (image hosting).
    Any advice?

    Thx in advance.

  2. admin says:

    For image hosting, use

    server.network-backend = “linux-sendfile”

    as network backend if you are using linux 2.6+

  3. You might also try increasing the server.max-worker appropriately. This will dramatically increase throughput if your finding yourself bound on IO.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>