10

Reading this zero copy article,

Does Zero-copy exist in Windows OS (server 2003, 2008, 2008 R2) ?

Lydon Ch
  • 8,637
  • 20
  • 79
  • 132

1 Answers1

10

Yes, it is supported via the TransmitFile API.

I'm pretty sure that IIS uses this as well.

Whether or not this method does real zero-copy (i.e. doesn't even copy from the file buffers to the socket buffers) is not explicitly mentioned in the documentation. But given the fact that this method is defined in a way that definitely makes it possible, I'd be highly surprised if this were not the case.

The closest the documentation comes to stating it clearly is this paragraph:

[...] TransmitFile achieves its performance gains by sending data directly from the file cache.

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
  • Thanks Joachim. I wonder if TransmitFile() copy the data from kernel-read-buffer to socket-buffer and to NIC buffer ? or does it copy the data straight from kernel-read-buffer to NIC buffer ? – Lydon Ch Aug 17 '11 at 08:40