1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

fix(perf,allocator): increased CountingAllocator checkpoint step size up

to 100K
This commit is contained in:
drrtuy
2025-05-01 15:01:14 +00:00
parent d8bef9dc11
commit d434b6587a

View File

@ -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 <typename T>