From 610ebf0312213442d24380056cb72afed526dd9b Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Wed, 21 Jun 2023 21:15:48 +0000 Subject: [PATCH] Improve memory usage in multiproduct_kati Start the subtasks at 15 second intervals, rather than all at once. Bug: b/286423944 Test: manual Change-Id: I21981460dcdd618f42abefcc221a05ce6aca84c1 --- cmd/multiproduct_kati/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/multiproduct_kati/main.go b/cmd/multiproduct_kati/main.go index b897bb56c..c3b038178 100644 --- a/cmd/multiproduct_kati/main.go +++ b/cmd/multiproduct_kati/main.go @@ -399,6 +399,9 @@ func main() { var wg sync.WaitGroup for i := 0; i < jobs; i++ { wg.Add(1) + // To smooth out the spikes in memory usage, skew the + // initial starting time of the jobs by a small amount. + time.Sleep(15 * time.Second) go func() { defer wg.Done() for {