Closed bnuzhouwei closed 11 months ago
Hi @bnuzhouwei
What is your server hardware?
What's the replication factor?
How many tablets do you have? (posting a screenshot of http://master-ip:7000/tablet-servers
Also note that it's yb-tserver and not yb-master.
Server hadrware is
Intel i5 1235u with 32GB RAM and 2T NVME SSD
It's probably because of the big number of tablets (User Tablet-Peers column).
Can you try dropping the tables and see if the load is lower?
Think having 620 tablets instead of 3100.
I have only about 80 tables, and each table has no more than 2000 rows, why it create so many tablets. drop tables will lose data.... Can it recreate much less tablets when keep the data?
I have only about 80 tables
You probably also have secondary indexes on them.
why it create so many tablets
It's using this flag https://docs.yugabyte.com/preview/reference/configuration/yb-tserver/#ysql-num-shards-per-tserver
Can it recreate much less tablets when keep the data?
It can't for now merge tablets. You can shut down the db, create a new one using a new data-directory and recreate the tables with less tablets (by changing the option above) and re-chcking CPU usage.
3112 tablets ÷ 8 (number of tablets per table/index) = 389 (tables + indexes in total that you probably have)
Or you can use a colocated db https://docs.yugabyte.com/preview/architecture/docdb-sharding/colocated-tables/
Jira Link: DB-4449
I use docker-compose built a cluster to test. When i call top to see what cost cpus, I find the yb-master cost cpu rate always larger than 10%, while other databases such as tidb, crdb cost much lower.
It is strange that the cluster has very low load, but cost much cpu. Why?
It seems everythings is OK, but cost much CPU..