ClickHouse/dbms/tests/performance
alesapin 7822db5884 Small performance test documentation. (#5408)
* Docs for performance tests

* docfix

* Better formating

* More English

* Run example

* Update README.md
2019-05-25 13:46:08 +03:00
..
funtions_geo Fix incorrect performance tests 2019-05-15 19:44:25 +03:00
agg_functions_min_max_any.xml
array_element.xml More stable perf tests 2019-05-17 14:42:41 +03:00
array_join.xml Fix incorrect performance tests 2019-05-15 19:44:25 +03:00
base64_hits.xml
base64.xml
basename.xml
bounding_ratio.xml More stable perf tests 2019-05-17 14:42:41 +03:00
cidr.xml
column_column_comparison.xml
columns_hashing.xml
complex_array_creation.xml
concat_hits.xml format function added 2019-05-18 15:29:10 +03:00
conditional.xml More stable perf tests 2019-05-17 14:42:41 +03:00
consistent_hashes.xml More stable perf tests 2019-05-21 13:03:36 +03:00
constant_column_comparison.xml
constant_column_search.xml
cpu_synthetic.xml
create_benchmark_page.py
cryptographic_hashes.xml Fix incorrect performance tests 2019-05-15 19:44:25 +03:00
date_parsing.xml
date_time.xml
entropy.xml
first_significant_subdomain.xml
fixed_string16.xml
float_parsing.xml
format_date_time.xml
functions_coding.xml
general_purpose_hashes.xml More stable perf tests 2019-05-21 13:03:36 +03:00
if_array_num.xml
if_array_string.xml
if_string_const.xml
if_string_hits.xml
int_parsing.xml
IPv4.xml
IPv6.xml
joins_in_memory.xml
leftpad.xml
ngram_distance.xml
nyc_taxi.xml
order_by_single_column.xml
parse_engine_file.xml Add limit to loop test 2019-05-24 11:38:49 +03:00
read_hits_with_aio.xml
README.md Small performance test documentation. (#5408) 2019-05-25 13:46:08 +03:00
right.xml
roundDown.xml
select_format.xml Add limit to loop test 2019-05-24 11:38:49 +03:00
set_hits.xml Fix meaningless (untested) performance tests 2019-05-24 18:09:21 +03:00
set.xml
simple_join_query.xml More stable perf tests 2019-05-17 14:42:41 +03:00
slices_hits.xml
small_requests.xml
sort.xml
string_sort.xml
system_numbers.xml More stable perf tests 2019-05-21 13:03:36 +03:00
trim_numbers.xml
trim_urls.xml
trim_whitespace.xml
uniq.xml Fix meaningless (untested) performance tests 2019-05-24 18:09:21 +03:00
url_hits.xml
visit_param_extract_raw.xml More stable perf tests 2019-05-17 14:42:41 +03:00
website.xml

ClickHouse performance tests

This directory contains .xml-files with performance tests for clickhouse-performance-test tool.

How to write performance test

First of all you should check existing tests don't cover your case. If there are no such tests than you should write your own.

There two types of performance tests:

  • First is executed in loop, and have tag <type>loop</type> in config.
  • Second one is executed only once and have tag <type>once</type> in config.

Type once should be used only for endless queries. Even if your query really long (10 seconds+), it's better to choose loop test.

After you have choosen type, you have to specify preconditions. It contains table names. Only hits_100m_single, hits_10m_single, test.hits are available in CI.

The most important part of test is stop_conditions. For loop test you should always use min_time_not_changing_for_ms stop condition. For once test you can choose between average_speed_not_changing_for_ms and max_speed_not_changing_for_ms, but first is preferable. Also you should always specify total_time_ms metric. Endless tests will be ignored by CI.

metrics and main_metric settings are not important and can be ommited, because loop tests are always compared by min_time metric and once tests compared by max_rows_per_second.

You can use substitions, create, fill and drop queries to prepare test. You can find examples in this folder.

Take into account, that these tests will run in CI which consists of 56-cores and 512 RAM machines. Queries will be executed much faster than on local laptop.

How to run performance test

You have to run clickhouse-server and after you can start testing:

$ clickhouse-performance-test --input-file my_lovely_test1.xml --input-file my_lovely_test2.xml
$ clickhouse-performance-test --input-file /my_lovely_test_dir/