clickhouse 配置

(1)aggregation_memory_efficient_merge_threads:

So, what about mystical "aggregation_memory_efficient_merge_threads" setting? This setting has its meaning when you enable "distributed_aggregation_memory_efficient" to limit memory usage during distributed aggregation or when you enabled "max_bytes_before_external_group_by".

It sets number of threads to do merging of intermediate results. Zero value means - automatically determine number of threads by number of CPU cores. To efficiently merge intermediate data, it is split by 256 buckets (partitions), and all data for each bucket is merged at one step.
When using one merging thread, only one bucket (1/256 of total amount of intermediate data) will reside in memory. If using more threads - then proportionally more memory is used, but merging are processed proportionally faster.

The setting was set to 1 in older versions of ClickHouse, because there was bugs in multithreaded bucket-aware merging of intermediate data.
Then bug was fixed, and default value of setting was changed to 0 (use automatically determined number of threads). Now external and distributed aggregation works much faster by default.

(2)listen_backlog:

The behavior of the backlog argument on TCP sockets changed with Linux 2.2. Now it specifies the queue length for completely established sockets waiting to be accepted, instead of the number of incomplete connection requests. The maximum length of the queue for incomplete sockets can be set using /proc/sys/net/ipv4/tcp_max_syn_backlog.

   clickhouse default value:

    <listen_backlog>64</listen_backlog>

高并发时需提升这个配置值。

(3)enable_scalar_subquery_optimization =0

解决with 语句在集群中执行时的问题。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值