Ask Your Question
0

The partitions do not follow the weight value?

asked 2014-02-17 06:55:48 -0600

Hi, I found the partitions don't change with the weight. Could you please check the below test: There is only 1 zone. Initial create ring: swift-ring-builder object.builder create 16 3 0

  1. The ring info after add 9.111.67.11 with 6disks.

command: swift-ring-builder account.builder add r1z1-9.111.67.11:6002/sdc 20 swift-ring-builder container.builder add r1z1-9.111.67.11:6001/sdc 20 swift-ring-builder object.builder add r1z1-9.111.67.11:6000/sdc 20 swift-ring-builder account.builder add r1z1-9.111.67.11:6002/sdg 20 swift-ring-builder container.builder add r1z1-9.111.67.11:6001/sdg 20 swift-ring-builder object.builder add r1z1-9.111.67.11:6000/sdg 20 swift-ring-builder account.builder add r1z1-9.111.67.11:6002/sdd 20 swift-ring-builder container.builder add r1z1-9.111.67.11:6001/sdd 20 swift-ring-builder object.builder add r1z1-9.111.67.11:6000/sdd 20 swift-ring-builder account.builder add r1z1-9.111.67.11:6002/sdb 20 swift-ring-builder container.builder add r1z1-9.111.67.11:6001/sdb 20 swift-ring-builder object.builder add r1z1-9.111.67.11:6000/sdb 20 swift-ring-builder account.builder add r1z1-9.111.67.11:6002/sde 20 swift-ring-builder container.builder add r1z1-9.111.67.11:6001/sde 20 swift-ring-builder object.builder add r1z1-9.111.67.11:6000/sde 20 swift-ring-builder account.builder add r1z1-9.111.67.11:6002/sdf 20 swift-ring-builder container.builder add r1z1-9.111.67.11:6001/sdf 20 swift-ring-builder object.builder add r1z1-9.111.67.11:6000/sdf 20 swift-ring-builder account.builder rebalance swift-ring-builder container.builder rebalance swift-ring-builder object.builder rebalance

Check result:

swift-ring-builder object.builder

65536 partitions, 3.000000 replicas, 1 regions, 1 zones, 6 devices, 0.00 balance The minimum number of hours before a partition can be reassigned is 0 Devices: id region zone ip address port replication ip replication port name weight partitions balance meta 0 1 1 9.111.67.11 6000 9.111.67.11 6000 sdc 20.00 32768 0.00 1 1 1 9.111.67.11 6000 9.111.67.11 6000 sdg 20.00 32768 0.00 2 1 1 9.111.67.11 6000 9.111.67.11 6000 sdd 20.00 32768 0.00 3 1 1 9.111.67.11 6000 9.111.67.11 6000 sdb 20.00 32768 0.00 4 1 1 9.111.67.11 6000 9.111.67.11 6000 sde 20.00 32768 0.00 5 1 1 9.111.67.11 6000 9.111.67.11 6000 sdf 20.00 32768 0.00

  1. The ring info after add 9.111.67.12 with 7 disks.

swift-ring-builder account.builder add r1z1-9.111.67.12:6002/sde 20 swift-ring-builder container.builder add r1z1-9.111.67.12:6001/sde 20 swift-ring-builder object.builder add r1z1-9.111.67.12:6000/sde 20 swift-ring-builder account.builder add r1z1-9.111.67.12:6002/sdb 20 swift-ring-builder container.builder add r1z1-9.111.67.12:6001/sdb 20 swift-ring-builder object.builder add r1z1-9.111.67.12:6000/sdb 20 swift-ring-builder account.builder add r1z1-9 ... (more)

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2014-02-18 09:15:28 -0600

tonytkdk gravatar image

it's balanced as possible as it can tho. As you can see that each node holds 65536 partitions that the total partitions of a replica. IP address is one of the condition for partition assigning. If the total weight is same on each node, then you will get the result as your expectation.

edit flag offensive delete link more
0

answered 2014-02-20 05:12:52 -0600

Thanks Hugo Kou, that solved my question.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-02-17 06:55:48 -0600

Seen: 44 times

Last updated: Feb 20 '14