Slab Memory Allocator Dynamic Buffer Resizing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In large-scale deduplication backup systems like DDFS, traditional memory allocators are insufficient for managing hundreds of millions of data segments due to memory limitations, leading to issues such as unnecessary tag eviction or memory exhaustion when setting tag limits too low or too high.

Innovation Solution

A dynamic buffer resizing mechanism within a slab memory allocator that dynamically reclaims larger memory buffers to accommodate smaller allocations, allowing the system to adapt to varying workloads by shrinking buffers and reclaiming memory, thus preventing unnecessary data loss and optimizing memory usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If fixed size buffers are used with high tag limits, then memory allocation is simplified, but memory exhaustion occurs when handling hundreds of millions of data segments

Engineering Contradiction:
Improvememory allocation complexityVSAvoidmemory capacity
Core Design Contradiction:
Device complexityVSQuantity of substance

Solution Approach 1:

The patent implements dynamic buffer resizing where the slab allocator can grow and shrink buffers based on actual workload demands. When memory pressure is detected, the allocator dynamically reduces buffer sizes and evicts less recently used tags, allowing the system to handle variable workload sizes without pre-allocating excessive memory capacity.

Inventive Principle:
Principle #15Dynamics

2Quantity of substance

If fixed size buffers are used with low tag limits, then memory usage is controlled, but tag eviction occurs leading to data loss

Engineering Contradiction:
Improvememory usageVSAvoiddata retention
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The system dynamically adjusts the tag limit parameter based on current memory conditions and workload characteristics. Rather than using a fixed low limit that causes premature eviction, the allocator modifies the effective tag limit adaptively, allowing higher retention during low-memory conditions by adjusting which tags are evicted based on usage patterns and priority.

Inventive Principle:
Principle #35Parameter changes

3Ease of operation

If traditional memory allocators are used, then allocation is straightforward, but they cannot dynamically reclaim memory for varying workloads

Engineering Contradiction:
Improveallocation simplicityVSAvoidworkload adaptability
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

The slab allocator implements feedback mechanisms that monitor memory usage patterns, allocation rates, and workload characteristics. Based on this feedback, the allocator dynamically adjusts buffer sizes, allocation thresholds, and eviction policies. This closed-loop control enables the system to adapt to varying workload demands while maintaining straightforward allocation operations through automated parameter adjustment.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11372681B2Slab memory allocator with dynamic buffer resizing
Publication Date: 2022.06.28 EMC IP HLDG CO LLC
  • US11372681B2 patent drawing
  • US11372681B2 patent drawing
  • US11372681B2 patent drawing

AI summary

Embodiments for allocating and reclaiming memory using dynamic buffer allocation for a slab memory allocator. The method keeps track of a count of a total number of worker threads and a count of a total number of quiesced threads, and determines if there is any free slab memory. If there is no free slab memory, the method triggers an out of memory event and increments the count of the total number of quiesced threads. It reclaims all objects currently allocated in an object pool, and allocates a buffer of a next smaller size than an original buffer until a sufficient amount of slab memory is freed.