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

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

I have tried both approaches with a custom made RPC framework few years ago. My 
tests showed that leaving Nagle enabled while implementing synchronous RPC 
actually enforces better TCP usage practices. Throughput performance gain with 
enabled Nagle was from 5% with smallest size of payload per call, reaching the 
maximum of almost 50% with payload about 256-512 bytes long, and decreasing 
back to nothing with over ten-kB payloads. 

Besides that, the Nagle-off solution would produce a tinygram or two per each 
call that could be avoidable otherwise.

I suppose that these are good reasons to leave Nagle on, send out data in solid 
TCP segments, and consider doing the same changes in c++ implementation as well.

> 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
>            Assignee: Alexey Biryukov
>             Fix For: 0.6
>
>         Attachments: thrift-904.patch, thrift-904.tests.patch
>
>
> Java sets
>       socket_.setSoLinger(false, 0);
>       socket_.setTcpNoDelay(true);
> C# should do the equivalent.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to