Slackbot
11/16/2026, 6:19 AMRocky
11/16/2026, 6:19 AMtablet_max_versions, default 1000): "The maximum number of versions allowed on a tablet. If the number of versions exceeds this value, new write requests will fail." Loads then fail with because of too many versions.
Rowsets are not a fixed "1000 is bad" limit:
• Compaction pressure is measured by compaction score, not rowset count.
• Shared-data: MaxCS < 10 = compaction done, > 100 = high, > 500 = very high / manual intervention. Load throttling kicks in at lake_ingest_slowdown_threshold (100) and rejection at lake_compaction_score_upper_bound (2000).
• Shared-nothing: each BE scores its own tablets; there's no score-based load throttle — you just hit tablet_max_versions.
• Per-compaction-task rowset limits (not write-failure limits) exist, e.g. max_cumulative_compaction_num_singleton_deltas (500, docs recommend 100 in production) and, for PK shared-data, lake_pk_compaction_max_input_rowsets (500). Those cap how many rowsets one task merges to avoid OOM/write amplification.
Relationship to keep in mind: one load/transaction produces one rowset with one version, so a runaway version count is exactly what shows up as a growing set of small rowsets the compaction can't keep up with. That's why the docs' shared-nothing remedy for ingestion stalls is raising tablet_max_versions (accepting more small files and worse query latency) plus more compaction threads (update_compaction_num_threads_per_disk, update_compaction_per_tablet_min_interval_seconds).
So: 1000+ versions → writes fail (shared-nothing, default). 1000+ rowsets → not a failure per se; you'd instead see a high compaction score, ingestion slowdown/stall, and degraded query latency.
References
• administration/configuration/BE_parameters/stats_storage.md
• administration/management/compaction.md
• knowledge/qa/compaction_score.md (StarRocks knowledge base)
• best_practices/primarykey_table.md
• knowledge/known_issues/storage.md (StarRocks knowledge base)
• administration/management/monitoring/metric_details/t-z.mdZurab Kiknavelidze
11/16/2026, 6:22 AMRocky
11/16/2026, 6:23 AMtablet_max_versions (1000) counts versions and makes writes fail. This is the only hard "count" limit of the two.
• Shared-data (lake): there is no tablet_max_versions enforcement — the throttle is MaxCS (segment count of the highest-scoring size tier), at 100 (slowdown) / 2000 (reject). So a lake table can have many more than 1000 versions and still accept loads, as long as segments per size tier stay low.
• Per-task rowset caps like lake_pk_compaction_max_input_rowsets (500) or max_cumulative_compaction_num_singleton_deltas (500) limit how many rowsets one compaction task merges — they don't fail writes.
So: "1 version = 1 rowset" is true per load, which is why the symptom of no compaction looks the same either way. But 1000 rowsets is a proxy for the shared-nothing version limit only; in shared-data the operative number is unmerged segment files per size tier, which can be well above the rowset count.
Caveat: I'm inferring the segmentation detail (one rowset = multiple segments when a load is split) from the compaction docs' file-vs-rowset wording, not from a page that states it explicitly for each load type.
References
• administration/configuration/BE_parameters/stats_storage.md
• best_practices/primarykey_table.md
• administration/management/compaction.md
• faq/shared_data_faq.md
• administration/configuration/BE_parameters/shared_lake_other.md
• knowledge/qa/lake_batch_publish_version.md (StarRocks knowledge base)Zurab Kiknavelidze
11/16/2026, 6:35 AMSELECT *
FROM information_schema.be_compactionsRocky
11/16/2026, 6:35 AMSHOW PROC '/compactions' — shared-data only. The docs file it under "Compaction for Shared-data Clusters | Manage compaction | View compaction tasks", and its columns are lake-flavoured: Partition, TxnID, StartTime, CommitTime, FinishTime, Error, Profile where Profile carries sub_task_count, read_local_sec/read_remote_sec, write_segment_count, and `score_before`/`score_after` (avg/p50/max). That's the FE's list of shared-data compaction jobs by partition. Per the knowledge base: "Inference from the code: it lists only shared-data compaction jobs, so it is empty in shared-nothing." So if your cluster is shared-nothing, empty output is expected — and note it's a job history, so even on shared-data it can be legitimately empty between compaction runs.
information_schema.be_compactions — shared-nothing BE-side stats, one row per BE. Fields: BE_ID, CANDIDATES_NUM, BASE_COMPACTION_CONCURRENCY, CUMULATIVE_COMPACTION_CONCURRENCY, LATEST_COMPACTION_SCORE, CANDIDATE_MAX_SCORE, MANUAL_COMPACTION_CONCURRENCY, MANUAL_COMPACTION_CANDIDATES_NUM. It comes from each BE's local compaction manager — it's counters, not a task list. Correspondingly, "shared-data compaction does not run through this manager, so the row says nothing about it."
So the most likely explanation: you're on a shared-nothing cluster (or at least the tables in question are). Sanity checks:
1. SHOW BACKENDS; vs SHOW COMPUTE NODES; — if you have CNs, it's shared-data.
2. Does partitions_meta.AVG_CS / P50_CS / MAX_CS have values? Those are filled for cloud-native tables only and stay unset in shared-nothing. Conversely SHOW TABLET FROM <tbl> → VersionCount, NumRowset are the shared-nothing-relevant counters.
3. SELECT * FROM information_schema.be_compactions returning rows with all zeros is still "a row per BE" — check whether CANDIDATES_NUM is actually non-zero rather than just counting rows.
If you're actually on shared-data and /compactions is empty while be_compactions has rows, that combination contradicts what the docs/code suggest — in that case I'd want the StarRocks version and SHOW BACKENDS/COMPUTE NODES output, and it may be worth asking in the community Slack.
For a per-task view in shared-data, the documented companion view is information_schema.be_cloud_native_compactions (one row per tablet sub-task: BE_ID, TXN_ID, TABLET_ID, VERSION, SKIPPED, RUNS, START_TIME, FINISH_TIME, PROGRESS, STATUS, PROFILE) — that's what drills into the TxnIDs /compactions lists.
Caveat: the "empty in shared-nothing" statement is source-code inference recorded in the knowledge base, not an explicit sentence in the public docs, so treat it as strong-but-not-documented.
References
• administration/management/compaction.md
• knowledge/admin_and_operation/shared_data_compaction.md (StarRocks knowledge base)
• sql-reference/information_schema/be_compactions.md
• sql-reference/information_schema/be_cloud_native_compactions.md
• knowledge/qa/compaction_score.md (StarRocks knowledge base)
• sql-reference/information_schema/be_txns.mdZurab Kiknavelidze
11/16/2026, 6:36 AMRocky
11/16/2026, 6:36 AMstarrocks_fe_max_tablet_compaction_score > 100, and in shared-nothing loads don't get throttled on score at all (the only hard ceiling is tablet_max_versions, 1000). The 100 / 500 / 2000 numbers you may have seen are shared-data MaxCS thresholds and don't transfer.
But be careful reading the column. LATEST_COMPACTION_SCORE is documented only as "Compaction score of the last compaction task" — that is, the score of the tablet picked in the most recent compaction task on that BE, not a max over the BE. Two consequences:
• If no compaction has run recently, it's stale/last-known.
• Since the BE picks its highest-scoring candidates, it's a rough proxy for "worst tablet", but CANDIDATE_MAX_SCORE (max score among current candidates) is the better number for that question. Also available: metrics starrocks_be_tablet_base_max_compaction_score, ..._cumulative_..., ..._update_..._ (PK) per BE, and starrocks_fe_max_tablet_compaction_score.
How it's calculated (shared-nothing, each BE scores its own tablets — there's no partition-level score like in shared-data):
• Base score = rowsets below the cumulative point; cumulative score = rowsets at or above it.
• Within that set, a non-overlapping rowset counts 1; an overlapping rowset counts its segment count. A tablet with no base rowset scores 0.
• Primary Key tables don't use a file count at all — the "update" score is a size- and delete-based cost divided down using update_compaction_size_threshold (default 268435456 bytes / 256 MB), so it's not directly "number of files".
So read your 32 as roughly "on the order of ~32 unmerged files in the worst size tier for the last tablet that got compacted" for a duplicate/aggregate/unique table — i.e. compaction is keeping up but hasn't fully converged. Nothing to act on unless it trends upward.
Caveat: the source-level formula details above (non-overlapping = 1, overlapping = segment count, PK cost formula) come from the code paths recorded in the knowledge base, not from a page that spells out the formula in prose. The docs only state the shared-data rule explicitly ("each data file contributes 1… grouped by size, the group with the highest number of files determines the score").
References
• administration/management/compaction.md
• administration/management/monitoring/metric_details/t-z.md
• administration/configuration/BE_parameters/stats_storage.md
• knowledge/qa/compaction_score.md (StarRocks knowledge base)
• administration/management/monitoring/metric_details/a-c.md
• sql-reference/information_schema/be_compactions.mdZurab Kiknavelidze
11/16/2026, 6:58 AMRocky
11/16/2026, 6:59 AMupdate_compaction_num_threads_per_disk = 8
• Default is `1`; mutable. Docs describe it as "the number of Compaction threads per disk for Primary Key tables."
• The PK best-practices page names exactly this pair as the shared-nothing lever for "better data freshness and better query latency": _"You can increase compact_threads and update_compaction_num_threads_per_disk, or decrease update_compaction_per_tablet_min_interval_seconds to introduce more compaction resource."_
• Likely cap: compact_threads (default 4, mutable) is documented as "the maximum number of threads used for concurrent compaction tasks." If you left it at 4, your 8 per-disk threads can't all be busy. The docs describe compact_threads generically in the BE parameter page but the shared-data guide frames it as a CN setting, so verify on your version rather than assuming — but check it either way. Also pindex_major_compaction_limit_per_disk (default 1) caps compaction concurrency per disk and is mutable.
update_compaction_per_tablet_min_interval_seconds = 120
• This is already the default (120 seconds) — so you haven't changed anything here.
• It's a debounce: "the minimum time interval at which compaction is triggered for each tablet in a Primary Key table." Lowering it makes each tablet eligible for compaction sooner.
• Diminishing returns below update_compaction_check_interval_seconds (default 10), the interval at which the BE actually scans for PK compaction candidates. Setting the per-tablet interval to e.g. 5 gains nothing when the scan is every 10s.
Is it good? For high-frequency writes with spare disk IOPS/CPU, yes-ish: 8 threads converges faster, and lowering the interval to ~10–30s improves freshness. The costs are the documented tradeoff — compaction competes with queries for I/O, and PK compaction carries memory overhead (see mem_tracker?type=update, update_memory_limit_percent). The docs' own baseline for the tradeoff is 1 / `120`; there is no documented "right" number for 8, so treat it as something to validate on your workload.
How to tell if it's actually helping (rather than guessing):
• LATEST_COMPACTION_SCORE / CANDIDATE_MAX_SCORE in be_compactions trending down, and starrocks_be_tablet_base_max_compaction_score + the cumulative/update equivalents.
• update_compaction_duration_us (total time in PK compactions) — should not climb unboundedly.
• Disk util and query p99 — if latency worsens as compaction throughput rises, you're over-provisioned on compaction.
• Watch for Failed to load data into tablet ... because of too many versions — in shared-nothing that's the failure mode, since there's no ingestion-slowdown phase.
One clarification on your goal: compaction is not what makes your data visible. Rows are readable once the load's version is published; compaction collapses rowsets/delete vectors, which is what brings down per-query overhead and version count. So if "faster freshness" meant "shorter time-to-visible," that's a publish/commit path question, not a compaction-thread question — and lowering these numbers would only shorten the window in which pre-compaction rowsets make point lookups slower.
I'm not certain a per-disk thread count of 8 is safe for your hardware — that depends on disk count and IOPS, which the docs don't give guidance on.
References
• administration/configuration/BE_parameters/stats_storage.md
• knowledge/admin_and_operation/shared_data_compaction.md (StarRocks knowledge base)
• knowledge/known_issues/shared_data.md (StarRocks knowledge base)Rocky
11/16/2026, 6:59 AMZurab Kiknavelidze
11/16/2026, 7:00 AMRocky
11/16/2026, 7:00 AMupdate_compaction_per_tablet_min_interval_seconds = 120 — this is the default. The PK best-practices page gives exactly 1 / 120 as the shared-nothing baseline, so you've changed nothing here. To gain freshness you'd lower it. Bound: update_compaction_check_interval_seconds (default 10, mutable) is how often the BE scans for PK compaction candidates — going below ~10s buys nothing. So ~10–30s is the sensible range.
update_compaction_num_threads_per_disk = 8 — default 1, mutable, "the number of Compaction threads per disk for Primary Key tables." Note the per disk: total threads = data disks × 8. On a 4-disk BE that's 32 PK compaction threads, which is a large jump from 4. Related caps worth checking, since they may bound what you actually get:
• pindex_major_compaction_limit_per_disk (default 1, mutable) — "the maximum concurrency of compaction on a disk."
• compact_threads (default 4, mutable) — "the maximum number of threads used for concurrent compaction tasks"; docs recommend ~25% of cores in production (that recommendation is written for the shared-data/CN section, so treat it as a guideline, not a shared-nothing rule).
• compaction_memory_limit_per_worker (default 2 GiB per compaction thread) — 32 threads is potentially 64 GiB of headroom you may not have. Watch mem_tracker?type=update and update_memory_limit_percent.
I'm not certain how update_compaction_num_threads_per_disk interacts with compact_threads / pindex_major_compaction_limit_per_disk on your version — the docs describe each item separately and never state the composition. That's the main thing I'd verify empirically before trusting the 8.
Two checks before you tune further:
1. Are these tables actually Primary Key? Both parameters are PK-only. If the tablet with score 32 is duplicate/aggregate/unique, neither setting affects it — those tables are compacted by base/cumulative compaction, governed by different parameters (base_compaction_num_threads_per_disk, cumulative_compaction_num_threads_per_disk, max_compaction_concurrency).
2. Don't expect compaction to fix freshness. Rows are queryable as soon as the version is published (the FAQ says an unfinished merge is completed at query time). Compaction affects how many rowsets/segments and delete vectors a query reads, hence latency — not time-to-visible. So "faster data freshness" through compaction only means "shorter window where hot tablets have many small unmerged rowsets."
In shared-nothing the failure mode is hard-failure, not throttling: there's no ingest slowdown phase; when compaction falls behind you get Failed to load data into tablet ..., because of too many versions, current/limit against tablet_max_versions (default 1000). So the real question is whether loads are approaching that. Also worth more than thread tuning: the docs' standing advice to avoid load intervals under 10s and batches under ~100 rows — batch size usually dominates.
Validate with: LATEST_COMPACTION_SCORE / CANDIDATE_MAX_SCORE in be_compactions trending down, update_compaction_duration_us not climbing unboundedly, and query p99 — if latency degrades as compaction throughput rises, you're stealing I/O from queries.
References
• administration/configuration/BE_parameters/stats_storage.md
• best_practices/primarykey_table.md
• faq/Sql_faq.md
• administration/management/compaction.md
• knowledge/qa/primary_key_tables_shared_data_memory.md (StarRocks knowledge base)