From c9cfb7546db5387f4d2f746d8c8eed58637bb422 Mon Sep 17 00:00:00 2001 From: ruslandoga <67764432+ruslandoga@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:11:56 +0700 Subject: [PATCH] low resources --- .gitignore | 1 + clickhouse/low-resources.xml | 23 +++++++++++++++++++++++ compose.yml | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 clickhouse/low-resources.xml diff --git a/.gitignore b/.gitignore index 4e33a3c..ae85196 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ !compose.yml !clickhouse/logs.xml !clickhouse/ipv4-only.xml +!clickhouse/low-resources.xml !README.md !LICENSE !.gitignore diff --git a/clickhouse/low-resources.xml b/clickhouse/low-resources.xml new file mode 100644 index 0000000..f313e1d --- /dev/null +++ b/clickhouse/low-resources.xml @@ -0,0 +1,23 @@ + + + + 524288000 + + + + + 1 + + 8192 + + 1 + + 0 + + 0 + + + diff --git a/compose.yml b/compose.yml index 2fe91e5..5e3fb13 100644 --- a/compose.yml +++ b/compose.yml @@ -20,6 +20,9 @@ services: # This makes ClickHouse bind to IPv4 only, since Docker doesn't enable IPv6 in bridge networks by default. # Fixes "Listen [::]:9000 failed: Address family for hostname not supported" warnings. - ./clickhouse/ipv4-only.xml:/etc/clickhouse-server/config.d/ipv4-only.xml:ro + # This makes ClickHouse consume less resources, which is useful for small setups. + # https://clickhouse.com/docs/en/operations/tips#using-less-than-16gb-of-ram + - ./clickhouse/low-resources.xml:/etc/clickhouse-server/config.d/low-resources.xml:ro ulimits: nofile: soft: 262144