server.kbytes-per-second directive malfunctioning
I'm using the server.kbytes-per-second directive to limit the output from my server, and have found that it suffers severe malfunctioning; setting the variable to 215 results in an avg. output speed of 135kb/s, with occassional bursts up to 175kb/s. Setting the variable to 150 results in an avg. output of 100kb/s, with bursts up to 200kb/s and so on. No value manages to actually limit the output correctly, the result is always erroneous and seems not to follow any pattern.
When this directive is in effect, lighttpd also fails to maintain a smooth and constant transfer speed. Instead the speed staggers back and forth, f.e. starting at 135kb/s then slowly rising to 175kb/s, then the transfer halts entirely, and a short while later it resumes again at 135kb/s and begins anew to climb up, repeat.
I'm running OpenBSD 4.1, but I've also tried this on a Slackware box and it manifested itself there as well. I have yet to try out v1.4.15.
Updated by stbuehler over 12 years ago
- Status changed from New to Fixed
- Resolution set to invalid
The server.kbytes-per-second directive is not very reliable; lighty will stop writing after it is realizies it is over the limit, but it may have sent much more. After one second, the counter is reset to 0 (the per connection limit is more exact), so in the next second again more may be sent - that is the explanation for burst over the limit.
If you really need to limit your traffic for the complete i would suggest you use some kernel utitilies.
Also available in: Atom