diff --git a/Cargo.lock b/Cargo.lock index b784a9efc..15f2d4ffe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6888,6 +6888,7 @@ dependencies = [ "rand 0.9.2", "serde", "sha2 0.10.9", + "tikv-jemallocator", "tokio", "tokio-stream", "tokio-util 0.7.16", diff --git a/architectures/centralized/server/Cargo.toml b/architectures/centralized/server/Cargo.toml index 4ce5c9d59..c761c8108 100644 --- a/architectures/centralized/server/Cargo.toml +++ b/architectures/centralized/server/Cargo.toml @@ -32,5 +32,8 @@ toml.workspace = true clap-markdown.workspace = true psyche-python-extension-impl = { workspace = true, optional = true } +[target.'cfg(target_family = "unix")'.dependencies] +tikv-jemallocator = "0.6" + [features] python = ["psyche-python-extension-impl"] diff --git a/architectures/centralized/server/src/main.rs b/architectures/centralized/server/src/main.rs index 58cf2cf00..97d8687d3 100644 --- a/architectures/centralized/server/src/main.rs +++ b/architectures/centralized/server/src/main.rs @@ -7,8 +7,8 @@ use clap::{ArgAction, Parser}; use psyche_centralized_shared::ClientId; use psyche_coordinator::Coordinator; use psyche_tui::{ - LogOutput, ServiceInfo, logging::{MetricsDestination, OpenTelemetry, RemoteLogsDestination, TraceDestination}, + LogOutput, ServiceInfo, }; use std::{ path::{Path, PathBuf}, @@ -16,6 +16,10 @@ use std::{ }; use tracing::{error, info}; +#[cfg(target_family = "unix")] +#[global_allocator] +static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; + #[derive(Parser, Debug)] struct Args { #[command(subcommand)]