citusdata / citusdata/citus

Rebalancing by disk size takes long to plan no moves

Open
#7,021 2 comments 0 reactions 0 assignees View on GitHub
performance schema-based-sharding
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

```
select get_rebalance_table_shards_plan(rebalance_strategy:='by_disk_size');
get_rebalance_table_shards_plan
---------------------------------
(0 rows)

Time: 11154.771 ms (00:11.155)
```

All of this time seems to be spent in getting the sizes of shard groups. It's doing one query per shard group to get the size of the complete shard group. We could optimize this by fetching sizes of all shards/shard groups from a node in one go. Probably by using `citus_shard_sizes()`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.