mirror of https://github.com/ByConity/ByConity
350 lines
16 KiB
XML
350 lines
16 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
NOTE: User and query level settings are set up in "users.xml" file.
|
|
If you have accidentally specified user-level settings here, server won't start.
|
|
You can either move the settings to the right place inside "users.xml" file
|
|
or add <skip_check_for_incorrect_settings>1</skip_check_for_incorrect_settings> here.
|
|
-->
|
|
<yandex>
|
|
<logger>
|
|
<level>trace</level>
|
|
<log>/root/app/logs/byconity-server/server.log</log>
|
|
<errorlog>/root/app/logs/byconity-server/server.log</errorlog>
|
|
<size>1000M</size>
|
|
<count>10</count>
|
|
</logger>
|
|
|
|
<http_port>18685</http_port>
|
|
<rpc_port>18686</rpc_port>
|
|
<tcp_port>18684</tcp_port>
|
|
|
|
<exchange_port>18687</exchange_port>
|
|
<exchange_status_port>18688</exchange_status_port>
|
|
<!--
|
|
<interserver_http_port>9009</interserver_http_port>
|
|
-->
|
|
|
|
<max_connections>4096</max_connections>
|
|
|
|
<!-- For 'Connection: keep-alive' in HTTP 1.1 -->
|
|
<keep_alive_timeout>3</keep_alive_timeout>
|
|
|
|
<cnch_type>server</cnch_type>
|
|
<listen_host>::</listen_host>
|
|
|
|
<!-- gRPC protocol (see src/Server/grpc_protos/clickhouse_grpc.proto for the API) -->
|
|
<!-- <grpc_port>9100</grpc_port> -->
|
|
<grpc>
|
|
<enable_ssl>false</enable_ssl>
|
|
|
|
<!-- The following two files are used only if enable_ssl=1 -->
|
|
<ssl_cert_file>/path/to/ssl_cert_file</ssl_cert_file>
|
|
<ssl_key_file>/path/to/ssl_key_file</ssl_key_file>
|
|
|
|
<!-- Whether server will request client for a certificate -->
|
|
<ssl_require_client_auth>false</ssl_require_client_auth>
|
|
|
|
<!-- The following file is used only if ssl_require_client_auth=1 -->
|
|
<ssl_ca_cert_file>/path/to/ssl_ca_cert_file</ssl_ca_cert_file>
|
|
|
|
<!-- Default compression algorithm (applied if client doesn't specify another algorithm).
|
|
Supported algorithms: none, deflate, gzip, stream_gzip -->
|
|
<compression>deflate</compression>
|
|
|
|
<!-- Default compression level (applied if client doesn't specify another level).
|
|
Supported levels: none, low, medium, high -->
|
|
<compression_level>medium</compression_level>
|
|
|
|
<!-- Send/receive message size limits in bytes. -1 means unlimited -->
|
|
<max_send_message_size>-1</max_send_message_size>
|
|
<max_receive_message_size>-1</max_receive_message_size>
|
|
|
|
<!-- Enable if you want very detailed logs -->
|
|
<verbose_logs>false</verbose_logs>
|
|
</grpc>
|
|
|
|
<!-- Used with https_port and tcp_port_secure. Full ssl options list: https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h#L71 -->
|
|
<openSSL>
|
|
<server> <!-- Used for https server AND secure tcp port -->
|
|
<!-- openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/clickhouse-server/server.key -out /etc/clickhouse-server/server.crt -->
|
|
<certificateFile>/etc/clickhouse-server/server.crt</certificateFile>
|
|
<privateKeyFile>/etc/clickhouse-server/server.key</privateKeyFile>
|
|
<!-- dhparams are optional. You can delete the <dhParamsFile> element.
|
|
To generate dhparams, use the following command:
|
|
openssl dhparam -out /etc/clickhouse-server/dhparam.pem 4096
|
|
Only file format with BEGIN DH PARAMETERS is supported.
|
|
-->
|
|
<dhParamsFile>/etc/clickhouse-server/dhparam.pem</dhParamsFile>
|
|
<verificationMode>none</verificationMode>
|
|
<loadDefaultCAFile>true</loadDefaultCAFile>
|
|
<cacheSessions>true</cacheSessions>
|
|
<disableProtocols>sslv2,sslv3</disableProtocols>
|
|
<preferServerCiphers>true</preferServerCiphers>
|
|
</server>
|
|
|
|
<client> <!-- Used for connecting to https dictionary source and secured Zookeeper communication -->
|
|
<loadDefaultCAFile>true</loadDefaultCAFile>
|
|
<cacheSessions>true</cacheSessions>
|
|
<disableProtocols>sslv2,sslv3</disableProtocols>
|
|
<preferServerCiphers>true</preferServerCiphers>
|
|
<!-- Use for self-signed: <verificationMode>none</verificationMode> -->
|
|
<invalidCertificateHandler>
|
|
<!-- Use for self-signed: <name>AcceptCertificateHandler</name> -->
|
|
<name>RejectCertificateHandler</name>
|
|
</invalidCertificateHandler>
|
|
</client>
|
|
</openSSL>
|
|
|
|
<!-- Maximum number of concurrent queries. -->
|
|
<max_concurrent_queries>100</max_concurrent_queries>
|
|
|
|
<max_server_memory_usage>0</max_server_memory_usage>
|
|
|
|
<max_thread_pool_size>10000</max_thread_pool_size>
|
|
|
|
<!-- On memory constrained environments you may have to set this to value larger than 1.
|
|
-->
|
|
<max_server_memory_usage_to_ram_ratio>0.9</max_server_memory_usage_to_ram_ratio>
|
|
|
|
<!-- Simple server-wide memory profiler. Collect a stack trace at every peak allocation step (in bytes).
|
|
Data will be stored in system.trace_log table with query_id = empty string.
|
|
Zero means disabled.
|
|
-->
|
|
<total_memory_profiler_step>4194304</total_memory_profiler_step>
|
|
|
|
<!-- Collect random allocations and deallocations and write them into system.trace_log with 'MemorySample' trace_type.
|
|
The probability is for every alloc/free regardless to the size of the allocation.
|
|
Note that sampling happens only when the amount of untracked memory exceeds the untracked memory limit,
|
|
which is 4 MiB by default but can be lowered if 'total_memory_profiler_step' is lowered.
|
|
You may want to set 'total_memory_profiler_step' to 1 for extra fine grained sampling.
|
|
-->
|
|
<total_memory_tracker_sample_probability>0</total_memory_tracker_sample_probability>
|
|
|
|
<!-- Set limit on number of open files (default: maximum). This setting makes sense on Mac OS X because getrlimit() fails to retrieve
|
|
correct maximum value. -->
|
|
<!-- <max_open_files>262144</max_open_files> -->
|
|
|
|
<!-- Size of cache of uncompressed blocks of data, used in tables of MergeTree family.
|
|
In bytes. Cache is single for server. Memory is allocated only on demand.
|
|
Cache is used when 'use_uncompressed_cache' user setting turned on (off by default).
|
|
Uncompressed cache is advantageous only for very short queries and in rare cases.
|
|
|
|
Note: uncompressed cache can be pointless for lz4, because memory bandwidth
|
|
is slower than multi-core decompression on some server configurations.
|
|
Enabling it can sometimes paradoxically make queries slower.
|
|
-->
|
|
<uncompressed_cache_size>8589934592</uncompressed_cache_size>
|
|
|
|
<!-- Approximate size of mark cache, used in tables of MergeTree family.
|
|
In bytes. Cache is single for server. Memory is allocated only on demand.
|
|
You should not lower this value.
|
|
-->
|
|
<mark_cache_size>5368709120</mark_cache_size>
|
|
|
|
|
|
<!-- If you enable the `min_bytes_to_use_mmap_io` setting,
|
|
the data in MergeTree tables can be read with mmap to avoid copying from kernel to userspace.
|
|
It makes sense only for large files and helps only if data reside in page cache.
|
|
To avoid frequent open/mmap/munmap/close calls (which are very expensive due to consequent page faults)
|
|
and to reuse mappings from several threads and queries,
|
|
the cache of mapped files is maintained. Its size is the number of mapped regions (usually equal to the number of mapped files).
|
|
The amount of data in mapped files can be monitored
|
|
in system.metrics, system.metric_log by the MMappedFiles, MMappedFileBytes metrics
|
|
and in system.asynchronous_metrics, system.asynchronous_metrics_log by the MMapCacheCells metric,
|
|
and also in system.events, system.processes, system.query_log, system.query_thread_log by the
|
|
CreatedReadBufferMMap, CreatedReadBufferMMapFailed, MMappedFileCacheHits, MMappedFileCacheMisses events.
|
|
Note that the amount of data in mapped files does not consume memory directly and is not accounted
|
|
in query or server memory usage - because this memory can be discarded similar to OS page cache.
|
|
The cache is dropped (the files are closed) automatically on removal of old parts in MergeTree,
|
|
also it can be dropped manually by the SYSTEM DROP MMAP CACHE query.
|
|
-->
|
|
<mmap_cache_size>1000</mmap_cache_size>
|
|
|
|
<!-- Cache size for compiled expressions.-->
|
|
<compiled_expression_cache_size>134217728</compiled_expression_cache_size>
|
|
|
|
<!-- Path to data directory, with trailing slash. -->
|
|
<path>/root/app/data/byconity_server/var/lib/server/</path>
|
|
|
|
<!-- Path to temporary data for processing hard queries. -->
|
|
<tmp_path>/root/app/data/byconity_server/var/lib/server/tmp/</tmp_path>
|
|
|
|
<users_config>/root/app/config/users.xml</users_config>
|
|
|
|
<!-- Policy from the <storage_configuration> for the temporary files.
|
|
If not set <tmp_path> is used, otherwise <tmp_path> is ignored.
|
|
|
|
Notes:
|
|
- move_factor is ignored
|
|
- keep_free_space_bytes is ignored
|
|
- max_data_part_size_bytes is ignored
|
|
- you must have exactly one volume in that policy
|
|
-->
|
|
<!-- <tmp_policy>tmp</tmp_policy> -->
|
|
|
|
<!-- Directory with user provided files that are accessible by 'file' table function. -->
|
|
<user_files_path>/root/app/data/byconity_server/var/lib/server/user_files/</user_files_path>
|
|
|
|
<!-- LDAP server definitions. -->
|
|
<ldap_servers>
|
|
</ldap_servers>
|
|
|
|
<!-- To enable Kerberos authentication support for HTTP requests (GSS-SPNEGO), for those users who are explicitly configured
|
|
to authenticate via Kerberos, define a single 'kerberos' section here.
|
|
Parameters:
|
|
principal - canonical service principal name, that will be acquired and used when accepting security contexts.
|
|
This parameter is optional, if omitted, the default principal will be used.
|
|
This parameter cannot be specified together with 'realm' parameter.
|
|
realm - a realm, that will be used to restrict authentication to only those requests whose initiator's realm matches it.
|
|
This parameter is optional, if omitted, no additional filtering by realm will be applied.
|
|
This parameter cannot be specified together with 'principal' parameter.
|
|
Example:
|
|
<kerberos />
|
|
Example:
|
|
<kerberos>
|
|
<principal>HTTP/clickhouse.example.com@EXAMPLE.COM</principal>
|
|
</kerberos>
|
|
Example:
|
|
<kerberos>
|
|
<realm>EXAMPLE.COM</realm>
|
|
</kerberos>
|
|
-->
|
|
|
|
<!-- Sources to read users, roles, access rights, profiles of settings, quotas. -->
|
|
<user_directories>
|
|
<users_xml>
|
|
<!-- Path to configuration file with predefined users. -->
|
|
<path>users.xml</path>
|
|
</users_xml>
|
|
<local_directory>
|
|
<!-- Path to folder where users created by SQL commands are stored. -->
|
|
<path>/root/app/data/byconity_server/var/lib/server/access/</path>
|
|
</local_directory>
|
|
</user_directories>
|
|
|
|
<!-- Default profile of settings. -->
|
|
<default_profile>default</default_profile>
|
|
|
|
<!-- Comma-separated list of prefixes for user-defined settings. -->
|
|
<custom_settings_prefixes></custom_settings_prefixes>
|
|
|
|
<!-- System profile of settings. This settings are used by internal processes (Distributed DDL worker and so on). -->
|
|
<!-- <system_profile>default</system_profile> -->
|
|
|
|
<!-- Buffer profile of settings.
|
|
This settings are used by Buffer storage to flush data to the underlying table.
|
|
Default: used from system_profile directive.
|
|
-->
|
|
<!-- <buffer_profile>default</buffer_profile> -->
|
|
|
|
<!-- Default database. -->
|
|
<default_database>default</default_database>
|
|
|
|
<!-- Server time zone could be set here.
|
|
|
|
Time zone is used when converting between String and DateTime types,
|
|
when printing DateTime in text formats and parsing DateTime from text,
|
|
it is used in date and time related functions, if specific time zone was not passed as an argument.
|
|
|
|
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
|
|
If not specified, system time zone at server startup is used.
|
|
|
|
Please note, that server could display time zone alias instead of specified name.
|
|
Example: W-SU is an alias for Europe/Moscow and Zulu is an alias for UTC.
|
|
-->
|
|
<!-- <timezone>Europe/Moscow</timezone> -->
|
|
|
|
<!-- You can specify umask here (see "man umask"). Server will apply it on startup.
|
|
Number is always parsed as octal. Default umask is 027 (other users cannot read logs, data files, etc; group can only read).
|
|
-->
|
|
<!-- <umask>022</umask> -->
|
|
|
|
<!-- Perform mlockall after startup to lower first queries latency
|
|
and to prevent clickhouse executable from being paged out under high IO load.
|
|
Enabling this option is recommended but will lead to increased startup time for up to a few seconds.
|
|
-->
|
|
<mlock_executable>true</mlock_executable>
|
|
|
|
<!-- Reallocate memory for machine code ("text") using huge pages. Highly experimental. -->
|
|
<remap_executable>false</remap_executable>
|
|
|
|
<![CDATA[
|
|
Uncomment below in order to use JDBC table engine and function.
|
|
|
|
To install and run JDBC bridge in background:
|
|
* [Debian/Ubuntu]
|
|
export MVN_URL=https://repo1.maven.org/maven2/ru/yandex/clickhouse/clickhouse-jdbc-bridge
|
|
export PKG_VER=$(curl -sL $MVN_URL/maven-metadata.xml | grep '<release>' | sed -e 's|.*>\(.*\)<.*|\1|')
|
|
wget https://github.com/ClickHouse/clickhouse-jdbc-bridge/releases/download/v$PKG_VER/clickhouse-jdbc-bridge_$PKG_VER-1_all.deb
|
|
apt install --no-install-recommends -f ./clickhouse-jdbc-bridge_$PKG_VER-1_all.deb
|
|
clickhouse-jdbc-bridge &
|
|
|
|
* [CentOS/RHEL]
|
|
export MVN_URL=https://repo1.maven.org/maven2/ru/yandex/clickhouse/clickhouse-jdbc-bridge
|
|
export PKG_VER=$(curl -sL $MVN_URL/maven-metadata.xml | grep '<release>' | sed -e 's|.*>\(.*\)<.*|\1|')
|
|
wget https://github.com/ClickHouse/clickhouse-jdbc-bridge/releases/download/v$PKG_VER/clickhouse-jdbc-bridge-$PKG_VER-1.noarch.rpm
|
|
yum localinstall -y clickhouse-jdbc-bridge-$PKG_VER-1.noarch.rpm
|
|
clickhouse-jdbc-bridge &
|
|
|
|
Please refer to https://github.com/ClickHouse/clickhouse-jdbc-bridge#usage for more information.
|
|
]]>
|
|
|
|
<!-- Maximum session timeout, in seconds. Default: 3600. -->
|
|
<max_session_timeout>3600</max_session_timeout>
|
|
|
|
<!-- Default session timeout, in seconds. Default: 60. -->
|
|
<default_session_timeout>60</default_session_timeout>
|
|
|
|
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
|
|
See https://clickhouse.yandex/docs/en/dicts/internal_dicts/
|
|
-->
|
|
|
|
|
|
|
|
<top_level_domains_lists>
|
|
<!--
|
|
<public_suffix_list>/path/to/public_suffix_list.dat</public_suffix_list>
|
|
-->
|
|
</top_level_domains_lists>
|
|
|
|
<!-- Configuration of external dictionaries. See:
|
|
https://clickhouse.tech/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts
|
|
-->
|
|
<dictionaries_config>*_dictionary.xml</dictionaries_config>
|
|
|
|
<format_schema_path>/root/app/data/byconity_server/var/lib/server/format_schemas/</format_schema_path>
|
|
|
|
<storage_configuration>
|
|
<disks>
|
|
<default></default>
|
|
<server_local_disk1>
|
|
<path>/root/app/data/byconity_server/server_local_disk/data/0/</path>
|
|
</server_local_disk1>
|
|
<server_hdfs_disk0>
|
|
<path>/user/clickhouse/</path>
|
|
<type>bytehdfs</type>
|
|
</server_hdfs_disk0>
|
|
</disks>
|
|
<policies>
|
|
<default>
|
|
<volumes>
|
|
<local>
|
|
<default>default</default>
|
|
<disk>default</disk>
|
|
<disk>server_local_disk1</disk>
|
|
</local>
|
|
</volumes>
|
|
</default>
|
|
<cnch_default_hdfs>
|
|
<volumes>
|
|
<hdfs>
|
|
<default>server_hdfs_disk0</default>
|
|
<disk>server_hdfs_disk0</disk>
|
|
</hdfs>
|
|
</volumes>
|
|
</cnch_default_hdfs>
|
|
</policies>
|
|
</storage_configuration>
|
|
<cnch_config>/root/app/config/cnch_config.xml</cnch_config>
|
|
</yandex>
|