Star Schema Benchmark (SSB) is an industry-standard tool for evaluating OLAP query performance in data warehouses. This topic walks you through running an SSB performance test on EMR Serverless StarRocks.
The SSB implementation in this topic is based on the SSB benchmark. The results are not comparable to published SSB benchmark results.
Reference results
The following results were measured on an 8-CU instance (8 cores, 32 GB memory). Each value is the query response time in milliseconds. Lower is better.
Test environment
| Component | Specification |
|---|---|
| Compute units (CUs) | 8 CUs (8 cores, 32 GB memory) |
| Scale factor | 1 (1 GB of raw data) |
SSB wide table query (ssb-flat mode)
| Query | Time (ms) |
|---|---|
| Q1.1 | 26 |
| Q1.2 | 13 |
| Q1.3 | 20 |
| Q2.1 | 46 |
| Q2.2 | 40 |
| Q2.3 | 26 |
| Q3.1 | 40 |
| Q3.2 | 33 |
| Q3.3 | 30 |
| Q3.4 | 23 |
| Q4.1 | 26 |
| Q4.2 | 30 |
| Q4.3 | 20 |
| Total | 373 |
SSB standard table query (ssb mode)
| Query | Time (ms) |
|---|---|
| Q1.1 | 26 |
| Q1.2 | 20 |
| Q1.3 | 23 |
| Q2.1 | 103 |
| Q2.2 | 53 |
| Q2.3 | 50 |
| Q3.1 | 86 |
| Q3.2 | 46 |
| Q3.3 | 46 |
| Q3.4 | 36 |
| Q4.1 | 83 |
| Q4.2 | 63 |
| Q4.3 | 53 |
| Total | 688 |
SSB overview
SSB simulates a typical star schema data model with five tables: Date, Customer, Supplier, Part, and Lineorder. It evaluates the following performance metrics of a data warehouse or OLAP system:
-
Query response time
-
Concurrent processing
-
Data loading
-
Query optimization
SSB also supports customizing the data model — for example, flattening the star schema into a wide table to reduce join overhead.
The SSB generation tool uses a scale factor (SF) to control data volume: 1 SF = 1 GB of raw data. Index storage is not included, so reserve additional disk space when setting up your environment.
Prerequisites
Before you begin, ensure that you have:
-
An Elastic Compute Service (ECS) instance to generate data, load it into StarRocks, and run client queries
-
An EMR Serverless StarRocks instance
ECS instance requirements
| Requirement | Details |
|---|---|
| Operating system | CentOS or Alibaba Cloud Linux |
| Data disk | Enhanced SSD (ESSD); capacity based on your target data volume |
| Network | Same region and Virtual Private Cloud (VPC) as the StarRocks instance |
| Public IP | Required |
For instructions on creating an ECS instance, see Create an instance.
StarRocks instance requirements
The reference results in this topic used 8 CUs (8 cores, 32 GB memory). Adjust compute resources to match your testing needs.
To create a StarRocks instance, go to the E-MapReduce console, navigate to EMR Serverless StarRocks, and click Create Instance. For detailed instructions, see Create an instance.
Use a freshly created instance for each test run. Instances that have been upgraded or downgraded may produce inconsistent results.
Run the SSB performance test
Step 1: Download and configure the test toolkit
-
Log on to the ECS instance. See Connect to an ECS instance.
-
Download and extract the test toolkit.
sudo wget https://starrocks-oss.oss-cn-beijing.aliyuncs.com/public-access/starrocks-ssb-benchmark-for-serverless.tar.gz tar xzvf starrocks-ssb-benchmark-for-serverless.tar.gz -
Navigate to the toolkit directory.
cd starrocks-ssb-benchmark-for-serverless -
Open the configuration file.
vim conf/starrocks.conf -
Update the parameters for your environment.
# for mysql cmd mysql_host: fe-c-7b6f92276******-internal.starrocks.aliyuncs.com mysql_port: 9030 mysql_user: admin mysql_password: 1**** database: ssb_sf # cluster ports http_port: 8030 # Specifies whether to enable the bitmap index. bitmap_index: false # benchmark config scale_factor: 1 dataset_generate_root_path: /mnt/disk1/starrocks-benchmark/datasetsParameter Description Default mysql_hostInternal endpoint of the frontend (FE). Find it on the Instance Details tab under Gateway Information > Internal endpoint. — mysql_portQuery port of the FE. Find it on the Instance Details tab under FE Details > Query Port. 9030mysql_userStarRocks instance user. adminmysql_passwordPassword for the StarRocks instance user. — databaseDatabase name to create in the StarRocks instance. ssb_sfscale_factorData volume in GB. 1 = 1 GB of raw data. Make sure your disk has enough capacity for the generated dataset. 1dataset_generate_root_pathLocal path where the generated test dataset is stored. /mnt/disk1/starrocks-benchmark/datasetsbitmap_indexWhether to enable the Bitmap Index feature. Enabling it improves query performance for specific patterns, particularly Q2.2, Q2.3, and Q3.3. falsehttp_portHTTP port of the FE. Find it on the Instance Details tab under FE Details > HTTP Port. 8030ImportantSet
mysql_hostto the internal endpoint, not the public endpoint.
Step 2: Generate and load test data
Run the following command to create the database, tables, and dataset, and load the data into StarRocks.
sh ssb_dataload.sh
Step 3: Run queries and view results
Run queries using one of the following modes. An overview is printed to the terminal, and a result.csv file with full details is saved in the current directory.
-
Wide table mode — queries the pre-joined flat table:
sh ssb_query.sh ssb-flat -
Standard mode — queries the original star schema tables:
sh ssb_query.sh ssb
Each value in the output is the query response time in milliseconds. Lower values indicate better performance.
What's next
-
Adjust
scale_factorinconf/starrocks.confto test with larger data volumes and observe how performance scales. -
Enable
bitmap_index: trueand re-run the benchmark to measure the impact of the Bitmap Index feature on Q2.2, Q2.3, and Q3.3.