Open qinzuoyan opened 6 years ago
placing replicas on ssd is more or less balanced with a greedy algorithm currently.
对c3srv-miot集群进行扩容后,各节点的各个线程所服务的replica数量的分布情况:
扩容前(5个节点)
node \ thread_id 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #replica max #max
10.142.11.54:45801 2 4 1 4 4 4 4 5 3 4 4 3 3 2 3 3 4 2 4 3 3 3 4 1 77 5 1
10.142.12.13:45801 4 2 4 2 2 3 5 4 2 1 3 4 6 5 4 2 4 3 2 2 2 4 3 4 77 6 1
10.142.12.33:45801 3 1 4 4 2 2 4 2 5 5 5 2 5 4 2 4 2 3 5 2 3 2 3 3 77 5 5
10.142.12.34:45801 3 4 2 2 3 4 2 4 6 3 3 5 2 1 3 3 3 3 2 5 3 4 3 3 76 6 1
10.142.12.53:45801 3 4 4 3 4 2 3 3 2 5 3 4 2 6 3 3 2 4 2 3 4 2 2 4 77 6 1
6
扩容后(10个节点)
node \ thread_id 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #replica max #max
10.136.8.3:45801 1 3 1 1 2 2 1 2 1 2 2 2 2 1 2 2 2 3 1 1 1 1 1 1 38 3 2
10.142.11.54:45801 1 1 0 3 2 1 2 3 2 1 3 2 2 1 1 2 2 0 1 2 2 2 3 0 39 3 4
10.142.12.13:45801 3 1 1 1 2 3 2 2 1 0 2 3 3 3 1 0 3 2 1 1 0 1 2 1 39 3 6
10.142.12.33:45801 0 1 1 1 1 1 2 2 3 4 1 0 2 3 1 3 1 2 4 1 2 0 2 1 39 4 2
10.142.12.34:45801 2 3 1 1 1 1 1 1 2 2 2 3 1 1 3 0 1 2 0 2 0 4 1 3 38 4 1
10.142.12.53:45801 1 3 4 2 3 1 1 0 1 3 1 2 1 1 1 2 0 2 1 2 3 1 1 2 39 4 1
10.142.45.55:45801 1 1 2 1 3 2 2 2 5 2 0 2 0 1 1 2 2 0 2 2 2 1 2 0 38 5 1
10.142.51.13:45801 2 0 2 1 1 1 2 1 1 2 3 2 1 5 2 1 2 1 0 1 2 0 2 3 38 5 1
10.142.51.14:45801 2 1 2 4 0 1 2 2 0 0 3 1 4 1 1 2 0 2 2 1 1 2 1 3 38 4 2
10.142.51.15:45801 2 1 1 0 0 2 3 3 2 2 1 1 2 1 2 1 2 1 3 2 2 3 0 1 38 3 4
5
可以看到,各个线程服务的replica数据还是很不均匀的。