Yasmeen
Yasmeen

Reputation: 819

What is the difference between owns and owns(effective) in cassandra

I am trying to check status of nodes using nodetool When i try nodetool status i get the following output

--  Address       Load       Tokens  Owns   Host ID                               Rack
UN  192.168.1.12  702.25 MB  256     23.5%  3ef5a6e7-123b-48cd-b486-8b6f61121a0c  RAC2
UN  192.168.1.31  884.69 MB  256     25.6%  ff0f1746-0379-4928-84b0-11efabbeea13  RAC1
UN  192.168.1.8   2.84 MB    1       0.1%   5fb9e1fa-c181-43a9-ac77-5578a1ee2086  RAC1
UN  192.168.1.27  692.18 MB  256     24.1%  95659096-97ef-419f-bd82-693f19ad7679  RAC2
UN  192.168.1.32  1.02 GB    256     26.7%  25a0c51a-9ffd-40f2-9e20-6899f36e8f3c  RAC1

But When i check status for a particular keyspace e.g nodetool status keyspacetest

--  Address       Load       Tokens  Owns (effective)  Host ID                               Rack
UN  192.168.1.12  702.16 MB  256     49.2%             3ef5a6e7-123b-48cd-b486-8b6f61121a0c  RAC2
UN  192.168.1.31  884.69 MB  256     48.0%             ff0f1746-0379-4928-84b0-11efabbeea13  RAC1
UN  192.168.1.8   2.84 MB    1       0.1%              5fb9e1fa-c181-43a9-ac77-5578a1ee2086  RAC1
UN  192.168.1.27  692.18 MB  256     50.8%             95659096-97ef-419f-bd82-693f19ad7679  RAC2
UN  192.168.1.32  1.02 GB    256     51.9%             25a0c51a-9ffd-40f2-9e20-6899f36e8f3c  RAC1

Now from the Owns % i understand how much % of data each nodes has and sum of all that give me 100% But for Owns(Effective) the % values is very different and the sum is around 200%.

I am confused with this stats.Can anyone help me out with this.

Upvotes: 0

Views: 3334

Answers (1)

Marcin Pietraszek
Marcin Pietraszek

Reputation: 3214

Owns (effective) shows numbers where replication factor is taken into account.

Thus in case of nodetool status keyspacetest it shows how much data with replicas each node is holding.

In other words, in your cluster you have 5 nodes (with unevenly spreaded vnodes). 4 out of 5 nodes has effectively ~50% of existing data in that keyspace.

Upvotes: 2

Related Questions