utils/concurrency-bench/README.md
A small toolkit for stress-testing concurrency-related features in ClickHouse. It runs clickhouse-bench for each query while increasing the number of concurrent clients from 1 to 32. This helps evaluate scheduling- and concurrency-related changes.
clickhouse-bench and clickhouse-client available in PATH.run.sh, queries.txt, logs2json.py, and index.html.Start the ClickHouse server and set up any concurrency features you want to test.
Prepare queries.txt. The file is semicolon-separated with two columns:
Run the benchmark. Running in the background is recommended:
nohup ./run.sh > run.log 2>&1 &
After completion, results for each query will be saved into separate Q*.log files. Convert them to JSON:
./logs2json.py /path/to/workdir/Q*.log > results.json
Visualize results. Add your result JSON file(s) to index.html:
const DATASET_FILES = [
"./no-concurrency-control.json",
"./concurrency-control.json"
];
Open index.html in your browser.
run.sh.queries.txt do not contain ; since it is used as the separator.