Skip to content

Commit 941098c

Browse files
committed
Disable THP for jemalloc
THP won't improve performance much, but it will increase RSS usage.
1 parent 3fee67a commit 941098c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
5555
#[allow(non_upper_case_globals)]
5656
#[cfg(not(any(target_env = "msvc")))]
5757
#[unsafe(no_mangle)]
58-
pub static mut malloc_conf: *const c_char = c"percpu_arena:phycpu,tcache:false,dirty_decay_ms:1000,muzzy_decay_ms:0".as_ptr();
58+
pub static mut malloc_conf: *const c_char = c"percpu_arena:phycpu,tcache:false,thp:never,dirty_decay_ms:1000,muzzy_decay_ms:0".as_ptr();
5959
#[allow(non_upper_case_globals)]
6060
#[cfg(any(target_os = "android", target_os = "macos"))]
6161
#[unsafe(no_mangle)]
62-
pub static mut _rjem_malloc_conf: *const c_char = c"percpu_arena:phycpu,tcache:false,dirty_decay_ms:1000,muzzy_decay_ms:0".as_ptr();
62+
pub static mut _rjem_malloc_conf: *const c_char = c"percpu_arena:phycpu,tcache:false,thp:never,dirty_decay_ms:1000,muzzy_decay_ms:0".as_ptr();
6363

6464
const VERSION: &str = concat!(env!("CARGO_PKG_VERSION"), "-", env!("VERGEN_GIT_SHA"));
6565
pub const CLIENT_VERSION: &str = "1.6.4";

0 commit comments

Comments
 (0)