Merge pull request #23561 from ClickHouse/stress-test-less-oom

Less chance of OOM in stress tests
This commit is contained in:
alexey-milovidov 2021-04-24 23:16:50 +03:00 committed by GitHub
commit c489355357
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,14 @@ function configure()
# since we run clickhouse from root
sudo chown root: /var/lib/clickhouse
# Set more frequent update period of asynchronous metrics to more frequently update information about real memory usage (less chance of OOM).
echo "<yandex><asynchronous_metrics_update_period_s>1</asynchronous_metrics_update_period_s></yandex>" \
> /etc/clickhouse-server/config.d/asynchronous_metrics_update_period_s.xml
# Set maximum memory usage as half of total memory (less chance of OOM).
echo "<yandex><max_server_memory_usage_to_ram_ratio>0.5</max_server_memory_usage_to_ram_ratio></yandex>" \
> /etc/clickhouse-server/config.d/max_server_memory_usage_to_ram_ratio.xml
}
function stop()