Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Enhance Docker Compose and Clickhouse configurations for improved performance

Bill Yang707f5c315345
diff --git a/.claude/settings.local.json b/.claude/settings.local.json
index ef29a404c..d5c3e079a 100644
--- a/.claude/settings.local.json
+++ b/.claude/settings.local.json
@@ -11,7 +11,8 @@
"WebSearch",
"WebFetch(domain:github.com)",
"Bash(npm install @marsidev/react-turnstile)",
- "Bash(npm install @marsidev/react-turnstile --legacy-peer-deps)"
+ "Bash(npm install @marsidev/react-turnstile --legacy-peer-deps)",
+ "WebFetch(domain:clickhouse.com)"
],
"deny": [],
"ask": []
diff --git a/docker-compose.cloud.yml b/docker-compose.cloud.yml
index 972755ae9..48b51b0e3 100644
--- a/docker-compose.cloud.yml
+++ b/docker-compose.cloud.yml
@@ -49,6 +49,13 @@ services:
ports:
- "8123:8123"
- "9000:9000"
+ mem_limit: 12g
+ mem_reservation: 6g
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "50m"
+ max-file: "3"
postgres:
image: postgres:17.4
@@ -173,6 +180,10 @@ configs:
<clickhouse>
<settings>
<enable_json_type>1</enable_json_type>
+ <max_concurrent_queries>20</max_concurrent_queries>
+ <background_pool_size>4</background_pool_size>
+ <background_merges_mutations_concurrency_ratio>1</background_merges_mutations_concurrency_ratio>
+ <mark_cache_size>524288000</mark_cache_size>
</settings>
</clickhouse>
@@ -203,6 +214,12 @@ configs:
<log_queries>0</log_queries>
<log_query_threads>0</log_query_threads>
<log_processors_profiles>0</log_processors_profiles>
+ <max_memory_usage>8000000000</max_memory_usage>
+ <max_bytes_before_external_group_by>4000000000</max_bytes_before_external_group_by>
+ <max_bytes_before_external_sort>4000000000</max_bytes_before_external_sort>
+ <max_threads>4</max_threads>
+ <max_block_size>8192</max_block_size>
+ <input_format_parallel_parsing>0</input_format_parallel_parsing>
</default>
</profiles>
</clickhouse>