Garbage Collection Based on Resource Usage Metrics
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing garbage collection methods in computing systems are inefficient due to the promotion of large native objects to higher generations of the heap, leading to reduced heap space and potential application crashes, as they rely solely on managed object size for garbage collection decisions.
Innovation Solution
Implementing a system that determines whether to perform a full or ephemeral garbage collection based on both a total resource usage metric and a managed object metric, reducing the frequency of promoting managed objects out of generation 0 and maintaining more available heap space.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If garbage collection is initialized based solely on managed object size, then the garbage collection process is simple to implement, but large native objects are incorrectly promoted to higher generations reducing heap space
Solution Approach 1:
The patent changes the parameter used for garbage collection decision from solely managed object size to a ratio metric that incorporates both managed object size and total resource usage. This parameter change allows the system to identify when native objects are disproportionately large compared to managed objects, preventing incorrect promotion decisions while maintaining reasonable implementation complexity.
2Productivity
If ephemeral garbage collection is used to avoid pausing applications, then application performance is maintained, but large native objects in generation 0 consume excessive heap space
Solution Approach 1:
The patent introduces a feedback mechanism that monitors the ratio of total resource usage to managed object size. When this ratio indicates that native objects are consuming excessive space relative to managed objects, the system triggers a full garbage collection to reclaim space, while otherwise maintaining ephemeral collection to preserve application performance.
3Quantity of substance
If full garbage collection is performed frequently to reclaim heap space, then available heap space is maintained, but application performance degrades due to frequent pauses
Solution Approach 1:
The patent applies partial action by using ephemeral garbage collection for routine space management, which collects only generation 0 objects without pausing applications. Full garbage collection is reserved for situations where the ratio metric indicates genuine space pressure from native objects, avoiding unnecessary full collections that would degrade performance.
Data Source
AI summary
A method includes selectively controlling, at a computing device having a memory, initiation of a full garbage collection operation based on a total resource usage metric and a managed object metric. The managed object metric is based on objects managed by a runtime application.


