Project

General

Profile

Slow http downloads

Added by test@maildrop.cc almost 8 years ago

Does lighttpd come with some kind of bandwidth limiter installed by default?
I'm using a recent (less than 6 months old) version, and I'm getting just 300kB/s downloading binary content (40ms ping time to server).
I did however notice that the speed increased a lot when downloading from a another server in the same datacenter (ping 1ms).

I swapped to Apache, and the problem went away immediately, 4MB/s (40ms ping).

My setup is a bit unusual:
Windows 7, with the web server installed in a virtual machine (the so called "Windows XP mode").
Port 80 is directed into the virtual machine using Microsoft Loopback Adapter.

Since my problem was solved using Apache, I'm primarily interested in reporting this as a possible bug.
If there is no limiter active, it must be that Apache is sending larger packets or something and therefore it is able to push more data through under these somewhat weird conditions.
I also tested nginx, it resulted in a similar improvement of the bandwidth.

Cheers


Replies (1)

RE: Slow http downloads - Added by gstrauss almost 8 years ago

Thanks for the report.

I know that Apache is built with the Apache Portable Runtime (APR), which uses native Windows APIs.

By comparison, lighttpd uses the cygwin libraries as a translation layer from unix-like to Windows APIs. This could be part of this issue, but might not be. Since the download speeds you were seeing differed based on latency to the server, it might be possible to tune TCP buffer sizes to account for the larger "bandwidth delay product" (look that up in your favorite search engine).

It should be noted that lighttpd development does not occur on Windows; Windows is not a primary support platform for lighttpd. Related, I would expect that running lighttpd within in a Linux virtual machine running on Windows would work quite well, and would be faster than running lighttpd in Windows.

I am glad that you found a workable solution, even if it isn't using lighttpd. :)

    (1-1/1)