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 8028510487 for ; Wed, 12 Jun 2013 14:54:41 +0000 (UTC) Received: (qmail 41849 invoked by uid 500); 12 Jun 2013 14:54:38 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 41839 invoked by uid 500); 12 Jun 2013 14:54:38 -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 41831 invoked by uid 99); 12 Jun 2013 14:54:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jun 2013 14:54:37 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of arodrime@gmail.com designates 209.85.217.180 as permitted sender) Received: from [209.85.217.180] (HELO mail-lb0-f180.google.com) (209.85.217.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jun 2013 14:54:32 +0000 Received: by mail-lb0-f180.google.com with SMTP id o10so6323626lbi.11 for ; Wed, 12 Jun 2013 07:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=JW+WYQTVE0KBFkhI0+VWT0Yq4280YsojQggYxIGUf64=; b=yNoO8NCZZBCdbb/bWBkjFNRJBCFp1pUwagYbuu2b4Oa6x4d74HDrwMtZgY03nJVmRz HaZRwj64BfMtTcFn9eCostKyBtsZSLPyoNu5KrduKWZzcPU7n+CTgsqoj+4vz3BQCUhH 9iqI6T9YPwc3GzrgsE7EmGGYKvwj/1lU4WrVSSf7jJtwx4PkajxG49DZdZdgMUuA1qin T5Gi7XG8fmwF/w+cQ4V7k4MnL1qZZyMDvmpNMstri0n9LADEsuQaAqxLIrzxKWl1d+Lk eqv5AZLbEj/7v+4pqLzojHE9qoZ+mD9/86QJA55RpTuhsBqCikg9ZurhswuC9dNuqBHO HUaw== X-Received: by 10.152.28.66 with SMTP id z2mr3858027lag.5.1371048851364; Wed, 12 Jun 2013 07:54:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.7.168 with HTTP; Wed, 12 Jun 2013 07:53:51 -0700 (PDT) In-Reply-To: References: From: Alain RODRIGUEZ Date: Wed, 12 Jun 2013 16:53:51 +0200 Message-ID: Subject: Re: Multiple data center performance To: user@cassandra.apache.org Cc: comomore@gmail.com Content-Type: multipart/alternative; boundary=089e0158c3d4c162d804def62f08 X-Virus-Checked: Checked by ClamAV on apache.org --089e0158c3d4c162d804def62f08 Content-Type: text/plain; charset=ISO-8859-1 Crystal clear, we use a lot of counters and I am always happy to learn this kind of things. Thanks a lot. Alain 2013/6/12 Sylvain Lebresne > > Is there something special of this kind regarding counters over multiDC ? >> > > No. Counters behave exactly as other writes as far the consistency level > is concerned. > Technically, the counter write path is different from the normal write > path in the sense that a counter write > will be written to one replica first and then written to the rest of the > replicas in a second time (with a local > read on the first replica in between, which is why counter writes are > slower than normal ones). But, > outside of the obvious performance impact, this has no impact on the > behavior observed from a > client point of view. The consistency level has the exact same meaning in > particular (though one > small difference is that counters don't support CL.ANY). > > -- > Sylvain > > >> >> Thank you anyway Sylvain >> >> >> 2013/6/12 Sylvain Lebresne >> >>> It is the normal behavior, but that's true of any update, not only of >>> counters. >>> >>> The consistency level does *not* influence which replica are written to. >>> Cassandra always write to all replicas. The consistency level only decides >>> how replica acknowledgement are waited for. >>> >>> -- >>> Sylvain >>> >>> >>> On Wed, Jun 12, 2013 at 4:56 AM, Alain RODRIGUEZ wrote: >>> >>>> "counter will replicate to all replicas during write regardless the >>>> consistency level" >>>> >>>> I that the normal behavior or a bug ? >>>> >>>> >>>> 2013/6/11 Daning Wang >>>> >>>>> It is counter caused the problem. counter will replicate to all >>>>> replicas during write regardless the consistency level. >>>>> >>>>> In our case. we don't need to sync the counter across the center. so >>>>> moving counter to new keyspace and all the replica in one >>>>> center solved problem. >>>>> >>>>> There is option replicate_on_write on table. If you turn that off for >>>>> counter might have better performance. but you are on high risk to lose >>>>> data and create inconsistency. I did not try this option. >>>>> >>>>> Daning >>>>> >>>>> >>>>> On Sat, Jun 8, 2013 at 6:53 AM, srmore wrote: >>>>> >>>>>> I am seeing the similar behavior, in my case I have 2 nodes in each >>>>>> datacenter and one node always has high latency (equal to the latency >>>>>> between the two datacenters). When one of the datacenters is shutdown the >>>>>> latency drops. >>>>>> >>>>>> I am curious to know whether anyone else has these issues and if yes >>>>>> how did to get around it. >>>>>> >>>>>> Thanks ! >>>>>> >>>>>> >>>>>> On Fri, Jun 7, 2013 at 11:49 PM, Daning Wang wrote: >>>>>> >>>>>>> We have deployed multi-center but got performance issue. When the >>>>>>> nodes on other center are up, the read response time from clients is 4 or 5 >>>>>>> times higher. when we take those nodes down, the response time becomes >>>>>>> normal(compare to the time before we changed to multi-center). >>>>>>> >>>>>>> We have high volume on the cluster, the consistency level is one for >>>>>>> read. so my understanding is most of traffic between data center should be >>>>>>> read repair. but seems that could not create much delay. >>>>>>> >>>>>>> What could cause the problem? how to debug this? >>>>>>> >>>>>>> Here is the keyspace, >>>>>>> >>>>>>> [default@dsat] describe dsat; >>>>>>> Keyspace: dsat: >>>>>>> Replication Strategy: >>>>>>> org.apache.cassandra.locator.NetworkTopologyStrategy >>>>>>> Durable Writes: true >>>>>>> Options: [dc2:1, dc1:3] >>>>>>> Column Families: >>>>>>> ColumnFamily: categorization_cache >>>>>>> >>>>>>> >>>>>>> Ring >>>>>>> >>>>>>> Datacenter: dc1 >>>>>>> =============== >>>>>>> Status=Up/Down >>>>>>> |/ State=Normal/Leaving/Joining/Moving >>>>>>> -- Address Load Tokens Owns (effective) Host ID >>>>>>> Rack >>>>>>> UN xx.xx.xx..111 59.2 GB 256 37.5% >>>>>>> 4d6ed8d6-870d-4963-8844-08268607757e rac1 >>>>>>> DN xx.xx.xx..121 99.63 GB 256 37.5% >>>>>>> 9d0d56ce-baf6-4440-a233-ad6f1d564602 rac1 >>>>>>> UN xx.xx.xx..120 66.32 GB 256 37.5% >>>>>>> 0fd912fb-3187-462b-8c8a-7d223751b649 rac1 >>>>>>> UN xx.xx.xx..118 63.61 GB 256 37.5% >>>>>>> 3c6e6862-ab14-4a8c-9593-49631645349d rac1 >>>>>>> UN xx.xx.xx..117 68.16 GB 256 37.5% >>>>>>> ee6cdf23-d5e4-4998-a2db-f6c0ce41035a rac1 >>>>>>> UN xx.xx.xx..116 32.41 GB 256 37.5% >>>>>>> f783eeef-1c51-4f91-ab7c-a60669816770 rac1 >>>>>>> UN xx.xx.xx..115 64.24 GB 256 37.5% >>>>>>> e75105fb-b330-4f40-aa4f-8e6e11838e37 rac1 >>>>>>> UN xx.xx.xx..112 61.32 GB 256 37.5% >>>>>>> 2547ee54-88dd-4994-a1ad-d9ba367ed11f rac1 >>>>>>> Datacenter: dc2 >>>>>>> =============== >>>>>>> Status=Up/Down >>>>>>> |/ State=Normal/Leaving/Joining/Moving >>>>>>> -- Address Load Tokens Owns (effective) Host ID >>>>>>> Rack >>>>>>> DN xx.xx.xx.199 58.39 GB 256 50.0% >>>>>>> 6954754a-e9df-4b3c-aca7-146b938515d8 rac1 >>>>>>> DN xx.xx.xx..61 33.79 GB 256 50.0% >>>>>>> 91b8d510-966a-4f2d-a666-d7edbe986a1c rac1 >>>>>>> >>>>>>> >>>>>>> Thank you in advance, >>>>>>> >>>>>>> Daning >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > --089e0158c3d4c162d804def62f08 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Crystal clear, we use a lot of counters and I am always ha= ppy to learn this kind of things.

Thanks a lot.

Alain


2013/6/12 Sylvain Lebresne <sylvain@= datastax.com>

=
Is t= here something special of this kind regarding counters over multiDC ?

No. Counters behave exactly as= other writes as far the consistency level is concerned.
Technica= lly, the counter write path is different from the normal write path in the = sense that a counter write
will be written to one replica first and then written to the rest of t= he replicas in a second time (with a local
read on the first repl= ica in between, which is why counter writes are slower than normal ones). B= ut,
outside of the obvious performance impact, this has no impact on the b= ehavior observed from a
client point of view. The consistency lev= el has the exact same meaning in particular (though one
small difference is that counters don't support CL.ANY).

--
Sylvain
=A0

Thank you anyway Sylvain


2013/6/12 Sylvain Lebresne <sylvain@datastax.com>
It is the normal behavior, = but that's true of any update, not only of counters.

The consistency level does *not* influence which replica are written to. Ca= ssandra always write to all replicas. The consistency level only decides ho= w replica acknowledgement are waited for.

--
Sylvain


On Wed, Jun 12, 2013 at 4:= 56 AM, Alain RODRIGUEZ <arodrime@gmail.com> wrote:
"counter will replicate to all r= eplicas during write regardless the consistency level"

I that the normal behavior or a bug ?
=


2013/6/11 Daning Wang <daning@netseer.com>
It is counter caused the pr= oblem. counter will replicate to all replicas during write regardless the c= onsistency level.=A0

In our case. we don't need to sync the counter across th= e center. so moving counter to new keyspace and all the replica in one cent= er=A0solved=A0problem.

There is option=A0replicate_on_write on table. If you t= urn that off for counter might have better performance. but you are on high= risk to lose data and create inconsistency. I did not try this option.

Daning


On Sat, Jun 8, 2013 at 6:5= 3 AM, srmore <comomore@gmail.com> wrote:
I am seeing the s= imilar behavior, in my case I have 2 nodes in each datacenter and one node = always has high latency (equal to the latency between the two datacenters).= When one of the datacenters is shutdown the latency drops.

I am curious to know whether anyone else has these issues and if = yes how did to get around it.

Thanks !


On Fri, Jun 7, 2013 at 11:49 PM, Daning Wang <daning@netseer.com>= wrote:
We have deployed multi-cent= er but got performance issue. When the nodes on other center are up, the re= ad response time from clients is 4 or 5 times higher. when we take those no= des down, the response time becomes normal(compare to the time before we ch= anged to multi-center).

We have high volume on the cluster, the consistency level is= one for read. so my understanding is most of traffic between data center s= hould be read repair. but seems that could not create much delay.

What could cause the problem? how to debug this?
<= div>
Here is the keyspace,

[def= ault@dsat] describe dsat;
Keyspace: dsat:
=A0 Replication Strategy: org.apache.cassandra.lo= cator.NetworkTopologyStrategy
=A0 Durable Writes: true
= =A0 =A0 Options: [dc2:1, dc1:3]
=A0 Column Families:
= =A0 =A0 ColumnFamily: categorization_cache
=A0

Ring

Datace= nter: dc1
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=
Status=3DUp/Down
|/ State=3DNormal/Leaving/Joining/Moving
-- =A0Address =A0 =A0 =A0 =A0 =A0 Load =A0 =A0 =A0 Tokens =A0Owns (= effective) =A0Host ID =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 Rack
UN =A0xx.xx.xx..111 =A0 =A0 =A0 59.2 GB =A0 =A0256 =A0 =A0 37.5% =A0 = =A0 =A0 =A0 =A0 =A0 4d6ed8d6-870d-4963-8844-08268607757e =A0rac1
= DN =A0xx.xx.xx..121 =A0 =A0 =A0 99.63 GB =A0 256 =A0 =A0 37.5% =A0 =A0 =A0 = =A0 =A0 =A0 9d0d56ce-baf6-4440-a233-ad6f1d564602 =A0rac1
UN =A0xx.xx.xx..120 =A0 =A0 =A0 66.32 GB =A0 256 =A0 =A0 37.5% =A0 =A0= =A0 =A0 =A0 =A0 0fd912fb-3187-462b-8c8a-7d223751b649 =A0rac1
UN = =A0xx.xx.xx..118 =A0 =A0 =A0 63.61 GB =A0 256 =A0 =A0 37.5% =A0 =A0 =A0 =A0= =A0 =A0 3c6e6862-ab14-4a8c-9593-49631645349d =A0rac1
UN =A0xx.xx.xx..117 =A0 =A0 =A0 68.16 GB =A0 256 =A0 =A0 37.5% =A0 =A0= =A0 =A0 =A0 =A0 ee6cdf23-d5e4-4998-a2db-f6c0ce41035a =A0rac1
UN = =A0xx.xx.xx..116 =A0 =A0 =A0 32.41 GB =A0 256 =A0 =A0 37.5% =A0 =A0 =A0 =A0= =A0 =A0 f783eeef-1c51-4f91-ab7c-a60669816770 =A0rac1
UN =A0xx.xx.xx..115 =A0 =A0 =A0 64.24 GB =A0 256 =A0 =A0 37.5% =A0 =A0= =A0 =A0 =A0 =A0 e75105fb-b330-4f40-aa4f-8e6e11838e37 =A0rac1
UN = =A0xx.xx.xx..112 =A0 =A0 =A0 61.32 GB =A0 256 =A0 =A0 37.5% =A0 =A0 =A0 =A0= =A0 =A0 2547ee54-88dd-4994-a1ad-d9ba367ed11f =A0rac1
Datacenter: dc2
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D
Status=3DUp/Down
|/ State=3DNormal/Leaving/Joining/= Moving
-- =A0Address =A0 =A0 =A0 =A0 =A0 Load =A0 =A0 =A0 Tokens = =A0Owns (effective) =A0Host ID =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 Rack
DN =A0xx.xx.xx.199 =A0 =A058.39 GB =A0 256 =A0 =A0 50.0% =A0 =A0 =A0 = =A0 =A0 =A0 6954754a-e9df-4b3c-aca7-146b938515d8 =A0rac1
DN =A0xx= .xx.xx..61 =A0 =A0 =A033.79 GB =A0 256 =A0 =A0 50.0% =A0 =A0 =A0 =A0 =A0 = =A0 91b8d510-966a-4f2d-a666-d7edbe986a1c =A0rac1


Thank you in advance,
Daning








--089e0158c3d4c162d804def62f08--