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.

\1. Go to “commits” page: https://github.com/ClickHouse/ClickHouse/commits/master

\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”.

\3. Copy the link to “clickhouse” binary for amd64 or aarch64.

\4. ssh to the server and download it with wget:

  1. # For amd64:
  2. wget https://clickhouse-builds.s3.yandex.net/0/00ba767f5d2a929394ea3be193b1f79074a1c4bc/1578163263_binary/clickhouse
  3. # For aarch64:
  4. wget https://clickhouse-builds.s3.yandex.net/0/00ba767f5d2a929394ea3be193b1f79074a1c4bc/1578161264_binary/clickhouse
  5. # Then do:
  6. chmod a+x clickhouse

\5. Download configs:

  1. wget https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/dbms/programs/server/config.xml
  2. wget https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/dbms/programs/server/users.xml
  3. mkdir config.d
  4. wget https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/dbms/programs/server/config.d/path.xml -O config.d/path.xml
  5. wget https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/dbms/programs/server/config.d/log_to_console.xml -O config.d/log_to_console.xml

\6. Download benchmark files:

  1. wget https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/dbms/benchmark/clickhouse/benchmark-new.sh
  2. chmod a+x benchmark-new.sh
  3. wget https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/dbms/benchmark/clickhouse/queries.sql

\7. Download test data:

According to the instruction:

https://clickhouse.tech/docs/en/getting_started/example_datasets/metrica/

(“hits” table containing 100 million rows)

  1. wget https://clickhouse-datasets.s3.yandex.net/hits/partitions/hits_100m_obfuscated_v1.tar.xz
  2. tar xvf hits_100m_obfuscated_v1.tar.xz -C .
  3. mv hits_100m_obfuscated_v1/* .

\8. Run the server:

  1. ./clickhouse server

\9. Check the data:

ssh to the server in another terminal

  1. ./clickhouse client --query "SELECT count() FROM hits_100m_obfuscated"
  2. 100000000

\10. Edit the benchmark-new.sh, change “clickhouse-client” to “./clickhouse client” and add “—max_memory_usage 100000000000” parameter.

  1. mcedit benchmark-new.sh

\11. Run the benchmark:

  1. ./benchmark-new.sh hits_100m_obfuscated

\12. Send the numbers and the info about your hardware configuration to [email protected]

All the results are published here: https://clickhouse.tech/benchmark_hardware.html