You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Todd Lipcon (Updated) (JIRA)" <ji...@apache.org> on 2012/02/14 06:50:59 UTC
[jira] [Updated] (HADOOP-8071) Avoid an extra packet in client code
when nagling is disabled
[ https://issues.apache.org/jira/browse/HADOOP-8071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Todd Lipcon updated HADOOP-8071:
--------------------------------
Attachment: hadoop-8071.txt
This seems to only be happening with larger RPC response sizes.
I verified this patch by running wireshark along with the following command:
{code}
/usr/lib/jvm/java-6-sun/bin/java -cp /home/todd/git/hadoop-common/hadoop-dist/target/hadoop-0.24.0-SNAPSHOT/share/hadoop/common/lib/*:target/classes:target/test-classes org.apache.hadoop.ipc.RPCCallBenchmark -Dipc.server.tcpnodelay=true -Dipc.client.tcpnodelay=true -c 1 -s 1 -t 1 -m 8300 -e protobuf
{code}
Without the patch, I saw the 4-byte length prefix packets followed by actual data packets, whereas with the patch, they were collapsed.
When I ran with a smaller message size (10 bytes instead of 8300 bytes) the behavior didn't reproduce - probably something to do with buffering somewhere in the IPC code.
> Avoid an extra packet in client code when nagling is disabled
> -------------------------------------------------------------
>
> Key: HADOOP-8071
> URL: https://issues.apache.org/jira/browse/HADOOP-8071
> Project: Hadoop Common
> Issue Type: Improvement
> Components: ipc
> Affects Versions: 0.23.1
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
> Priority: Minor
> Attachments: hadoop-8071.txt
>
>
> Currently, if you disable TCP_NODELAY in the IPC client, you get an extra packet for each call which contains the call's length. This is unnecessary. Instead, we can just reserve the 4 bytes in the buffer up front, then go back to fill it in before pushing the call to the wire.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira