內(nèi)存-clickhouse

clickhouse 哪些會(huì)占據(jù)內(nèi)存

github上有個(gè)issue,講述了在哪些地方會(huì)使用到內(nèi)存
dictionaries
marks cache
uncompressed cache
running queries
currently executed materialized views
buffer tables
memory / temporary tables
background merges
kafka
etc.

mark cache

mark cache的作用

占用內(nèi)存 用以緩存主鍵稀疏索引,用以加速查詢。

配置 mark cache 的大小

config.xml 文件,配置參數(shù)

  <mark_cache_size></mark_cache_size>

監(jiān)控

1: 查看mark cache 占據(jù)的內(nèi)存大小

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

2: 評(píng)價(jià) mark cache 的設(shè)置是否合適的指標(biāo)
主鍵稀疏索引緩存的未命中次數(shù):
select * from system.events where event = 'MarkCacheMisses'

uncompressed cache

uncompressed cache 的作用

用于緩存數(shù)據(jù)

uncompressed cache 相關(guān)的配置參數(shù)

  • use_uncompressed_cache :是否開啟數(shù)據(jù)緩存
  • uncompressed_cache_size :uncompressed_cache 數(shù)據(jù)的大小

監(jiān)控

查看數(shù)據(jù)緩存占據(jù)的內(nèi)存大小

select * from system.asynchronous_metrics where metric = 'UncompressedCacheBytes'
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容