Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

improve load balance #124

Open
qinzuoyan opened this issue Jul 10, 2018 · 2 comments
Open

improve load balance #124

qinzuoyan opened this issue Jul 10, 2018 · 2 comments
Assignees
Labels
type/enhancement Indicates new feature requests

Comments

@qinzuoyan
Copy link
Member

  • consider balance of placing replicas on ssd: do not place too many replicas of one table on one ssd
  • consider balance of dispatching replication thread: do not dispatch too many replicas of on table on one replication thread
@qinzuoyan qinzuoyan added the type/enhancement Indicates new feature requests label Jul 10, 2018
@shengofsun
Copy link
Contributor

placing replicas on ssd is more or less balanced with a greedy algorithm currently.

@qinzuoyan
Copy link
Member Author

对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数据还是很不均匀的。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

2 participants