You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Alexey Biryukov (JIRA)" <ji...@apache.org> on 2010/11/27 06:07:14 UTC

[jira] Commented: (THRIFT-904) C# TSocket should disable nagle and linger

    [ https://issues.apache.org/jira/browse/THRIFT-904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12945551#action_12945551 ] 

Alexey Biryukov commented on THRIFT-904:
----------------------------------------

I'm observing the throughput decline due to Nagle/Linger in the following conditions:
 * client and server are on different hosts
 * TFramedTransport is used
 * Message size sent in arguments is 1K or less

My opinion is instead of turning off Nagle, TFramedTransport should be made Nagle-aware. Currently it is sending frame in 2 syscalls and, therefore, in 2 TCP segments, the first being only 4 bytes long. And if the second segment did not fill the data up to MSS, it waits for ACK which is delayed by the peer for 40 ms due to lack of response data.

If TFramedTransport used just one write() call per frame, there is no need for setNoTcpDelay.

I'm currently working on this fix and will submit it soon.




> C# TSocket should disable nagle and linger
> ------------------------------------------
>
>                 Key: THRIFT-904
>                 URL: https://issues.apache.org/jira/browse/THRIFT-904
>             Project: Thrift
>          Issue Type: Bug
>          Components: C# - Library
>            Reporter: Jonathan Ellis
>
> Java sets
>       socket_.setSoLinger(false, 0);
>       socket_.setTcpNoDelay(true);
> C# should do the equivalent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.