From 9e4cf52949621cb3d7c51f03e029869ace80dff2 Mon Sep 17 00:00:00 2001 From: "Alex Chi Z." <4198311+skyzh@users.noreply.github.com> Date: Thu, 29 May 2025 17:32:19 +0800 Subject: [PATCH] pageserver: reduce concurrency for gc-compaction (#12054) ## Problem Temporarily reduce the concurrency of gc-compaction to 1 job at a time. We are going to roll out in the largest AWS region next week. Having one job running at a time makes it easier to identify what tenant causes problem if it's not running well and pause gc-compaction for that specific tenant. (We can make this configurable via pageserver config in the future!) ## Summary of changes Reduce `CONCURRENT_GC_COMPACTION_TASKS` from 2 to 1. Signed-off-by: Alex Chi Z --- pageserver/src/tenant/timeline/compaction.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pageserver/src/tenant/timeline/compaction.rs b/pageserver/src/tenant/timeline/compaction.rs index 143c2e0865..72ca0f9cc1 100644 --- a/pageserver/src/tenant/timeline/compaction.rs +++ b/pageserver/src/tenant/timeline/compaction.rs @@ -206,8 +206,8 @@ pub struct GcCompactionQueue { } static CONCURRENT_GC_COMPACTION_TASKS: Lazy> = Lazy::new(|| { - // Only allow two timelines on one pageserver to run gc compaction at a time. - Arc::new(Semaphore::new(2)) + // Only allow one timeline on one pageserver to run gc compaction at a time. + Arc::new(Semaphore::new(1)) }); impl GcCompactionQueue {