ClickHouse/docs/en/operations/performance_test.md

81 lines
2.9 KiB
Markdown
Raw Normal View History

2020-04-03 13:23:32 +00:00
---
toc_priority: 54
toc_title: Testing Hardware
---
# How to Test Your Hardware with ClickHouse {#how-to-test-your-hardware-with-clickhouse}
With this instruction you can run basic ClickHouse performance test on any server without installation of ClickHouse packages.
2020-03-20 10:10:48 +00:00
1. Go to “commits” page: https://github.com/ClickHouse/ClickHouse/commits/master
2020-04-07 23:47:58 +00:00
2. Click on the first green check mark or red cross with green “ClickHouse Build Check” and click on the “Details” link near “ClickHouse Build Check”. There is no such link in some commits, for example commits with documentation. In this case, choose the nearest commit having this link.
2020-03-20 10:10:48 +00:00
3. Copy the link to “clickhouse” binary for amd64 or aarch64.
4. ssh to the server and download it with wget:
<!-- -->
# For amd64:
wget https://clickhouse-builds.s3.yandex.net/0/00ba767f5d2a929394ea3be193b1f79074a1c4bc/1578163263_binary/clickhouse
# For aarch64:
wget https://clickhouse-builds.s3.yandex.net/0/00ba767f5d2a929394ea3be193b1f79074a1c4bc/1578161264_binary/clickhouse
# Then do:
chmod a+x clickhouse
2020-03-20 10:10:48 +00:00
2020-04-11 15:40:11 +00:00
5. Download configs:
2020-03-20 10:10:48 +00:00
<!-- -->
wget https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/programs/server/config.xml
wget https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/programs/server/users.xml
mkdir config.d
wget https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/programs/server/config.d/path.xml -O config.d/path.xml
wget https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/programs/server/config.d/log_to_console.xml -O config.d/log_to_console.xml
2020-03-20 10:10:48 +00:00
2020-04-11 15:40:11 +00:00
6. Download benchmark files:
2020-03-20 10:10:48 +00:00
<!-- -->
wget https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/benchmark/clickhouse/benchmark-new.sh
chmod a+x benchmark-new.sh
wget https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/benchmark/clickhouse/queries.sql
2020-03-20 10:10:48 +00:00
2020-04-11 15:40:11 +00:00
7. Download test data according to the [Yandex.Metrica dataset](../getting_started/example_datasets/metrica.md) instruction (“hits” table containing 100 million rows).
2020-03-20 10:10:48 +00:00
<!-- -->
wget https://clickhouse-datasets.s3.yandex.net/hits/partitions/hits_100m_obfuscated_v1.tar.xz
tar xvf hits_100m_obfuscated_v1.tar.xz -C .
mv hits_100m_obfuscated_v1/* .
2020-03-20 10:10:48 +00:00
2020-04-11 15:40:11 +00:00
8. Run the server:
2020-03-20 10:10:48 +00:00
<!-- -->
./clickhouse server
2020-03-20 10:10:48 +00:00
2020-04-11 15:40:11 +00:00
9. Check the data: ssh to the server in another terminal
2020-03-20 10:10:48 +00:00
<!-- -->
./clickhouse client --query "SELECT count() FROM hits_100m_obfuscated"
100000000
2020-03-20 10:10:48 +00:00
2020-04-11 15:43:13 +00:00
10. Edit the benchmark-new.sh, change `clickhouse-client` to `./clickhouse client` and add `-max_memory_usage 100000000000` parameter.
2020-03-20 10:10:48 +00:00
<!-- -->
mcedit benchmark-new.sh
2020-03-20 10:10:48 +00:00
2020-04-11 15:40:11 +00:00
11. Run the benchmark:
2020-03-20 10:10:48 +00:00
<!-- -->
./benchmark-new.sh hits_100m_obfuscated
2020-03-20 10:10:48 +00:00
2020-04-11 15:40:11 +00:00
12. Send the numbers and the info about your hardware configuration to clickhouse-feedback@yandex-team.com
2020-03-20 10:10:48 +00:00
2020-04-11 15:40:11 +00:00
All the results are published here: https://clickhouse.tech/benchmark_hardware.html