I noticed that the performance of TransmitFile (used when EnableSendFile On on Windows platforms) was significantly worse than EnableSendFile Off.
It turns out that the way that TransmitFile is called is *without* the TF_WRITE_BEHIND flag. This means that TransmitFile does not complete (or rather that the socket is not signalled) until *all the data* has been ack'ed by the client. Windows clients send acks (roughly) every other data packet, or after a 200ms timeout. Thus, about half the time, the TransmitFile does not complete until this 200ms timeout has triggered.
This reduces the throughput on high speed networks significantly. On a 100Mbit LAN, the throughput drops from 11MBytes/sec to around 2.5MBytes/sec.
My question is: is there a good reason that the TF_WRITE_BEHIND flag is not being used?
Philip
p.s. If you want to try this, don't use Mozilla as that seems to have another bug that limits the maximum data transfer rate.
Philip, Submit a patch to [EMAIL PROTECTED] and I'll take a look. Sounds like we need to set TF_WRITE_BEHIND.
Bill
