Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 25728 invoked from network); 15 Mar 2011 00:04:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Mar 2011 00:04:31 -0000 Received: (qmail 98994 invoked by uid 500); 15 Mar 2011 00:04:29 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 98970 invoked by uid 500); 15 Mar 2011 00:04:29 -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 98962 invoked by uid 99); 15 Mar 2011 00:04:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2011 00:04:29 +0000 X-ASF-Spam-Status: No, hits=4.0 required=5.0 tests=FREEMAIL_FROM,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of narendra.sharma@gmail.com designates 74.125.83.44 as permitted sender) Received: from [74.125.83.44] (HELO mail-gw0-f44.google.com) (74.125.83.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2011 00:04:22 +0000 Received: by gwb20 with SMTP id 20so25762gwb.31 for ; Mon, 14 Mar 2011 17:04:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=N+wZLy1hw1sfU6BStlfaP2eRaton8VED+ggK+uQR+TM=; b=Es1UgcVJAZVHqt2f6cjz6HTrK89BhAno/d5JGzioUvAa/hSL9Xh4DSl3j58TSGS1Mm KRiXH7PEYRAABL7uwP9yHb0A1+Rcxz5NYR8Q4Uaw3jo6lCqGKbbjfnf76SfMx6sVSoQi +otjse6caeTPMTMtLRzoWDrw/srJzI9GhAJMk= 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=kJg1f8xPF0ugvJ0Yt2xSUzZqWgVs0yJSY0L86x6ndwYiUhnI+xb69/RZBeGse17HS+ QdmpCgSAGco7gf9T4cdTYMitT8rmI8M2L/RJ8xowHP9z5ht+p9ApOIOg1jMy9wufqjvh itPKW80Rm02NmEMpNaPspml3DBrQeBFE7zfcc= MIME-Version: 1.0 Received: by 10.91.47.16 with SMTP id z16mr3898857agj.192.1300147441797; Mon, 14 Mar 2011 17:04:01 -0700 (PDT) Received: by 10.90.87.20 with HTTP; Mon, 14 Mar 2011 17:04:01 -0700 (PDT) In-Reply-To: References: Date: Mon, 14 Mar 2011 17:04:01 -0700 Message-ID: Subject: Re: calculating initial_token From: Narendra Sharma To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016e64ee48c6c8e51049e7a2a29 --0016e64ee48c6c8e51049e7a2a29 Content-Type: text/plain; charset=ISO-8859-1 The %age (owns) is just the arc length in terms of %age of tokens a node owns out of the total token space. It doesn't reflect the actual data. The size (load) is the real current load. -Naren On Mon, Mar 14, 2011 at 2:59 PM, Sasha Dolgy wrote: > ah, you know ... i have been reading it wrong. the output shows a > nice fancy column called "Owns" but i've only ever seen the percentage > ... the amount of data or "load" is even ... doh. thanks for the > reply. cheers > -sd > > On Mon, Mar 14, 2011 at 10:47 PM, Narendra Sharma > wrote: > > On the same page there is a section on Load Balance that talks about > python > > script to compute tokens. I believe your question is more about assigning > > new tokens and not compute tokens. > > > > 1. "nodetool loadbalance" will result in recomputation of tokens. It will > > pick tokens based on the load and not the once assigned by you. > > 2. You can either use decommission and bootstrap with new tokens OR Use > > "nodetool move" > > > > Thanks, > > Naren > > > > On Mon, Mar 14, 2011 at 1:18 PM, Sasha Dolgy wrote: > >> > >> Sorry for being a bit daft ... Wanted a bit of validation or rejection > ... > >> > >> If I have a 6 node cluster, replication factor 2 (don't think this is > >> applicable to the token decision) is the following sufficient and > >> correct for determining the tokens: > >> > >> #!/bin/bash > >> for nodes in {0..5}; > >> do > >> echo "$nodes*(2^127/5)" | bc; > >> done > >> > >> > >> > >> > >> Gives me a result of: > >> > >> 0 > >> 34028236692093846346337460743176821145 > >> 68056473384187692692674921486353642290 > >> 102084710076281539039012382229530463435 > >> 136112946768375385385349842972707284580 > >> 170141183460469231731687303715884105725 > >> > >> My ring right now is: > >> > >> > >> 10.0.0.2 Up Normal 225 KB 40.78% > >> 24053088190195663439419935163232881936 > >> 10.0.0.3 Up Normal 201.21 KB 19.17% > >> 56667357399723182105247119364967854254 > >> 10.0.0.4 Up Normal 213.15 KB 17.61% > >> 86624712919272143003828971968762407027 > >> 10.0.0.5 Up Normal 214.54 KB 11.22% > >> 105714724128406151241468359303513100912 > >> 10.0.0.6 Up Normal 206.39 KB 5.61% > >> 115259729732973155360288052970888447854 > >> 10.0.0.7 Up Normal 247.68 KB 5.61% > >> 124804735337540159479107746638263794797 > >> > >> If my new tokens are correct: > >> > >> 1. cassandra.yaml is updated on each node with new token > >> 2. node is restarted and a nodetool repair is run, or is a nodetool > >> loadbalance run > >> > >> Thanks in advance ... been staring at > >> http://wiki.apache.org/cassandra/Operations#Token_selection for too > >> long > >> > >> -- > >> Sasha Dolgy > >> sasha.dolgy@gmail.com > > > > > > > > -- > Sasha Dolgy > sasha.dolgy@gmail.com > --0016e64ee48c6c8e51049e7a2a29 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The %age (owns) is just the arc length in terms of %age of tokens a node ow= ns out of the total token space. It doesn't reflect the actual data.
The size (load) is the real current load.

-Naren


On Mon, Mar 14, 2011 at 2:59 PM, Sasha Dolgy <sdolgy@gmail.com= > wrote:
ah, you know ... i have been reading it wrong. =A0the output shows a
nice fancy column called "Owns" but i've only ever seen the p= ercentage
... the amount of data or "load" is even ... doh. =A0thanks for t= he
reply. =A0cheers
-sd

On Mon, Mar 14, 2011 at 10:47 PM, Narendra Sharma
<narendra.sharma@gmail.com<= /a>> wrote:
> On the same page there is a section on Load Balance that talks about p= ython
> script to compute tokens. I believe your question is more about assign= ing
> new tokens and not compute tokens.
>
> 1. "nodetool loadbalance" will result in recomputation of to= kens. It will
> pick tokens based on the load and not the once assigned by you.
> 2. You can either use decommission and bootstrap with new tokens OR Us= e
> "nodetool move"
>
> Thanks,
> Naren
>
> On Mon, Mar 14, 2011 at 1:18 PM, Sasha Dolgy <
sdolgy@gmail.com> wrote:
>>
>> Sorry for being a bit daft ... Wanted a bit of validation or rejec= tion ...
>>
>> If I have a 6 node cluster, replication factor 2 (don't think = this is
>> applicable to the token decision) is the following sufficient and<= br> >> correct for determining the tokens:
>>
>> #!/bin/bash
>> for nodes in {0..5};
>> do
>> =A0 =A0echo "$nodes*(2^127/5)" | bc;
>> done
>>
>>
>>
>>
>> Gives me a result of:
>>
>> 0
>> 34028236692093846346337460743176821145
>> 68056473384187692692674921486353642290
>> 102084710076281539039012382229530463435
>> 136112946768375385385349842972707284580
>> 170141183460469231731687303715884105725
>>
>> My ring right now is:
>>
>>
>> 10.0.0.2 =A0Up =A0 =A0 Normal =A0225 KB =A0 =A0 =A0 =A0 =A040.78%<= br> >> 24053088190195663439419935163232881936
>> 10.0.0.3 =A0 =A0Up =A0 =A0 Normal =A0201.21 KB =A0 =A0 =A0 19.17%<= br> >> 56667357399723182105247119364967854254
>> 10.0.0.4 =A0 Up =A0 =A0 Normal =A0213.15 KB =A0 =A0 =A0 17.61%
>> 86624712919272143003828971968762407027
>> 10.0.0.5 =A0 Up =A0 =A0 Normal =A0214.54 KB =A0 =A0 =A0 11.22%
>> 105714724128406151241468359303513100912
>> 10.0.0.6 =A0Up =A0 =A0 Normal =A0206.39 KB =A0 =A0 =A0 5.61%
>> 115259729732973155360288052970888447854
>> 10.0.0.7 =A0 =A0Up =A0 =A0 Normal =A0247.68 KB =A0 =A0 =A0 5.61% >> 124804735337540159479107746638263794797
>>
>> If my new tokens are correct:
>>
>> 1. =A0cassandra.yaml is updated on each node with new token
>> 2. =A0node is restarted and a nodetool repair is run, or is a node= tool
>> loadbalance run
>>
>> Thanks in advance ... been staring at
>> http://wiki.apache.org/cassandra/Operations#Token_s= election for too
>> long
>>
>> --
>> Sasha Dolgy
>> sasha.dolgy@gmail.com=
>
>



--

--0016e64ee48c6c8e51049e7a2a29--