Low Throughput on Windows Named Pipe Over WAN

Posted by MichaelB76 on Stack Overflow See other posts from Stack Overflow or by MichaelB76
Published on 2010-04-26T13:48:01Z Indexed on 2010/05/05 9:38 UTC
Read the original article Hit count: 163

I'm having problems with low performance using a Windows named pipe. The throughput drops off rapidly as the network latency increases. There is a roughly linear relationship between messages sent per second and round trip time. It seems that the client must ack each message before the server will send the next one. This leads to very poor performance, I can only send 5 (~100 byte) messages per second over a link with an RTT of 200 ms.

The pipe is asynchronous, using multiple overlapped write operations (and multiple overlapped reads at the client end), but this is not improving throughput. Is it possible to send messages in parallel over a named pipe? The pipe is created using PIPE_TYPE_MESSAGE, would PIPE_READMODE_BYTE work better? Is there any other way I can improve performance?

This is a deployed solution, so I can't simply replace the pipe with a socket connection (I've read that Windows named pipe aren't recommended for use over a WAN, and I'm wondering if this is why). I'd be grateful for any help with this matter.

© Stack Overflow or respective owner

Related posts about network-programming

Related posts about Windows