From d434b6587a71598e5d6f9a85ceea90191a7b3991 Mon Sep 17 00:00:00 2001 From: drrtuy Date: Thu, 1 May 2025 15:01:14 +0000 Subject: [PATCH] fix(perf,allocator): increased CountingAllocator checkpoint step size up to 100K --- utils/common/countingallocator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/common/countingallocator.h b/utils/common/countingallocator.h index b8cbc1713..85188e627 100644 --- a/utils/common/countingallocator.h +++ b/utils/common/countingallocator.h @@ -32,13 +32,13 @@ namespace allocators // It is supposed to recv a ptr to an atomic from a singleton entity, e.g. ResourceManager. // NB The atomic provides an upper hard limit for the memory usage and not the usage counter. // The allocator's model counts allocated size locally and to sync allocated size difference -// every CheckPointStepSize(100MB by default) both allocating and deallocating. +// every CheckPointStepSize both allocating and deallocating. // When a sync op hits MemoryLimitLowerBound trying to allocate more memory, it throws. // SQL operators or TBPS runtime must catch the exception and act acordingly. const constexpr int64_t MemoryLimitLowerBound = 500 * 1024 * 1024; // Higher values demonstrate slower response to memory limit violations. -const constexpr int64_t CheckPointStepSize = 1024; +const constexpr int64_t CheckPointStepSize = 100 * 1024; // Custom Allocator that tracks allocated memory using an atomic counter template