Reading this zero copy article,
Does Zero-copy exist in Windows OS (server 2003, 2008, 2008 R2) ?
Zero-copy programming techniques can be used when exchanging data within a user space process (i.e. between two or more threads, etc.)
The concept of copying data from one peripheral to another peripheral by kernel, without switching back to user-process is termed as zero copy. As you may know, kernels offer system calls for user-space processes to interact with hardware or to get things done from the kernel.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With