Dynamic Memory Buffer Allocation in Database Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Traditional database management systems inefficiently manage memory by separating table data and temporary data, leading to unused memory capacity and complex configuration challenges, which can result in query failures and suboptimal performance.
Innovation Solution
Implementing a dynamic memory manager that adjusts table data and temporary data allocations within a shared memory buffer on a query-by-query basis, allowing for reallocation of memory resources to optimize memory usage and improve performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a fixed buffer pool size is configured for table data, then memory allocation is simple and stable, but memory utilization is inefficient and throughput is limited
Solution Approach 1:
The patent implements dynamic memory allocation where the buffer pool size for table data is not fixed but adjusts automatically based on system conditions. The memory manager continuously monitors query execution patterns and temporarily modifies the buffer pool size to optimize throughput, transforming the static memory management system into a dynamic one that adapts to changing workload requirements.
2Reliability
If buffer pool size is increased to handle peak query demands, then query reliability is improved, but memory is wasted during low-query periods
Solution Approach 1:
The patent changes the parameter of buffer pool size from a constant value to a variable that adjusts based on query workload. During peak query periods, the buffer pool size is increased to ensure reliable query execution; during low-query periods, the buffer pool size is reduced to free memory for other uses, thereby eliminating the waste associated with always maintaining a large buffer pool.
Solution Approach 2:
The memory manager automatically monitors system state and adjusts buffer pool size without requiring manual intervention or complex external configuration. The system serves itself by detecting when query demands increase and autonomously allocating additional memory to the buffer pool, and similarly releasing memory when demands decrease.
3Ease of operation
If memory is allocated separately for table data and temporary data, then memory management is straightforward, but memory flexibility and adaptability are reduced
Solution Approach 1:
The patent merges the previously separate memory allocations for table data and temporary data into a unified memory management system. The memory manager now controls a single pool of memory that can be dynamically allocated to either table data or temporary data based on real-time needs, combining what were previously independent allocation mechanisms into one flexible system.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Embodiments of the present disclosure include techniques for cooperative memory management. In one embodiment, a database management system includes a memory manager for managing a memory buffer. The memory buffer is configured to allocate memory to table data and temporary data dynamically. In some embodiments, table data memory allocations are reduced and temporary data memory allocations are increased to process queries. Temporary data memory allocations may be increased to store temporary data associated with one or more portions of a query. The memory buffer reallocates table data memory allocations and temporary data memory allocations as needed to more efficiently use available memory.