-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
Motivation
- High concurrent query performance is poor, among which Spin Lock in tcmalloc has a large CPU ratio;
- The cache utilization in PageCache, MemPool, and Vec Allocator needs to be further improved;
- Multiple memory allocators from Impala, ClickHouse, and Doris coexist, which leads to optimization difficulties;
(Similar problems exist while turning on or off the vectorization engine)
Expected Return
- Unified memory allocator;
- More memory reuse;
- Improve cache hit rate and reduce cache size;
- Try to introduce other memory frameworks such as JeMalloc;
- Reduce additional costs such as mem tracker;
Optimization direction
- Stress testing on more test sets to find memory hotspots;
- Test the performance of multiple memory allocators currently existing in Doris in different scenarios, unify them;
- Try to introduce tests such as JeMalloc;
Unify memory allocator
Row execution engine memory allocator
From Impala:
More previous research: https://shimo.im/docs/DXvQPcqPH3TyR6pYVectorized execution engine memory allocator
From ClickHouse:
In the future
Things to do
- Arena is equivalent to MemPool, unify them;
- SystemAllocator is equivalent to CK Allocator, unify them, and consider memory alignment, consider the use of MMap and HugePage;
- Compare the performance of Malloc, ChunkAllocator, and MMap allocating memory with different lengths at different frequencies. Combine their strengths.
- When removing the line storage execution engine, remove BufferAllocator, BufferPool, and SubAllocator at the same time;
- Consider the implementation of spill disk.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels


