Hi Manu, Partition distribution is determined by the claim algorithm. In this case it more evenly distributes partitions in a "from scratch" scenario vs. adding nodes. There has been work to improve the algorithm that you can find here: https://github.com/basho/riak_core/pull/183
-- Luke Bakken CSE [email protected] On Mon, Jun 2, 2014 at 11:51 PM, Manu Mäki - Compare Group < [email protected]> wrote: > Hi Luke, > > Do you have any idea why creating the cluster from scratch creates “more > balanced” cluster? Is this because of the actual partition sizes not being > of equal size? > > > Manu > > From: Luke Bakken <[email protected]> > Date: Monday 2 June 2014 19:34 > To: Manu Maki <[email protected]> > Cc: "[email protected]" <[email protected]> > Subject: Re: Partition distribution between nodes > > Hi Manu, > > I see similar vnode distribution in my local dev cluster. This is due to > 64 not being evenly divisible by 5. > > 4 nodes: > > $ dev1/bin/riak-admin member-status > ================================= Membership > ================================== > Status Ring Pending Node > > ------------------------------------------------------------------------------- > valid 25.0% -- '[email protected]' > valid 25.0% -- '[email protected]' > valid 25.0% -- '[email protected]' > valid 25.0% -- '[email protected]' > > ------------------------------------------------------------------------------- > > 5th node added: > > $ dev1/bin/riak-admin member-status > ================================= Membership > ================================== > Status Ring Pending Node > > ------------------------------------------------------------------------------- > valid 18.8% -- '[email protected]' > valid 18.8% -- '[email protected]' > valid 18.8% -- '[email protected]' > valid 25.0% -- '[email protected]' > valid 18.8% -- '[email protected]' > > ------------------------------------------------------------------------------- > > Cluster *from scratch* with 5 nodes: > > $ dev1/bin/riak-admin member-status > ================================= Membership > ================================== > Status Ring Pending Node > > ------------------------------------------------------------------------------- > valid 20.3% -- '[email protected]' > valid 20.3% -- '[email protected]' > valid 20.3% -- '[email protected]' > valid 20.3% -- '[email protected]' > valid 18.8% -- '[email protected]' > > ------------------------------------------------------------------------------- > > -- > Luke Bakken > CSE > [email protected] > > > On Mon, Jun 2, 2014 at 6:52 AM, Manu Mäki - Compare Group < > [email protected]> wrote: > >> Hi all, >> >> In the beginning we were running four nodes with n-value of 2. The >> partitions were distributed 25% for each node. Now when we added fifth node >> (still having n-value of 2), the partitions are distributed in following >> way: 25%, 19%, 19%, 19% and 19%. The ring size in use is 64. Is this normal >> behavior? The cluster seems to be working correctly. However I was >> expecting each node to have 20% of the partitions. >> >> >> Best regards, >> Manu Mäki >> >> _______________________________________________ >> riak-users mailing list >> [email protected] >> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com >> >> >
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
