Thread-Local Memory Fragment Reuse for Parallel Data Loading

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Big-data processing software faces challenges in achieving both high performance and low engineering cost, as integrated Java heap management reduces engineering cost but sacrifices performance, while off-heap memory increases performance but requires complex heap management.

Innovation Solution

A memory management system that allocates thread-local memory areas in a global memory, gathering fragments from other threads and reallocating them to meet requested memory sizes, using direct I/O support and bypassing zero fills to optimize memory usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If integrated Java heap management is used, then engineering cost is reduced, but performance deteriorates due to garbage collection, lazy free, and redundant buffering for file I/O

Engineering Contradiction:
Improveengineering costVSAvoidperformance
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The patent segments the heap memory into thread-local memory areas, allowing each thread to manage its own memory independently. This segmentation enables parallel data loading without interfering with other threads, eliminating the need for complex garbage collection and lazy free mechanisms while maintaining high performance and reducing engineering cost.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a memory manager as an intermediary component that handles memory allocation and management. This memory manager uses a free list to track available memory and a generation counter to manage memory generations, providing efficient memory management without requiring complex garbage collection mechanisms.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If off-heap memory is used, then performance is improved, but device complexity increases due to complex heap management requirements

Engineering Contradiction:
ImproveperformanceVSAvoidheap management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the heap memory into thread-local memory areas, allowing each thread to manage its own memory independently. This segmentation simplifies heap management by eliminating the need for complex garbage collection and lazy free mechanisms while maintaining high performance.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements self-service memory management where each thread manages its own memory allocation and release. The memory manager uses a free list and generation counter to automatically manage memory, eliminating the need for complex external heap management mechanisms.

Inventive Principle:
Principle #25Self-service

3Quantity of substance

If thread-local memory areas are allocated in global memory, then memory reuse efficiency is improved, but allocation complexity increases

Engineering Contradiction:
Improvememory reuse efficiencyVSAvoidallocation complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent implements a feedback mechanism where the memory manager scans thread-local memory areas to identify reusable memory fragments. The memory manager uses a free list to track available memory and a generation counter to manage memory generations, providing efficient memory reuse while maintaining simple allocation logic.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent implements discarding and recovering memory by scanning thread-local memory areas and reusing fragmented memory. The memory manager identifies reusable memory fragments and reallocates them to threads that need memory, improving memory reuse efficiency without increasing allocation complexity.

Inventive Principle:
Principle #34Discarding and recovering

Data Source

PatentUS10776256B2Sharing consumed off-heap for parallel data loading
Publication Date: 2020.09.15 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10776256B2 patent drawing
  • US10776256B2 patent drawing
  • US10776256B2 patent drawing

AI summary

A method is provided for sharing a global memory by a plurality of threads in a memory management system. The method includes allocating, by a controller of the system, thread-local memory areas in the global memory to a given thread and other threads, from among the plurality of threads. The method further includes gathering, by the controller, fragments of the thread-local memory areas previously allocated to the other threads, responsive to the fragments being scanned. The method also includes allocating, by the controller to the given thread, a requested memory size of the fragments of the thread-local memory areas previously allocated to the other threads, responsive to the fragments not being collectively smaller than the requested memory size. The method additionally includes allocating, by the controller to the given thread, a new memory area from the global memory, responsive to the fragments being collectively smaller than the requested memory size.