apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Bekers <i...@elexer.com>
Subject Re: [patch] sendfile on win32 slow (bug #20382)
Date Fri, 05 Sep 2003 16:23:57 GMT
> >To prevent an DoS, perhaps  WaitForSingleObject() could be called in a
> >with, check the value of GetOverLappedResult() for a 'sane' value (this
> >be the old MAX_SEGMENT_SIZE), and if the amount of bytes transmitted
> >the last call to GetOverlappedResult() is smaller than MAX_SEGMENT_SIZE,
> >abort the loop and fall out of the sendfile() as the user is not
> >(quickly) enough.
> I was under the impression that until an overlapped operation COMPLETES,
> GetOverlappedResult doesn't give us anything useful in return other than
> ERROR_IO_PENDING.  Was I misunderstanding the semantics?
Unfortunately you seem to be right. An early test led me to believe that
GetOverlappedResult() reacted as i expected, but this test was apparently
very wrong as i am unable to reproduce that behaviour now. I will test more
and see if i can find anything that improves performance without introducing
this issue. What did strike me as odd is that an quick test resulted in

- IIS - 6M/sec
- Apache - 0.9M/sec
- Apache with SendFile disabled in httpd.conf - 6M/sec

which striked me as odd.

Maarten Bekers.

View raw message