From e9e4ab3813a9a2321ca126c4f313780e5b73abc1 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 24 Apr 2021 03:27:23 +0300 Subject: [PATCH] Less chance of OOM in stress tests --- docker/test/stress/run.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker/test/stress/run.sh b/docker/test/stress/run.sh index 74a88df21e0..43a92fdeebe 100755 --- a/docker/test/stress/run.sh +++ b/docker/test/stress/run.sh @@ -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 "1" \ + > /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 "0.5" \ + > /etc/clickhouse-server/config.d/max_server_memory_usage_to_ram_ratio.xml } function stop()