In-Memory Database Memory Reclamation via Partitioned Heaps
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In-memory database memory resources are not efficiently reclaimed, leading to delays in data access due to the time-consuming process of sorting and removing data, especially when the database becomes full, as existing methods focus on a single heap which is inefficient with numerous memory resources.
Innovation Solution
Segmenting memory resources into multiple partitions with separate heaps based on data age and weight class, allowing for asynchronous generation and reclamation of memory resources, prioritizing the least recently used data with higher age-to-weight ratios for efficient memory reallocation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If a single heap is used to manage all memory resources, then the structure is simple, but the reclamation process becomes time-consuming and inefficient when memory resources are numerous
Solution Approach 1:
The patent divides memory resources into multiple partitions, with each partition having its own heap data structure. This segmentation allows parallel processing of memory reclamation across different partitions, significantly improving reclamation speed while maintaining manageable complexity through modular organization.
2Productivity
If memory resources are reclaimed based on least recently used data, then memory efficiency is improved, but data access latency increases due to the time required to identify and remove data
Solution Approach 1:
The patent pre-sorts memory resources within each heap partition based on recency of use before reclamation is needed. This preliminary organization allows the system to quickly identify and reclaim least recently used data without performing time-consuming sorting operations at the moment of memory shortage, thereby reducing access latency while maintaining efficient memory utilization.
3Device complexity
If all memory resources are treated equally during reclamation, then the process is simple, but important data may be incorrectly discarded and system performance degraded
Solution Approach 1:
The patent assigns different characteristics to different memory partitions, allowing specific reclamation strategies to be applied to each partition based on the importance and characteristics of the data it contains. This enables the system to protect critical data in certain partitions while aggressively reclaiming memory in other partitions, ensuring reliable data retention accuracy without requiring uniformly complex processing across all memory resources.
Data Source
AI summary
A method for reclaiming memory resources may include segmenting a plurality of memory resources in an in-memory database into a first resource partition and a second resource partition; generating, for the first resource partition, a first heap containing a first plurality of memory resources sorted based on an age of data occupying the first plurality of memory resources; generating, for the second resource partition, a second heap containing a second plurality of memory resources sorted based on an age of data occupying the second plurality of memory resources; and when a shortage of memory resources is detected, identifying, from the first heap, a first memory resource containing a least recently used data, identifying, from the second heap, a second memory resource containing a least recently used data, and reclaiming the first memory resource and/or the second memory resource. Related systems and articles of manufacture are also disclosed.


