Return-Path: Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: (qmail 60192 invoked from network); 18 Oct 2010 19:24:47 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Oct 2010 19:24:47 -0000 Received: (qmail 54366 invoked by uid 500); 18 Oct 2010 19:24:47 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 54272 invoked by uid 500); 18 Oct 2010 19:24:47 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 54157 invoked by uid 99); 18 Oct 2010 19:24:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Oct 2010 19:24:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Oct 2010 19:24:46 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9IJOQos012171 for ; Mon, 18 Oct 2010 19:24:26 GMT Message-ID: <4697861.28091287429866612.JavaMail.jira@thor> Date: Mon, 18 Oct 2010 15:24:26 -0400 (EDT) From: "Benoit Sigoure (JIRA)" To: issues@hbase.apache.org Subject: [jira] Commented: (HBASE-3115) HBaseClient wastes 1 TCP packet per RPC In-Reply-To: <9423416.157481287131132757.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-3115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922223#action_12922223 ] Benoit Sigoure commented on HBASE-3115: --------------------------------------- +1 Todd, thanks a bunch. > HBaseClient wastes 1 TCP packet per RPC > --------------------------------------- > > Key: HBASE-3115 > URL: https://issues.apache.org/jira/browse/HBASE-3115 > Project: HBase > Issue Type: Improvement > Components: client > Affects Versions: 0.20.1, 0.20.2, 0.20.3, 0.20.4, 0.20.5, 0.20.6, 0.89.20100621 > Reporter: Benoit Sigoure > Assignee: Todd Lipcon > Priority: Minor > Attachments: hbase-3115.txt > > > In {{ipc/HBaseClient.java}}, the method {{sendParam}} does: > {code} > out.writeInt(dataLength); //first put the data length > out.write(data, 0, dataLength);//write the data > {code} > While analyzing some tcpdump traces tonight, I saw that this consistently translates to 1 TCP packet with a 4 byte payload followed by another TCP packet with the RPC itself. This makes inefficient use of network resources and adversely affects TCP throughput. I believe each of those lines translates to a {{write}} system call on the socket's file descriptor (unnecessary system calls are also bad for performance). The code attempts to call {{out.flush();}} but this approach is ineffective on sockets in Java (as far as I empirically noticed over the past few months). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.