压测clickhouse性能相关参数

背景:压测ck性能一直上不去,但是ck负载不大。尝试调整参数,验证是否有性能提升

1、background_common_pool_size

Sets the number of threads performing background non-specialized operations like cleaning the filesystem etc. for tables with MergeTree engines. Could be increased at runtime and could be applied at server startup from the default profile for backward compatibility.

2 、 max_threads 验证有效

The maximum number of threads to execute the request. By default, it is determined automatically.

3、background_pool_size

Sets the number of threads performing background merges and mutations for tables with MergeTree engines. You can only increase the number of threads at runtime. To lower the number of threads you have to restart the server. By adjusting this setting, you manage CPU and disk load. Smaller pool size utilizes less CPU and disk resources, but background processes advance slower which might eventually impact query performance.

Before changing it, please also take a look at related MergeTree settings, such as number_of_free_entries_in_pool_to_lower_max_size_of_merge and number_of_free_entries_in_pool_to_execute_mutation.

查看参数;

bash 复制代码
select * from system.settings where name  like '%background_common_pool_size%'
bash 复制代码
SHOW [CHANGED] SETTINGS LIKE|ILIKE <name>

show settings like '%background_common_pool_size%'

4、设置参数

bash 复制代码
SET param = value
set  background_common_pool_size = 128

加个globa执行也没报错 官方文档上没有global参数。但是阿里云dms 需要加上global 才能全局生效

bash 复制代码
set global background_common_pool_size = 128

https://help.aliyun.com/zh/clickhouse/user-guide/set-parameters-in-the-user-xml-file?spm=a2c4g.11186623.0.0.6bdc5d7fnAdCqs

https://clickhouse.com/docs/zh/sql-reference/statements/set

如果更改配置文件config以后

查询system.settings里面的参数没生效时因为

这里没改是因为system.settings查询的时候值是从user.xml中获取的,所以一直都原来的值,其实生效的是在config.xml里

https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings#background_pool_size

https://blog.csdn.net/qq_35423190/article/details/109999576

相关推荐
武子康4 天前
大数据-154 Apache Druid 架构与原理详解 基础架构、架构演进
java·大数据·clickhouse·hdfs·架构·flink·apache
武子康4 天前
大数据-152 Apache Druid 集群模式 配置启动【下篇】 超详细!
java·大数据·clickhouse·flink·apache
AAEllisonPang5 天前
ClickHouse 的 MergeTree 引擎有哪些性能优势?
大数据·数据库·clickhouse
SelectDB技术团队5 天前
快手:从 Clickhouse 到 Apache Doris,实现湖仓分离向湖仓一体架构升级
数据仓库·clickhouse·doris·快手·lakehouse
武子康5 天前
大数据-149 Apache Druid 基本介绍 技术特点 应用场景
大数据·hadoop·clickhouse·hdfs·架构·apache
武子康5 天前
大数据-155 Apache Druid 架构与原理详解 数据存储 索引服务 压缩机制
java·大数据·clickhouse·架构·flink·系统架构·apache
AAEllisonPang5 天前
ClickHouse 引擎的选择
大数据·数据库·clickhouse
云观秋毫5 天前
APO v0.5.0 发布:可视化配置告警规则;优化时间筛选器;支持自建的ClickHouse和VictoriaMetrics
运维·clickhouse
Biturd5 天前
docker-compose 快速部署clickhouse集群
clickhouse·docker·容器
武子康5 天前
大数据-156 Apache Druid 案例实战 Scala Kafka 订单统计
java·大数据·clickhouse·flink·kafka·scala·apache