What is the default number of shards per server of YugaByte? Can I change the number of default shards?
Hi @divingdiana - Thanks for the question.
yb_num_shards_per_tserver
is the parameter that controls the number of shards. It is automatically computed by the server, for example on an 8 or more CPU machine, it defaults to 8. It can be also passed in to the yb-master or yb-tserver process startup command.
So, if there are 6 yb-tservers in your cluster, then each user table will be created with 48 tablets/shards on such a 8 CPU machine.
Hope this helps. Please let us know if we can provide additional info.
1 Like