Mohan
05/22/2026, 5:16 AMRocky
05/22/2026, 5:17 AMbin directory of the source repo or specialized POC toolkits) to automate data generation, table creation, and query execution.
* TPC-H & TPC-DS: For complex decision-support queries. StarRocks provides a tpch-poc toolkit that includes data generators (dbgen) and execution scripts (benchmark.sh) to measure query response times.
* External Tools: For QPS/concurrency stress testing specifically, the community often uses standard tools like Apache JMeter, K6, or sysbench configured with the StarRocks MySQL-compatible port (9030).
2. Query Limits and OOM Prevention
StarRocks has built-in mechanisms to define the "query limit" and prevent system-wide OOM (Out-of-Memory) crashes:
* `query_mem_limit`: A session variable that sets the maximum memory a single query can use on each BE (Backend) node. If a query exceeds this, it is terminated to protect the node.
* Resource Groups: You can create resource groups to isolate workloads. For example, you can limit a specific group to a certain percentage of CPU and memory. If a query in that group exceeds the group's limits, it can be automatically rejected or killed.
* Query Queues: To prevent hitting OOM during high QPS bursts, you can enable Query Queuing. It will queue incoming queries if:
* The concurrency threshold (query_queue_concurrency_limit) is reached.
* The memory usage ratio (query_queue_mem_used_pct_limit) is exceeded.
* Spill to Disk: By setting SET enable_spill = true;, StarRocks can spill intermediate results (from joins, aggregates, or sorts) to disk when memory is tight. This allows large queries to finish slowly instead of hitting an OOM error.
3. Monitoring Stress Levels
To analyze how StarRocks behaves during a stress test:
* Query Profile: Use EXPLAIN ANALYZE or check the QueryPeakMemoryUsagePerNode in the Query Profile to see how close a query got to the memory limit.
* Audit Logs: Monitor the fe/log/fe.audit.log to track QPS, latency, and resource consumption for every query.
* Proc Profile: Generate flame graphs for BE/FE processes to identify CPU hotspots during high-load tests.
For official performance numbers or to set up a POC stress test, you can refer to the Benchmarking section of the documentation.
References
• faq/Others.md
• quick_start/shared-nothing.md
• knowledge/trouble_shooting/trouble_shooting_scripts.md
• developers/mac-compile-run-test.md