Thread-Local Memory Fragment Reuse for Parallel Data Loading
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Productivity
If off-heap memory is used, then performance is improved, but device complexity increases due to complex heap management requirements
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.
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.
3Quantity of substance
If thread-local memory areas are allocated in global memory, then memory reuse efficiency is improved, but allocation complexity increases
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.
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.
Data Source
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.


