Skip to content

Instantly share code, notes, and snippets.

@reijovosu
Created December 15, 2025 07:10
Show Gist options
  • Select an option

  • Save reijovosu/f04bcb63b4527168b9dfbeaf75e44311 to your computer and use it in GitHub Desktop.

Select an option

Save reijovosu/f04bcb63b4527168b9dfbeaf75e44311 to your computer and use it in GitHub Desktop.
Extremly minimal clickhouse-server config for SigNoz docker
<?xml version="1.0"?>
<clickhouse>
<!-- ==================== LOGGING ==================== -->
<logger>
<level>error</level>
<log>/var/log/clickhouse-server/clickhouse-server.log</log>
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
<size>100M</size>
<count>5</count>
</logger>
<!-- ==================== NETWORK PORTS ==================== -->
<http_port>8123</http_port>
<tcp_port>9000</tcp_port>
<mysql_port>9004</mysql_port>
<postgresql_port>9005</postgresql_port>
<interserver_http_port>9009</interserver_http_port>
<!-- ==================== CONNECTION SETTINGS ==================== -->
<max_connections>768</max_connections>
<keep_alive_timeout>3</keep_alive_timeout>
<!-- ==================== THREAD AND CONCURRENCY SETTINGS ==================== -->
<max_concurrent_queries>35</max_concurrent_queries>
<max_thread_pool_size>700</max_thread_pool_size>
<!-- ==================== MEMORY SETTINGS ==================== -->
<max_server_memory_usage>0</max_server_memory_usage>
<max_server_memory_usage_to_ram_ratio>0.9</max_server_memory_usage_to_ram_ratio>
<total_memory_profiler_step>4194304</total_memory_profiler_step>
<total_memory_tracker_sample_probability>0</total_memory_tracker_sample_probability>
<!-- ==================== CACHE SETTINGS ==================== -->
<!-- Reduced from 8GB to 1GB -->
<uncompressed_cache_size>536870912</uncompressed_cache_size>
<!-- Reduced from 5GB to 512MB -->
<mark_cache_size>268435456</mark_cache_size>
<mmap_cache_size>100</mmap_cache_size>
<compiled_expression_cache_size>33554432</compiled_expression_cache_size>
<compiled_expression_cache_elements_size>1000</compiled_expression_cache_elements_size>
<!-- ==================== STORAGE PATHS ==================== -->
<path>/var/lib/clickhouse/</path>
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
<user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
<format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path>
<!-- ==================== USER DIRECTORIES ==================== -->
<user_directories>
<users_xml>
<path>users.xml</path>
</users_xml>
<local_directory>
<path>/var/lib/clickhouse/access/</path>
</local_directory>
</user_directories>
<!-- ==================== DEFAULT SETTINGS ==================== -->
<default_profile>default</default_profile>
<default_database>default</default_database>
<!-- ==================== SYSTEM SETTINGS ==================== -->
<mlock_executable>false</mlock_executable>
<remap_executable>false</remap_executable>
<!-- ==================== CLUSTER CONFIGURATION (REQUIRED) ==================== -->
<macros>
<shard>01</shard>
<replica>example01-01-1</replica>
</macros>
<!-- ==================== SESSION SETTINGS ==================== -->
<max_session_timeout>3600</max_session_timeout>
<default_session_timeout>60</default_session_timeout>
<!-- ==================== DICTIONARIES ==================== -->
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
<dictionaries_config>*_dictionary.xml</dictionaries_config>
<user_defined_executable_functions_config>*function.xml</user_defined_executable_functions_config>
<!-- ==================== PROMETHEUS (REQUIRED FOR SIGNOZ) ==================== -->
<prometheus>
<endpoint>/metrics</endpoint>
<port>9363</port>
<metrics>true</metrics>
<events>true</events>
<asynchronous_metrics>true</asynchronous_metrics>
<status_info>true</status_info>
</prometheus>
<!-- ==================== DISTRIBUTED DDL ==================== -->
<distributed_ddl>
<path>/clickhouse/task_queue/ddl</path>
</distributed_ddl>
<!-- ==================== SYSTEM LOGS (MINIMAL) ==================== -->
<query_log>
<database>system</database>
<table>query_log</table>
<partition_by>toYYYYMM(event_date)</partition_by>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</query_log>
<part_log>
<database>system</database>
<table>part_log</table>
<partition_by>toYYYYMM(event_date)</partition_by>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</part_log>
<opentelemetry_span_log>
<engine>
engine MergeTree
partition by toYYYYMM(finish_date)
order by (finish_date, finish_time_us, trace_id)
</engine>
<database>system</database>
<table>opentelemetry_span_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</opentelemetry_span_log>
<crash_log>
<database>system</database>
<table>crash_log</table>
<partition_by />
<flush_interval_milliseconds>1000</flush_interval_milliseconds>
</crash_log>
<!-- ==================== SSL/TLS CONFIGURATION ==================== -->
<openSSL>
<server>
<verificationMode>none</verificationMode>
<loadDefaultCAFile>true</loadDefaultCAFile>
<cacheSessions>true</cacheSessions>
<disableProtocols>sslv2,sslv3</disableProtocols>
<preferServerCiphers>true</preferServerCiphers>
</server>
<client>
<loadDefaultCAFile>true</loadDefaultCAFile>
<cacheSessions>true</cacheSessions>
<disableProtocols>sslv2,sslv3</disableProtocols>
<preferServerCiphers>true</preferServerCiphers>
<invalidCertificateHandler>
<name>RejectCertificateHandler</name>
</invalidCertificateHandler>
</client>
</openSSL>
<!-- ==================== GRPC CONFIGURATION ==================== -->
<grpc>
<enable_ssl>false</enable_ssl>
<ssl_require_client_auth>false</ssl_require_client_auth>
<transport_compression_type>none</transport_compression_type>
<transport_compression_level>0</transport_compression_level>
<max_send_message_size>-1</max_send_message_size>
<max_receive_message_size>-1</max_receive_message_size>
<verbose_logs>false</verbose_logs>
</grpc>
</clickhouse>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment