Return-Path: Delivered-To: apmail-incubator-cassandra-user-archive@minotaur.apache.org Received: (qmail 97361 invoked from network); 1 Oct 2009 22:52:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Oct 2009 22:52:58 -0000 Received: (qmail 45797 invoked by uid 500); 1 Oct 2009 22:52:58 -0000 Delivered-To: apmail-incubator-cassandra-user-archive@incubator.apache.org Received: (qmail 45777 invoked by uid 500); 1 Oct 2009 22:52:58 -0000 Mailing-List: contact cassandra-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-user@incubator.apache.org Delivered-To: mailing list cassandra-user@incubator.apache.org Received: (qmail 45768 invoked by uid 99); 1 Oct 2009 22:52:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2009 22:52:58 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ikatkov@gmail.com designates 209.85.218.226 as permitted sender) Received: from [209.85.218.226] (HELO mail-bw0-f226.google.com) (209.85.218.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2009 22:52:48 +0000 Received: by bwz26 with SMTP id 26so529914bwz.12 for ; Thu, 01 Oct 2009 15:51:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:content-type; bh=7qe6EZCnIc6N7t4HsUQS4nuo9U0XhORpnsItjuQBL3g=; b=MlJihd8x2/X/q/2i80Og33TBzwo80XRVQ8fDBo5+eMP/x8c7kPg05wcPTe8/e3lKqR v7ycIUqK3WzzL04AawRycr4CbBXBkNv7DUwmO/iPAUbNeyP5gQCRfNuV/kEAWxV62xf5 KVP5Kvri7i8vWEwSmLZH4W46oMb2wAp28giL8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=ZKGAgn2V0HWROjo9L0DPeI13s74bEGYrVBwgKez3E8GEdgcBLQ3MLr7v0e0Qqgpg0M FT+eyvNOstPA3DaANw7Br9rCgosCVtYoTb4hYTHzcHJdsbMvIMXFSLVPxDqb9UMz3GwL lL7/Jry+nBphxJq9EbxuNjs2Yw6O7a9Ls458E= MIME-Version: 1.0 Received: by 10.223.62.146 with SMTP id x18mr526178fah.48.1254437488254; Thu, 01 Oct 2009 15:51:28 -0700 (PDT) From: Igor Katkov Date: Thu, 1 Oct 2009 18:51:08 -0400 Message-ID: <23b1e84e0910011551h49a6e8a0xaba1d2d6290c42e6@mail.gmail.com> Subject: Storage proxy write latency is too high To: cassandra-user@incubator.apache.org Content-Type: multipart/alternative; boundary=0015173fe6c6e161870474e77ccb X-Virus-Checked: Checked by ClamAV on apache.org --0015173fe6c6e161870474e77ccb Content-Type: text/plain; charset=ISO-8859-1 Hi, I have the following puzzle: Storage proxy write latency ~235ms CF write latency <1 ms I have 3 nodes in the cluster, Cassandra v.0.4. Tokens evenly distributed. The client connects to a node and inserts a key with ConsistencyLevel.ONE If it happen to be a local write operation is fast, same speed as in one node setup. JMX shows write latency <1 ms If it happens to be a remote insert StorageProxy sends it to a proper node. This operation is slow. JMX shows write latency ~ 235ms. In the same time, on remote node JMX shows same <1ms write latency. So it's not remote node being sluggish, it's something else. There are no pending tasks on remote node - JMX counters are always zero, network is 1Gb, idle. So I can't blame it. I profiled Cassandra server in JProfiler, could not find a thing. All this extra time is spent inside QuorumResponseHandler waiting for the condition to signal. Which should happen as soon as response is received. There is one pooled TCP connection open to remote host. Hardly a bottleneck, ThreadPoolExecutors looks OK. Any ideas why write latency it is so high? --0015173fe6c6e161870474e77ccb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

I have the following puzzle:
Storage proxy write latency ~23= 5ms
CF write latency <1 ms

I have 3 nodes in the cluster, Cass= andra v.0.4. Tokens evenly distributed.
The client connects to a node a= nd inserts a key with ConsistencyLevel.ONE
If it happen to be a local write operation is fast, same speed as in one no= de setup. JMX shows write latency <1 ms
If it happens to be a remote = insert StorageProxy sends it to a proper node. This operation is slow. JMX = shows write latency ~ 235ms.
In the same time, on remote node JMX shows same <1ms write latency. So i= t's not remote node being sluggish, it's something else.
There a= re no pending tasks on remote node - JMX counters are always zero, network = is 1Gb, idle. So I can't blame it.


I profiled Cassandra server in JProfiler, could not find a thing. A= ll this extra time is spent inside QuorumResponseHandler waiting for the co= ndition to signal. Which should happen as soon as response is received.

There is one pooled TCP connection open to remote host. Hardly a bottle= neck, ThreadPoolExecutors looks OK.

Any ideas why write latency it i= s so high?
--0015173fe6c6e161870474e77ccb--