In article <google.com>,
Andre Kelmanson <net> wrote:
I don't think switching to non-blocking is likely to help with performance.
The waits in read() and write() will simply be replaced by waiting in
Note that write() only blocks if you're writing much faster than the remote
system can read, so that your local socket buffer fills up. If the socket
buffer is not full, write() simply copies the data to the buffer and
Using non-blocking I/O would allow you to keep calling read() while you
wait for the send buffer to clear out. But you'll need to find someplace
to keep all the data you're reading until you're able to write it.
No matter what you do, your throughput is limited by how fast the receiving
system can take in data. But that should also be the case when the client
and server are talking directly to each other. If your proxy is impacting
performance significantly, it's probably something else. Maybe the proxy
is advertising a smaller receive window than the real server (try
Barry Margolin, com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.