Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 98970 invoked from network); 18 Sep 2010 20:31:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Sep 2010 20:31:15 -0000 Received: (qmail 11489 invoked by uid 500); 18 Sep 2010 20:31:13 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 11431 invoked by uid 500); 18 Sep 2010 20:31:13 -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 11420 invoked by uid 99); 18 Sep 2010 20:31:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Sep 2010 20:31:13 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of augustyn.michal@gmail.com designates 209.85.216.44 as permitted sender) Received: from [209.85.216.44] (HELO mail-qw0-f44.google.com) (209.85.216.44) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Sep 2010 20:31:07 +0000 Received: by qwc9 with SMTP id 9so2987976qwc.31 for ; Sat, 18 Sep 2010 13:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=0o3QDw3RmM73iTNjOP4FUlaCI9Q5/+Tt826B+IEYSCI=; b=YAro2JptQo7EqqRZda/+NBx/i7Sy+y5rq6Skt+vwZFBKZ/fQbZKQdL1gisJSayXlYW KiRpJQV+yARM5iPqF2NGfEzGe3ThFJKfd/3/swgMOlmRYDnZoXBR+WdHaDDSzrAwpiEE zNLw96oJRfJyq0mWlAhTDFMbMtXsCyKF81UVQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=obs9tr/wAwEy9Nde62f0tDXvX2PMAjKK00QkW025P3DjcWIxaAh9l4DRHCN82P7fOY 5XCYsyKmP4SgSbJEZnt2F8zdjQ8KuWrXI1vMHkaigW8WoGXnIGhQWQpW5O0gZobP5CnS McjQMWSBeIl6up5XnzpuKNEPAeYXZ3VWqYqdo= MIME-Version: 1.0 Received: by 10.229.1.88 with SMTP id 24mr4475887qce.269.1284841845999; Sat, 18 Sep 2010 13:30:45 -0700 (PDT) Received: by 10.229.48.130 with HTTP; Sat, 18 Sep 2010 13:30:45 -0700 (PDT) In-Reply-To: References: Date: Sat, 18 Sep 2010 22:30:45 +0200 Message-ID: Subject: Re: Network latency on Cassandra 0.7 (TFramedTransport) From: =?ISO-8859-1?Q?Michal_August=FDn?= To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016367d5deed2c8b904908e8d28 X-Virus-Checked: Checked by ClamAV on apache.org --0016367d5deed2c8b904908e8d28 Content-Type: text/plain; charset=ISO-8859-1 Thank you very much. This solves my issue. Augi 2010/9/17 Michael Greene > This is the correct cause. Reproducing your test gives 38-45ms in each of > 10 runs. If you run a profiler against it, you can see that the time is > entirely spent blocking on receive in TStreamTransport.Read. > > Your test can be modified with the following line: > coreTransport.TcpClient.NoDelay = true; > > After disabling Nagle's each test runs in < 1ms. > > Michael > > On Fri, Sep 17, 2010 at 9:57 AM, Peter Schuller < > peter.schuller@infidyne.com> wrote: > >> > The latency is about 200 ms on every request when I'm connected to >> another >> >> My first thought here was that maybe you're seeing the effects of >> nagle[1] + delayed acks on the other side. On Unix, normally something >> like a thrift client would set TCP_NODELAY on its socket to avoid the >> problem. I'm not sure whether or not this is a reasonable hypothesis >> with C# + Thrift on Windows. Sorry, I don't know what the easy fix is >> either but perhaps it might help dig further. >> >> [1] http://en.wikipedia.org/wiki/Nagle's_algorithm >> >> -- >> / Peter Schuller >> > > --0016367d5deed2c8b904908e8d28 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thank you very much. This solves my issue.

Augi

<= div class=3D"gmail_quote">2010/9/17 Michael Greene <michael.greene@gmail.com><= /span>
This is the correct cause. =A0Reproducing y= our test gives 38-45ms in each of 10 runs. =A0If you run a profiler against= it, you can see that the time is entirely spent blocking on receive in TSt= reamTransport.Read.

Your test can be modified with the following line:
coreTransport.T= cpClient.NoDelay =3D true;

After disabling Nagle's each t= est runs in < 1ms.

Mich= ael

On Fri, Sep 17, 2010 at 9:57 AM, Peter Schuller <peter.schuller@= infidyne.com> wrote:
> The latency is about 200 ms on every request when I'm connect= ed to another

My first thought here was that maybe you're seeing the effects of=
nagle[1] + delayed acks on the other side. On Unix, normally something
like a thrift client would set TCP_NODELAY on its socket to avoid the
problem. I'm not sure whether or not this is a reasonable hypothesis with C# + Thrift on Windows. Sorry, I don't know what the easy fix is either but perhaps it might help dig further.

[1] http://en.wikipedia.org/wiki/Nagle's_algorithm

--
/ Peter Schuller


--0016367d5deed2c8b904908e8d28--