Native-Image In-Memory Cache Bypassing OS Page Cache
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In containerized environments, serialized heaps require unnecessary input/output operations to memory map, leading to inefficient use of resources and compute power, especially when multiple containers do not share the same memory layout, resulting in subpar processing performance and wasted resources.
Innovation Solution
Bypassing the operating system page cache, native-image applications access an in-memory cache shared through inter-process-communication, minimizing input/output and eliminating the need for memory mapping, thus saving system resources and compute power without relying on exact memory layout matches.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If serialized heaps are memory mapped in containerized environments, then data sharing between processes is enabled, but unnecessary input/output operations occur and system resources are wasted
Solution Approach 1:
The patent extracts the AOT compiled application image from the serialized heap file and loads it directly into memory as an in-memory cache, bypassing the file system and eliminating unnecessary I/O operations associated with memory mapping serialized heaps
Solution Approach 2:
The application image is pre-compiled into a serialized heap file format, then pre-loaded into memory as an in-memory cache before execution, so that the runtime system can directly access the compiled code without performing I/O operations during container startup
2Ease of operation
If operating system page cache is used for AOT applications, then memory management is simplified, but input/output operations increase and processing performance decreases
Solution Approach 1:
The patent introduces an in-memory cache as an intermediary layer between the AOT compiled application image and the operating system page cache. This cache holds the application image in memory, allowing direct access without requiring I/O operations through the OS page cache, thus improving processing performance while maintaining simple memory management
3Adaptability or versatility
If memory mapping is performed for serialized heaps, then data can be shared across processes, but compute power is wasted on unnecessary operations
Solution Approach 1:
The patent merges the application image loading process with the in-memory cache population process. The AOT compiled application image is loaded directly into the in-memory cache from the serialized heap file, combining data loading and caching operations into a single efficient process that enables inter-process communication without separate memory mapping operations
Data Source
AI summary
A method includes identifying an ahead-of-time (AOT) native-image application to be compiled and during AOT compilation of the AOT native-image application; bypassing an operating system page cache corresponding to the AOT native-image application; and accessing, by a processing device, the native-image application from an in-memory cache shared using inter-process-communication.


