Danila Fediashchin
11/21/2026, 6:08 PMRocky
11/21/2026, 6:08 PMsql
SHOW COMPUTE NODES; -- TabletNum per node
SELECT BE_ID, count(*) FROM information_schema.be_tablets
WHERE TABLE_ID = <id> GROUP BY BE_ID;
SHOW TABLET FROM db.tbl; -- BackendId column
If TabletNum is 30 on one node and ~0 elsewhere, it's A. If it's spread out but your query is still slow, it's B (or a cache/compaction issue — see the shared-data FAQ on slow queries).
A. Balancing knobs for shared-data (4.1)
Placement is owned by StarMgr/StarOS inside the FE, driven by these mutable FE configs:
• lake_enable_balance_tablets_between_workers — default true.
• lake_balance_tablets_threshold — default `0.15`; balancing triggers when (MAX(tablets) - MIN(tablets)) / AVERAGE(tablets) exceeds it.
• tablet_sched_disable_balance — default `false`; also handed to StarMgr as the switch disabling its background shard checks.
With your numbers (20 nodes, 30 tablets) the imbalance factor is roughly (30-0)/1.5 = 20, far above 0.15, so a healthy balancer should be moving shards. If nothing moves, verify lake_enable_balance_tablets_between_workers=true and tablet_sched_disable_balance=false first.
One caveat I can't fully resolve for you: there's a documented known issue where "replicas drift out of place after scale-out or warmup, and tablet balancing is slow", fixed in 4.0.11 by a bundled StarOS upgrade, with no backport listed for 4.1 or 3.5. On 4.1.8 you'd still have the old StarOS component. So if the configs are right and tablets simply don't move, this looks like that bug — the docs don't say which tablets StarMgr moves or how fast, and there's no SQL statement to pin or force-move a tablet. That's a case to raise on GitHub / community Slack with SHOW COMPUTE NODES and information_schema.be_tablets output.
B. 30 tablets is too few for 20 nodes — fix bucketing too
Even perfectly balanced, 30 tablets over 20 nodes = 1–2 tablets per node, so scan parallelism is capped at 30 regardless. And a single tablet is scanned by one CN (intra-tablet parallelism via enable_tablet_internal_parallel, default true, splits it into segments on that node — it does not spread the tablet across nodes).
For 4.1 shared-data with large-capacity tablets, the docs recommend 10–50 GB per tablet, max 100 GB. Size your buckets from the daily partition size rather than thinking in "1 tablet per partition":
• New partitions, keep them auto-sized and StarRocks infers per-partition: ALTER TABLE t DISTRIBUTED BY HASH(k) DEFAULT BUCKETS n; (or just omit BUCKETS at partition creation with enable_auto_tablet_distribution=true). Note auto-inference uses node count including CNs, so a daily partition created now in a 20-CN cluster will get ~30 buckets by default.
• Existing partitions: ALTER TABLE t PARTITIONS (p1, p2, ...) DISTRIBUTED BY HASH(k) BUCKETS n; — an async rewrite job. Pause loads while it runs: there's a known issue where a concurrent load with ALTER ... DISTRIBUTED BY reports FINISHED but loses rows (PR 77754, merged on branch-4.1 but not yet released as of the docs I have).
• Also watch the 4.1 range-distribution/auto split-merge path: auto-merge could merge small tablets back if partitions are small relative to tablet_reshard_target_size × CN count. That specific churn bug was fixed in 4.1.2, so 4.1.8 is fine there.
Also check bucket-key skew — if the hash key is skewed, even enough buckets land on few nodes (the shared-data FAQ calls out "poor bucketing or skewed bucket keys cause queries to run on only a subset of nodes").Rocky
11/21/2026, 6:08 PMSHOW COMPUTE NODES TabletNum column and SHOW PARTITIONS bucket counts I can be more specific.
References
• administration/configuration/FE_parameters/stats_storage.md
• faq/shared_data_faq.md
• administration/configuration/FE_parameters/shared_lake_other.md
• faq/operation_maintenance_faq.md
• knowledge/qa/shared_data_cn_scheduling_and_tablet_mapping.md (StarRocks knowledge base)
• knowledge/known_issues/shared_data.md (StarRocks knowledge base)Danila Fediashchin
11/21/2026, 6:10 PMRocky
11/21/2026, 6:11 PMlake_balance_tablets_threshold (default 0.15) triggers a balance when f = (MAX(tablets) - MIN(tablets)) / AVERAGE(tablets) exceeds it — and the criterion is explicitly "tablet count, not data size or query load". With ~20k tablets per node, 30 extra tablets on one worker moves f by roughly 30/20000 ≈ 0.0015, i.e. ~100× below the trigger. So the situation is self-consistent: the cluster is balanced by the only metric that exists, and this table's placement is invisible to it.
There's also no statement to move or pin a tablet — I searched and found none; placement is StarOS-owned and the FE only reads the mapping at query time.
What actually fixes it: more tablets, not relocation
Until you add tablets, a cross-partition query can use at most 30 scans, i.e. 1–2 per node even if placement were perfect. So the fix is both placement and parallelism:
Raise buckets per partition. Docs recommend 10–50 GB per tablet for 4.1 shared-data (max 100 GB); the shared-data FAQ gives total data size / (1–5 GB). Picking a number divisible into a spread over 20 nodes helps (e.g. 10 buckets × 30 partitions = 300 tablets ≈ 15 per node, versus 1.5 today).
• New partitions only: ALTER TABLE t DISTRIBUTED BY HASH(k) DEFAULT BUCKETS 10; (v3.5.8/4.0.1+, synchronous, no rewrite), or omit BUCKETS at ADD PARTITION under enable_auto_tablet_distribution=true.
• Existing partitions: ALTER TABLE t PARTITIONS (p1, p2, ...) DISTRIBUTED BY HASH(k) BUCKETS 10;
⚠️ Two caveats I want to be straight about:
• The docs page on "Optimize data distribution after table creation" carries a notice that shared-data mode does not support this feature, while the ALTER TABLE reference and the offline-rewrite path suggest shared-data tables go through the offline job. That conflict is real in the docs — test on one partition first and check SHOW ALTER TABLE before doing all 30.
• There is a known issue where a load concurrent with ALTER ... DISTRIBUTED BY reports FINISHED but loses rows (PR 77754; merged on branch-4.1, not yet in a release as far as I can see). Pause loads during the rewrite.
Then let placement follow. Newly created tablets are what the balancer can actually spread. Increase tablet_sched_max_balancing_tablets (default 500, alias max_balancing_tablets) only if you see scheduling saturate.
Things I would not rely on
• Lowering lake_balance_tablets_threshold to ~0.001 would theoretically make the balancer start equalising counts at your 20k scale, but it's count-based and untargeted — it doesn't know about this table, and it would churn constantly. That's my inference from the formula, not something the docs endorse; I'd only try it on a test cluster.
• Colocate groups mirror one bucket→node mapping across tables; they don't spread a single table's buckets beyond what round-robin gives you, and the docs describe placement logic that assumes a group is uniformly placed. Not a fix for 30 buckets.
If tablets still don't move
The known issue "replicas drift out of place after scale-out or warmup, and tablet balancing is slow" is fixed in 4.0.11 via a bundled StarOS upgrade, with no backport listed for 4.1 — so 4.1.8 may still carry the older StarOS. If the ALTER completes and the 300 tablets still land on one node, that's worth a GitHub issue with SHOW COMPUTE NODES and SHOW TABLET FROM db.tbl.
Do you know the per-day partition data size? That determines whether 10 buckets is the right number or overkill for you.
References
• administration/management/resource_management/Replica.md
• administration/configuration/FE_parameters/shared_lake_other.mdRocky
11/21/2026, 6:11 PMDanila Fediashchin
11/21/2026, 6:15 PMRocky
11/21/2026, 6:15 PMbucket_size ≈ partition_size / target_nodes_involved. 4 buckets → ~2.5 GB each, 120 tablets, ~6/node. 8 buckets → ~1.25 GB, 240 tablets, ~12/node.
The alternative paths and why they likely don't apply to you
• ALTER TABLE ... SPLIT TABLETS (4.1, splits by tablet_reshard_target_size, default 10 GB) — but `MERGE TABLETS`/the reshard job factory only accepts range-distributed shared-data tables, which needs FE config enable_range_distribution (default false on 4.1). Your HASH-bucketed table won't take this path. Also splitting a 10 GB tablet at a 10 GB target does nothing for you anyway — you'd need a smaller target, which is just manual bucketing by another name.
• Coarser partitions (merge daily → monthly, 3.5+): 30 → 1 partition of ~10 GB is still 1 tablet. Makes it worse for parallelism.
• Balancer: count-based at 20k/node, so 30 extra tablets are invisible (f ≈ 0.0015 vs a 0.15 threshold). No pin/move statement exists.
So ALTER TABLE ... PARTITIONS (...) DISTRIBUTED BY HASH(k) BUCKETS n is the only real lever.
Two caveats before you run it
1. The docs contradict themselves on whether shared-data tables support bucketing changes after creation ("Optimize data distribution after table creation" says shared-data is unsupported; the ALTER TABLE reference and offline-rewrite path suggest it works). Try one partition, check SHOW ALTER TABLE, then do the rest.
2. Known row-loss issue when a load runs concurrently with ALTER ... DISTRIBUTED BY reports FINISHED but drops rows (PR 77754, merged on branch-4.1 but not yet released). Pause loads.
I can't confirm from the docs whether the 4.1 background split/merge daemon would later merge your 4–8 small buckets back toward tablet_reshard_target_size (10 GB). The known churn issue is described for range-distribution tables, so a HASH table shouldn't be in scope — but I'd verify with information_schema.tablet_reshard_jobs after the rewrite rather than assume.
If you'd rather not touch the table: confirm first that the single-node placement is what's actually hurting, via the query profile (CompressedBytesReadRemote, IOTimeRemote) — with 10 GB/day the whole 30-day scan is ~300 GB, and one CN scanning that serializes both CPU and that node's data cache. Note enable_lake_tablet_internal_parallel (default true) splits a tablet into segments within the one CN holding it — it does not spread a tablet across nodes, so it won't rescue you here.
References
• administration/configuration/FE_parameters/stats_storage.md
• knowledge/qa/bucket_number_and_small_tablets.md (StarRocks knowledge base)Rocky
11/21/2026, 6:15 PM