内存-clickhouse

clickhouse 哪些会占据内存

github上有个issue,讲述了在哪些地方会使用到内存
dictionaries
marks cache
uncompressed cache
running queries
currently executed materialized views
buffer tables
memory / temporary tables
background merges
kafka
etc.

mark cache

mark cache的作用

占用内存 用以缓存主键稀疏索引,用以加速查询。

配置 mark cache 的大小

config.xml 文件,配置参数

  <mark_cache_size></mark_cache_size>

监控

1: 查看mark cache 占据的内存大小

select * from system.asynchronous_metrics where metric = 'MarkCacheBytes'

2: 评价 mark cache 的设置是否合适的指标
主键稀疏索引缓存的未命中次数:
select * from system.events where event = 'MarkCacheMisses'

uncompressed cache

uncompressed cache 的作用

用于缓存数据

uncompressed cache 相关的配置参数

  • use_uncompressed_cache :是否开启数据缓存
  • uncompressed_cache_size :uncompressed_cache 数据的大小

监控

查看数据缓存占据的内存大小

select * from system.asynchronous_metrics where metric = 'UncompressedCacheBytes'
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容