@@ -345,7 +345,7 @@ impl NamespacedOrchestrator for NamespacedProcessOrchestrator {
345345 cpu_limit : config. cpu_limit ,
346346 scale : config. scale ,
347347 labels : config. labels ,
348- enable_transparent_hugepages : config. enable_transparent_hugepages ,
348+ clusterd_malloc_conf : config. clusterd_malloc_conf ,
349349 disk,
350350 } ;
351351
@@ -462,8 +462,8 @@ struct EnsureServiceConfig {
462462 pub labels : BTreeMap < String , String > ,
463463 /// Whether scratch disk space should be allocated for the service.
464464 pub disk : bool ,
465- /// Whether to enable transparent hugepages .
466- pub enable_transparent_hugepages : bool ,
465+ /// Optional jemalloc configuration .
466+ pub clusterd_malloc_conf : Option < String > ,
467467}
468468
469469/// A task executing blocking work for a [`NamespacedProcessOrchestrator`] in the background.
@@ -575,7 +575,7 @@ impl OrchestratorWorker {
575575 scale,
576576 labels,
577577 disk,
578- enable_transparent_hugepages ,
578+ clusterd_malloc_conf ,
579579 } : EnsureServiceConfig ,
580580 ) -> Result < ( ) , anyhow:: Error > {
581581 let full_id = self . config . full_id ( & id) ;
@@ -690,7 +690,7 @@ impl OrchestratorWorker {
690690 memory_limit,
691691 cpu_limit,
692692 launch_spec : self . config . launch_spec ,
693- enable_transparent_hugepages ,
693+ clusterd_malloc_conf : clusterd_malloc_conf . clone ( ) ,
694694 } ) ,
695695 ) ;
696696
@@ -796,7 +796,7 @@ impl OrchestratorWorker {
796796 memory_limit,
797797 cpu_limit,
798798 launch_spec,
799- enable_transparent_hugepages ,
799+ clusterd_malloc_conf ,
800800 } : ServiceProcessConfig ,
801801 ) -> impl Future < Output = ( ) > + use<> {
802802 let suppress_output = self . config . suppress_output ;
@@ -844,8 +844,8 @@ impl OrchestratorWorker {
844844 memory_limit. as_ref ( ) ,
845845 cpu_limit. as_ref ( ) ,
846846 ) ;
847- if enable_transparent_hugepages {
848- cmd. env ( "MALLOC_CONF" , "thp:always" ) ;
847+ if let Some ( malloc_conf ) = & clusterd_malloc_conf {
848+ cmd. env ( "MALLOC_CONF" , malloc_conf ) ;
849849 }
850850 info ! (
851851 "launching {full_id}-{i} via {} {}..." ,
@@ -942,7 +942,7 @@ struct ServiceProcessConfig {
942942 memory_limit : Option < MemoryLimit > ,
943943 cpu_limit : Option < CpuLimit > ,
944944 launch_spec : LaunchSpec ,
945- enable_transparent_hugepages : bool ,
945+ clusterd_malloc_conf : Option < String > ,
946946}
947947
948948struct ServiceProcessPort {
0 commit comments