clickhouse-docs
clickhouse-docs copied to clipboard
Clarify what linux version should have THP set to madvise
Hello, tips.md mentions that THP can cause significant performance degradation but updating to madvise is only necessary if using using old Linux kernel. Can we be more specific? What is old? Otherwise, how does one know whether to update /sys/kernel/mm/transparent_hugepage/enabled or not?
P.S Thanks for blessing the world with clickhouse, you all are awesome.
I also have same problem. I didn't found code about madvise mem to huge page, just wonder if it works now?
https://github.com/ClickHouse/ClickHouse/commit/60054d177c8bc190e8187c7c5f5e8495a1957a04
this commit delete madvise from allocator and ClickHouse/ClickHouse#14685 add hugepage for text segment as an experimental feature, it not turn on in production env.
so maybe turn off hugepage is ok in production env?
That note was about performance issues in Linux Kernels 3.2...
With a lot of RAM (like 64GB+) and transparent_hugepage enabled you may experience long pauses, because Kernel may spend a lot of time on RAM defragmentation. With Kernels 5+ it's safe to use [always].
this commit delete madvise from allocator and https://github.com/ClickHouse/ClickHouse/pull/14685 add hugepage for text segment
That tips.md concern is about Linux page cache (page cache uses THP), not about memory directly allocated by Clickhouse-server.
Disclaimer: I want to clarify that I am just an ordinary person on the Internet. I have no connection or association with Clickhouse, Inc. or its development team. It is important to note that my opinion holds no value and should not be considered.
That tips.md concern is about Linux page cache (page cache uses THP), not about memory directly allocated by Clickhouse-server.
Also add some public links about THP: From this presentations, we can get some clues. https://presentations.clickhouse.com/database_saturday_2020/#4
And server code now check kernel not use always for THP. https://github.com/ClickHouse/ClickHouse/blob/1c45f9f6bdb199cdb8ec90b2a9f3ea03dd4121cc/programs/server/Server.cpp#L534