From bea69ef9f42dcc03635ae1bb7520a255a3f4dcf1 Mon Sep 17 00:00:00 2001 From: Vlad Lazar Date: Wed, 17 Apr 2024 20:51:31 +0100 Subject: [PATCH] pageserver/config: disable image layer creation check threshold --- pageserver/src/tenant/config.rs | 2 +- pageserver/src/tenant/timeline.rs | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/pageserver/src/tenant/config.rs b/pageserver/src/tenant/config.rs index a2bb479f63..55ce89509f 100644 --- a/pageserver/src/tenant/config.rs +++ b/pageserver/src/tenant/config.rs @@ -59,7 +59,7 @@ pub mod defaults { pub const DEFAULT_EVICTIONS_LOW_RESIDENCE_DURATION_METRIC_THRESHOLD: &str = "24 hour"; // By default ingest enough WAL for two new L0 layers before checking if new image // image layers should be created. - pub const DEFAULT_IMAGE_LAYER_CREATION_CHECK_THRESHOLD: u8 = 2; + pub const DEFAULT_IMAGE_LAYER_CREATION_CHECK_THRESHOLD: u8 = 0; pub const DEFAULT_INGEST_BATCH_SIZE: u64 = 100; } diff --git a/pageserver/src/tenant/timeline.rs b/pageserver/src/tenant/timeline.rs index 46b3d41e2b..a466e51e4c 100644 --- a/pageserver/src/tenant/timeline.rs +++ b/pageserver/src/tenant/timeline.rs @@ -1742,15 +1742,13 @@ impl Timeline { } fn get_image_layer_creation_check_threshold(&self) -> u8 { - let tenant_conf = self.tenant_conf.load(); - tenant_conf - .tenant_conf + // Ignore the tenant config override and use the default. + // This was done as a quick fix to resolve a perf degrdation. + // TODO: figure out if we wish to keep this config and related functionality + // If not, deprecate the config gracefully. + self.conf + .default_tenant_conf .image_layer_creation_check_threshold - .unwrap_or( - self.conf - .default_tenant_conf - .image_layer_creation_check_threshold, - ) } pub(super) fn tenant_conf_updated(&self, new_conf: &TenantConfOpt) {