Ticket #1213 (closed defect: duplicate)

Opened 1 year ago

Last modified 1 week ago

traffic shaping doesn't work with AIO in lighttpd-1.5.0-r1857

Reported by: deblog@gmail.com Assigned to: jan
Priority: normal Milestone: 1.5.0
Component: core Version: 1.5.x-svn
Severity: major Keywords: traffic shaping aio
Cc: Blocking:
Need Feedback: 0

Description

Traffic shaping (e.g. server.kbytes-per-second = 500) doesn't work with AIO (lighttpd-1.5.0-r1857.tar.gz). Download stops and timeouts after few kbytes...

Attachments

lighttpd-150-shaper-bug-wget.txt (1.4 kB) - added by deblog@gmail.com on 10/15/2007 11:22:32 PM.
Output of test with wget.
lighttpd-svn-fix-kbps-feature.patch (333 bytes) - added by Safari on 03/06/2008 02:02:58 AM.

Change History

08/08/2007 09:40:12 PM changed by j0t

  • pending changed.

same here but without aio... Download halts after a few seconds and the connection drops..

10/15/2007 11:22:32 PM changed by deblog@gmail.com

  • attachment lighttpd-150-shaper-bug-wget.txt added.

Output of test with wget.

10/15/2007 11:30:25 PM changed by deblog@gmail.com

I confirm bug with linux-sendfile backend (without aio and r1992). Lighty simply drops connection (see attachment), perhaps instead of shaping. Probability of connection drop increase with speed of download (e.g. with need of traffic shaping).

10/15/2007 11:38:44 PM changed by deblog@gmail.com

P.S. Same problem occurs with all network backends (i've tested gthread-aio, gthread-sendfile, write, posix-aio, linux-aio-sendfile, linux-sendfile, writev).

12/21/2007 11:02:13 PM changed by anonymous

  • cc deleted.

I'm genuinely amazed by how incredibly fast are the lighttpd developers at correcting a "major" bug!

03/06/2008 02:02:58 AM changed by Safari

  • attachment lighttpd-svn-fix-kbps-feature.patch added.

03/06/2008 02:08:08 AM changed by Safari

Can somebody test that patch? It seems to give half the configured bw, though.

And why do you use this feature, anyways? If on Linux, use HTB and SFQ, it actually is good. Can give priorities over other traffic (DNS, ICMP, etc.), give fair bandwidth to all clients -- per flow or destination IP etc., paces packets evenly (if configured bandwidth reached) instead of just doing write(stuff) sleep(one second)

03/06/2008 05:19:00 PM changed by j0t

I don't use HTB/SFQ because I need to limit the bandwidth for a single vhost, not for the whole server.

As soon as I get back up and running my testing machine I'll try the patch. Thank you

05/06/2008 11:30:16 AM changed by stbuehler

  • status changed from new to closed.
  • resolution set to duplicate.

Add/Change #1213 (traffic shaping doesn't work with AIO in lighttpd-1.5.0-r1857)




Change Properties
Action