Velu
09/14/2026, 6:12 AMRocky
09/14/2026, 6:12 AMsql
-- Disable tablet balancing and cloning
ADMIN SET FRONTEND CONFIG ("tablet_sched_max_scheduling_tablets" = "0");
ADMIN SET FRONTEND CONFIG ("tablet_sched_max_balancing_tablets" = "0");
ADMIN SET FRONTEND CONFIG ("disable_balance" = "true");
ADMIN SET FRONTEND CONFIG ("disable_colocate_balance" = "true");
3. Upgrade Procedure (Rolling)
Step 1: Upgrade BEs and CNs (One by One)
For each BE/CN node:
1. Stop the node: Use ./bin/stop_be.sh (or ./bin/stop_cn.sh --graceful).
2. Replace binaries: Replace the bin and lib directories with the new version's files.
3. Start the node: Use ./bin/start_be.sh --daemon.
4. Verify: Check the node status in StarRocks (SHOW BACKENDS;) and ensure it is Alive. Wait for the node to be fully functional before moving to the next.
Step 2: Upgrade FEs (One by One)
You must upgrade Follower FEs first, and the Leader FE last.
1. Stop the node: Use ./bin/stop_fe.sh.
2. Replace binaries: Replace the bin, lib, and spark-dpp directories.
3. Start the node: Use ./bin/start_fe.sh --daemon.
4. Verify: Check SHOW FRONTENDS; to ensure the node is Alive and has joined the cluster.
5. Finalize: Once all Followers are upgraded, stop the Leader FE. A new Leader will be elected from the already-upgraded Followers. Then upgrade and restart the old Leader.
4. Post-Upgrade Tasks
Once all nodes are upgraded and showing as Alive, re-enable tablet balancing:
sql
ADMIN SET FRONTEND CONFIG ("tablet_sched_max_scheduling_tablets" = "10000");
ADMIN SET FRONTEND CONFIG ("tablet_sched_max_balancing_tablets" = "500");
ADMIN SET FRONTEND CONFIG ("disable_balance" = "false");
ADMIN SET FRONTEND CONFIG ("disable_colocate_balance" = "false");
5. Automated "Self-Service" via Kubernetes
If you are using the StarRocks Operator on Kubernetes, you can achieve a zero-downtime upgrade by simply updating the image version in your StarRocksCluster CRD. The Operator automatically handles the rolling restart logic (BEs first, then FEs) and ensures HA is maintained during the process.
bash
kubectl patch starrockscluster <cluster_name> --type='merge' -p '{"spec":{"starRocksBeSpec":{"image":"starrocks/be-ubuntu:3.1.5"}}}'
References
• deployment/sr_operator.md
• deployment/upgrade.mdVelu
09/16/2026, 7:13 PMRocky
09/16/2026, 7:13 PMVelu
09/16/2026, 7:15 PMRocky
09/16/2026, 7:15 PMdefault_mv_wg), but it is best practice to create a dedicated group for MVs.
* Create Group: Limit CPU weight and memory to ensure MVs run in the "background."
sql
CREATE RESOURCE GROUP rg_mv
WITH (
"cpu_weight" = "10", -- Soft limit: gets 10% of CPU if contention occurs
"mem_limit" = "0.3", -- Can use up to 30% of BE memory
"concurrency_limit" = "5" -- Limit simultaneous refresh tasks
);
* Assign to MV: You can bind the group directly to the MV definition.
sql
ALTER MATERIALIZED VIEW my_mv SET ("resource_group" = "rg_mv");
2. Isolate Query Serving
You typically want queries to have high priority and low latency. Use Classifiers to automatically route user queries to this group.
* Create Group:
sql
CREATE RESOURCE GROUP rg_queries
TO (user='reporting_user', role='analytics') -- Classify by user/role
WITH (
"cpu_weight" = "70",
"mem_limit" = "0.5",
"type" = "short_query" -- Optimization for sub-second queries
);
3. Isolate Update Tasks (Data Loading)
Resource Group support for updates depends on the loading method:
* INSERT INTO / INSERT OVERWRITE: Supported via classifiers (since v2.5).
* Broker Load: Supported via classifiers (since v3.1).
* Stream Load / Routine Load: Not yet supported by Resource Groups (as of v3.3). These tasks currently use a fixed portion of BE resources not managed by the Workload Manager.
* Configuration for INSERT-based updates:
sql
CREATE RESOURCE GROUP rg_updates
TO (query_type IN ('insert')) -- Classify all INSERT statements
WITH (
"cpu_weight" = "20",
"mem_limit" = "0.2"
);
Summary of Resource Controls
Resource | Soft Limit (cpu_weight) | Hard Limit (cpu_core_limit)
CPU | Allows a group to exceed its limit if the BE is idle. | Strictly caps CPU (v3.3.5+). Recommended for strict isolation.
Memory | mem_limit sets a percentage of the BE's total queryable memory. | Queries exceeding this will be killed or queued.
Concurrency | concurrency_limit prevents the FE from scheduling too many parallel tasks. | Useful for preventing MV refreshes from overwhelming the system.
Key Tip: CPU Hard Limits
If you are on v3.3.5 or later, you can use cpu_core_limit instead of cpu_weight. This provides hard isolation, meaning even if the cluster is idle, the update/MV task will never exceed the specified number of cores, ensuring 100% predictable performance for your query serving group.
sql
-- Example of a hard limit
ALTER RESOURCE GROUP rg_mv WITH ("cpu_core_limit" = "4");
-- Verify status
SELECT * FROM information_schema.resource_groups;
```
## References
- [administration/management/resource_management/resource_group.md](https://docs.starrocks.io/docs/administration/management/resource_management/resource_group)
- [best_practices/audit_log_resource_group.md](https://docs.starrocks.io/docs/best_practices/audit_log_resource_group)
- [faq/resource_isolation_faq.md](https://docs.starrocks.io/docs/faq/resource_isolation_faq)
## References
- [faq/resource_isolation_faq.md](https://docs.starrocks.io/docs/faq/resource_isolation_faq)
- [best_practices/audit_log_resource_group.md](https://docs.starrocks.io/docs/best_practices/audit_log_resource_group)
- [administration/management/resource_management/resource_group.md](https://docs.starrocks.io/docs/administration/management/resource_management/resource_group)