Serguei Osokine wrote:

> As you can guess, there is no good reason why would the fake UDP
> send take more time and effort than the real one - this probably 
> can be explained only by the bug in the IP stack. It is even quite

First of all, loopback puts double load to your system - both transmit 
and receive paths are in use.

Second, loopback in Windows is not a real interface. Its data flow is 
very different from a normal traffic. Normally, packets are transmitted 
via NDIS stack, but loopback is implemented purely in tcpip.sys.

Third, I don't think that loopback path was ever optimized.

Though, once upon a time I've quickly benchmarked TCP (not UDP) via 
loopback at both Windows and Linux. Windows was able to transmit ~80 
megabytes per second. Linux - ~700 at the similar hardware. But this is 
not a fair competition, because at Linux loopback traffic normally 
bypasses TCP/IP stack (as a measure of optimization for XWindow system 
running over loopback TCP).

I believe also that when you sendto() into the UDP socket in a blocking 
mode, the sendto() call will block if output queue is full. By contrast, 
linux will silently drop a packet at this case.


_______________________________________________
p2p-hackers mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/p2p-hackers

Reply via email to