You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/08/14 03:14:08 UTC

[GitHub] [incubator-doris] weizuo93 edited a comment on issue #4329: [Proposal] Optimize the disk selection strategy for tablet creation

weizuo93 edited a comment on issue #4329:
URL: https://github.com/apache/incubator-doris/issues/4329#issuecomment-673859068


   Doris BE节点中创建tablet时磁盘选择的策略是随机选择一个磁盘,具体实现方法是:首先,将所有满足要求(storage medium type)的磁盘存放在一个vector中;然后,使用random_shuffle()将vector中磁盘顺序打乱;最后,创建tablet时,从vector中的第一磁盘开始尝试,如果创建失败,换下一个磁盘,直到在某一个磁盘上成功创建tablet。这种随机的磁盘选择策略并没有考虑不同磁盘上tablet的分布问题,导致集群运行一段时间后,BE节点上不同磁盘上的tablet数量很可能分布不均衡。
   
   如果采用“two random choices”策略进行tablet创建时的磁盘选择,则会有更好的效果。“two random choices”策略的核心思想是:首先,从所有满足要求(storage medium type)的磁盘中随机选择两个磁盘;然后,从随机选出的两个磁盘中选择tablet数量较少的磁盘用于tablet的创建。通过实验发现,“two random choices”策略能够更好地保证集群运行过程中,BE节点上不同磁盘上的tablet更均衡地分布;另外,当初始状态BE节点上不同磁盘的tablet分布不均衡时,two random choices”策略也能在后续随着tablet的创建而使得不同磁盘上的tablet分布逐渐趋于均衡。
   @morningman 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org