From user-return-28615-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Thu Sep 6 23:48:33 2012 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 4375DD381 for ; Thu, 6 Sep 2012 23:48:33 +0000 (UTC) Received: (qmail 84280 invoked by uid 500); 6 Sep 2012 23:48:31 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 84227 invoked by uid 500); 6 Sep 2012 23:48:30 -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 84218 invoked by uid 99); 6 Sep 2012 23:48:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2012 23:48:30 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a45.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2012 23:48:23 +0000 Received: from homiemail-a45.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a45.g.dreamhost.com (Postfix) with ESMTP id CDF434806D for ; Thu, 6 Sep 2012 16:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :content-type:message-id:mime-version:subject:date:references:to :in-reply-to; s=thelastpickle.com; bh=ZPHhsE/DvgtRT2t70NMA7hPPWl s=; b=ejwP+TgDBN8DIr/EpdCJ+iKCnKPTYuyAcirRkOSq4dXhhQNiM/jyT4o+4a 7w3DPdI1Lyb/iszaDKX8LQGv1Q3P/r+HMiPyNGsLUBcS5hFPMOOu5WIhy3iEg+wG Cl81VKoEJF/QnuoCEjKpk5Qr9sYtW3qQlLu9Pp2uTIQn2rPxY= Received: from [192.168.2.77] (unknown [116.90.132.105]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a45.g.dreamhost.com (Postfix) with ESMTPSA id 5540F48064 for ; Thu, 6 Sep 2012 16:48:02 -0700 (PDT) From: aaron morton Content-Type: multipart/alternative; boundary="Apple-Mail=_3AB3AB57-EFEB-4A3D-8BB8-DA69602F6BFB" Message-Id: <09C36334-E469-4CD3-89BC-15461EB15D91@thelastpickle.com> Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) Subject: Re: Monitoring replication lag/latency in multi DC setup Date: Fri, 7 Sep 2012 11:47:59 +1200 References: To: user@cassandra.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1486) --Apple-Mail=_3AB3AB57-EFEB-4A3D-8BB8-DA69602F6BFB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 > Is there a specific metric you can recommend? the not entirely correct but very lightweight approach would be to look = at the size of the HintsColumnFamily in the system KS.=20 If you want an exact number use the functions on the HH MBean = https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassand= ra/db/HintedHandOffManagerMBean.java Note that counting the number of hits involves counting the number of = hits, so that can take a while.=20 Cheers ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 6/09/2012, at 5:33 PM, Venkat Rama wrote: > Is there a specific metric you can recommend? >=20 > VR >=20 > On Wed, Sep 5, 2012 at 9:19 PM, Mohit Anchlia = wrote: > Cassandra exposes lot of metrics through Jconsole. You might be able = to get some information from Jconsole. >=20 >=20 > On Wed, Sep 5, 2012 at 8:47 PM, Venkat Rama = wrote: > Thanks for the quick reply, Mohit. Can we measure/monitor the size = of Hinted Handoffs? Would it be a good enough indicator of my back log? = =20 >=20 > Although we know when a network is flaky, we are interested in knowing = how much data is piling up in local DC that needs to be transferred. =20 >=20 > Greatly appreciate your help. >=20 > VR >=20 >=20 > On Wed, Sep 5, 2012 at 8:33 PM, Mohit Anchlia = wrote: > As far as I know Cassandra doesn't use internal queueing mechanism = specific to replication. Cassandra sends the write the remote DC and = after that it's upto the tcp/ip stack to deal with buffering. If = requests starts to timeout Cassandra would use HH upto certain time. For = longer outage you would have to run repair. > =20 > Also look at tcp/ip tuning parameters that are helpful with your = scenario: > =20 > http://kaivanov.blogspot.com/2010/09/linux-tcp-tuning.html > =20 > Run iperf and test the latency. >=20 > On Wed, Sep 5, 2012 at 8:22 PM, Venkat Rama = wrote: > Hi, >=20 > We have multi DC Cassandra ring with 2 DCs setup. We use = LOCAL_QUORUM for writes and reads. The network we have seen between the = DC is sometimes flaky lasting few minutes to few 10 of minutes. >=20 > I wanted to know what is the best way to measure/monitor either the = lag or replication latency between the data centers. Are there any = metrics I can monitor to find the backlog of data that needs to be = transferred? >=20 > Thanks in advance. >=20 > VR >=20 >=20 >=20 >=20 --Apple-Mail=_3AB3AB57-EFEB-4A3D-8BB8-DA69602F6BFB Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 Is there a specific metric you can = recommend?

the not entirely correct but = very lightweight approach would be to look at the size of the = HintsColumnFamily in the system KS. 


Note that counting the number of = hits involves counting the number of hits, so that can take a = while. 

Cheers


http://www.thelastpickle.com

On 6/09/2012, at 5:33 PM, Venkat Rama <venkata.s.rama@gmail.com> = wrote:

Is there a specific metric you can = recommend?

VR

On = Wed, Sep 5, 2012 at 9:19 PM, Mohit Anchlia <mohitanchlia@gmail.com> wrote:
Cassandra exposes lot = of metrics through Jconsole. You might be able to get some information = from Jconsole.


On Wed, Sep 5, 2012 at 8:47 PM, Venkat Rama = <venkata.s.rama@gmail.com> wrote:
Thanks for the quick = reply, Mohit.    Can we measure/monitor the size of Hinted = Handoffs?  Would it be a good enough indicator of my back log? =  =20

Although we know when a network is flaky, we are interested in = knowing how much data is piling up in local DC that needs to be = transferred.  

Greatly appreciate your help.

VR


On Wed, Sep 5, 2012 at 8:33 PM, Mohit Anchlia = <mohitanchlia@gmail.com> wrote:
As far as I know Cassandra doesn't use internal queueing mechanism = specific to replication. Cassandra sends the write the remote DC and = after that it's upto the tcp/ip stack to deal with buffering. If = requests starts to timeout Cassandra would use HH upto certain time. For = longer outage you would have to run repair.
 
Also look at tcp/ip tuning parameters that are helpful with your = scenario:
 
 
Run iperf and test the latency.

On Wed, Sep 5, 2012 at 8:22 PM, Venkat Rama = <venkata.s.rama@gmail.com> wrote:
Hi,=20

We have multi DC Cassandra ring with 2 DCs setup.   We use = LOCAL_QUORUM for writes and reads.  The network we have seen = between the DC is sometimes flaky lasting few minutes to few 10 of = minutes.

I wanted to know what is the best way to measure/monitor either the = lag or replication latency between the data centers.  Are there any = metrics I can monitor to find the backlog of data that needs to be = transferred?

Thanks in advance.

=
VR





= --Apple-Mail=_3AB3AB57-EFEB-4A3D-8BB8-DA69602F6BFB--