Less chance of OOM in stress tests

This commit is contained in:
Alexey Milovidov 2021-04-24 03:27:23 +03:00
parent ca230224cf
commit e9e4ab3813

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()