From d4e33c869c0ea1b41d61307c5f120ad825041011 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Mon, 7 Jun 2021 12:08:08 +1000 Subject: [PATCH] Only apply malloc tuning for beacon node --- lighthouse/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lighthouse/src/main.rs b/lighthouse/src/main.rs index fd299e04e16..7c4effe8346 100644 --- a/lighthouse/src/main.rs +++ b/lighthouse/src/main.rs @@ -165,7 +165,11 @@ fn main() { // Configure the allocator early in the process, before it has the chance to use the default values for // anything important. - if !matches.is_present(DISABLE_MALLOC_TUNING_FLAG) { + // + // Only apply this optimization for the beacon node. It's the only process with a substantial + // memory footprint. + let is_beacon_node = matches.subcommand_name() == Some("beacon_node"); + if is_beacon_node && !matches.is_present(DISABLE_MALLOC_TUNING_FLAG) { if let Err(e) = configure_memory_allocator() { eprintln!( "Unable to configure the memory allocator: {} \n\