[
https://issues.apache.org/jira/browse/THRIFT-904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexey Biryukov updated THRIFT-904:
-----------------------------------
Attachment: thrift-904.patch
thrift-904.tests.patch
Here is the fix to make TFramedTransport "Nagle-aware".
First patch adds a relevant testcase to the tests. It adds support for
TFramedTransport in both server and client mode (use {{ThriftTest server 9090
framed}} and {{ThriftTest.exe client -f}}), and adds "Calltime" testcase that
calls testVoid() 1000 times and calculates average call time.
It clearly shows the problem:
{noformat}
d...@build1:~/misc/thrift/new$ ./ThriftTest.exe client -f -h
abiryukov-xp-dt:9090
Using framed transport
testVoid() = void
....
Test Oneway(1)
Test Calltime() = 202.166668 ms a testVoid() call
Total time: 00:03:31.5856840
{noformat}
Another patch fixes the issue. Now every time TFramedTransport initializes its
buffer, it reserves 4 bytes in the beginning that are used later in flush() to
inject frame header. Then the buffer is transmitted with a single call to
transport.Write().
After applying the patch:
{noformat}
d...@build1:~/misc/thrift/new$ ./ThriftTest.exe client -f -h
abiryukov-xp-dt:9090
Using framed transport
testVoid() = void
.........
Test Oneway(1)
Test Calltime() = 1.639454 ms a testVoid() call
Total time: 00:00:07.0190670
{noformat}
> 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
> 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.
-
You can reply to this email to add a comment to the issue online.