v.18.16Improvement
min_merge_bytes_to_use_direct_io Default Set to 10 GiB in ClickHouse
Themin_merge_bytes_to_use_direct_iooption is set to 10 GiB by default. A merge that forms large parts of tables from the MergeTree family will be performed inO_DIRECTmode, which prevents excessive page cache eviction. #3504
Why it matters
This feature addresses the issue of excessive page cache eviction during large merges in tables of the MergeTree family by performing merges in direct I/O mode once they exceed a specified size threshold. It improves system performance and stability by reducing cache pollution.How to use it
Users can enable or adjust this behavior by setting themin_merge_bytes_to_use_direct_io option in the configuration or via a session setting. By default, it is set to 10 GiB, meaning merges larger than this threshold will automatically use O_DIRECT.