- Make sure your host machine meet the QPL required prerequisites
- deflate_qpl is enabled by default during cmake build. In case you accidentally change it, please double-check build flag: ENABLE_QPL=1
- For generic requirements, please refer to Clickhouse generic build instructions
Files list
The foldersbenchmark_sample under qpl-cmake give example to run benchmark with python scripts:
client_scripts contains python scripts for running typical benchmark, for example:
client_stressing_test.py: The python script for query stress test with [1~4] server instances.queries_ssb.sql: The file lists all queries for Star Schema Benchmarkallin1_ssb.sh: This shell script executes benchmark workflow all in one automatically.
database_files means it will store database files according to lz4/deflate/zstd codec.
Run benchmark automatically for Star Schema:
./output/
In case you run into failure, please manually run benchmark as below sections.
Definition
[CLICKHOUSE_EXE] means the path of clickhouse executable program.Environment
- CPU: Sapphire Rapid
- OS Requirements refer to System Requirements for QPL
- IAA Setup refer to Accelerator Configuration
- Install python modules:
Generate raw data
dbgen to generate 100 million rows data with the parameters:
-s 20
The files like *.tbl are expected to output under ./benchmark_sample/rawdata_dir/ssb-dbgen:
Database setup
Set up database with LZ4 codecConnected to ClickHouse server from console which means client successfully setup connection with server.
Complete below three steps mentioned in Star Schema Benchmark
- Creating tables in ClickHouse
- Inserting data. Here should use
./benchmark_sample/rawdata_dir/ssb-dbgen/*.tblas input data. - Converting “star schema” to de-normalized “flat schema”
Benchmark with single instance
- Before start benchmark, Please disable C6 and set CPU frequency governor to be
performance
- To eliminate impact of memory bound on cross sockets, we use
numactlto bind server on one socket and client on another socket. - Single instance means single server connected with single client
QPS_Final and collect statistics
Benchmark with multi-instances
- To reduce impact of memory bound on too much threads, We recommend run benchmark with multi-instances.
- Multi-instance means multiple(2 or 4)servers connected with respective client.
- The cores of one socket need to be divided equally and assigned to the servers respectively.
- For multi-instances, must create new folder for each codec and insert dataset by following the similar steps as single instance.
- For client side, you need launch clickhouse with the assigned port during table creation and data insertion.
- For server side, you need launch clickhouse with the specific xml config file in which port has been assigned. All customized xml config files for multi-instances has been provided under ./server_config.
- [TBL_FILE_NAME] represents the name of a file named with the regular expression: *. tbl under
./benchmark_sample/rawdata_dir/ssb-dbgen. --port=9001stands for the assigned port for server instance which is also defined in config_lz4_s2.xml/config_zstd_s2.xml/config_deflate_s2.xml. For even more instances, you need replace it with the value: 9002/9003 which stand for s3/s4 instance respectively. If you don’t assign it, the port is 9000 by default which has been used by first instance.
2 of client_stressing_test.py stands for the number of instances. For more instances, you need replace it with the value: 3 or 4. This script support up to 4 instances/
Now three logs should be output as expected:
QPS_Final and collect statistics
Benchmark setup for 4 instances is similar with 2 instances above.
We recommend use 2 instances benchmark data as final report for review.