Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E5570971D for ; Fri, 23 Sep 2011 13:05:25 +0000 (UTC) Received: (qmail 70067 invoked by uid 500); 23 Sep 2011 13:05:23 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 70029 invoked by uid 500); 23 Sep 2011 13:05:23 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 70020 invoked by uid 99); 23 Sep 2011 13:05:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Sep 2011 13:05:23 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of greghinkle@gmail.com designates 209.85.220.172 as permitted sender) Received: from [209.85.220.172] (HELO mail-vx0-f172.google.com) (209.85.220.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Sep 2011 13:05:16 +0000 Received: by vcbfo11 with SMTP id fo11so1563098vcb.31 for ; Fri, 23 Sep 2011 06:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=S/Y54kEYSgh1OL3jIfGM9EiMZNpDNKlKjMxfOwxTULQ=; b=AhvZcpBuobxTGr2YX4gl9IIkRNBQbIGWGJXJ/sA7rgKFWXVQVtYgSX0C+VFE8rnco0 I83vmtFNYB8Lnn0Tp20nR9QcIQBNzlWM7AHKoxBWvAoOCM5UTwzqFI8nZ8Jq+Uq/3kO8 r+7MCQA98tpjuFXEbf7DEF7zxVQRIKZxULL4M= Received: by 10.220.155.71 with SMTP id r7mr858601vcw.234.1316783095700; Fri, 23 Sep 2011 06:04:55 -0700 (PDT) Received: from [172.31.2.3] (pool-68-238-248-248.phlapa.fios.verizon.net. [68.238.248.248]) by mx.google.com with ESMTPS id da15sm9361115vdb.26.2011.09.23.06.04.54 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Sep 2011 06:04:54 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: MessagingService.sendOneWay sending blank bytes? From: Greg Hinkle In-Reply-To: Date: Fri, 23 Sep 2011 09:04:54 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: user@cassandra.apache.org X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org Is it worth a back-port or at least switch to asByteArray for 0.8.7? = It's a sizable amount of wasted network traffic and the fix seems pretty = safe. (It's working for me) Greg Hinkle On Sep 23, 2011, at 3:32 AM, Jonathan Ellis wrote: > Yes. This is one of the things fixed for 1.0 in > https://issues.apache.org/jira/browse/CASSANDRA-1788 >=20 > On Thu, Sep 22, 2011 at 11:16 PM, Greg Hinkle = wrote: >> I noticed that on the 0.8 branch the implementation of = MessagingService.sendOneWay is building up a DataOutputBuffer with a = default size of 128 bytes, but then sending it as the full buffer no = matter how many bytes the the data takes. I believe it should be calling = DataOutputBuffer.asByteArray() or copying just up to the length() into = the ByteBuffer. This means it appears to be wasting on around 40 to 80 = bytes on every message. This really adds up in a big cluster. >>=20 >> It looks like things are different in trunk, but can anyone confirm = this bug in 0.8? Thanks. >>=20 >>=20 >> Greg Hinkle >>=20 >>=20 >=20 >=20 >=20 > --=20 > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of DataStax, the source for professional Cassandra support > http://www.datastax.com