Adaptive MVCC Garbage Collection for Dead-Tuple Reclamation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database systems face challenges in managing table bloat and wrap-around failures due to the accumulation of dead tuples, which degrade performance and lead to resource starvation or catastrophic data losses, exacerbated by fixed resource allocation for garbage collection processes that do not adapt to varying customer workloads.

Innovation Solution

An adaptive garbage collection process that dynamically allocates computing resources based on real-time customer workload and transaction ID age to efficiently reclaim dead tuple space, preventing table bloat and wrap-around failures.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If fixed resource allocation is used for garbage collection, then resource utilization is simple to manage, but the system cannot adapt to varying customer workloads causing performance degradation

Engineering Contradiction:
Improveadaptability to varying workloadsVSAvoidresource allocation complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements dynamic resource allocation for garbage collection by continuously monitoring workload metrics and adjusting GC resource allocation in real-time. The system transitions from fixed to dynamic allocation, where GC threads are activated or deactivated based on current database workload conditions, enabling adaptability while maintaining manageable complexity through automated control

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system employs feedback mechanisms by monitoring workload metrics and GC performance continuously. This feedback loop allows the system to detect when GC should be activated or deactivated based on current conditions, automatically adjusting resource allocation to match varying customer workloads without manual intervention

Inventive Principle:
Principle #23Feedback

2Productivity

If aggressive garbage collection is performed, then dead tuple space is reclaimed efficiently, but database operation latency increases due to resource contention

Engineering Contradiction:
Improvegarbage collection efficiencyVSAvoiddatabase operation latency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent applies partial action by activating garbage collection only when necessary based on workload conditions and available resources. Instead of continuously running GC threads that would constantly contend for resources, the system selectively activates GC based on monitored metrics, performing GC actions partially rather than continuously, thus reducing latency while maintaining reclamation efficiency

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The system changes operational parameters dynamically by adjusting GC resource allocation based on workload conditions. When workload is high, GC resources are reduced or paused; when workload is low, GC resources are increased. This parameter adjustment allows the system to optimize between GC efficiency and operation latency based on current operational context

Inventive Principle:
Principle #35Parameter changes

3Reliability

If garbage collection resources are increased, then table bloat prevention is improved, but available resources for customer operations are reduced

Engineering Contradiction:
Improvetable bloat preventionVSAvoidavailable computing resources
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent implements dynamic resource allocation that adjusts GC resource consumption based on current workload conditions. When customer operations require more resources, GC automatically scales back; when resources are abundant, GC increases activity. This dynamic adjustment ensures reliable table bloat prevention while optimizing available resources for customer operations at any given moment

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the quantity of resources allocated to GC based on monitored workload parameters. By adjusting GC resource allocation as a variable parameter rather than a fixed value, the system can maintain adequate GC activity for bloat prevention while freeing up resources for customer operations when needed, achieving a balance between reliability and resource availability

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS12430320B2Adaptive auto garbage collector in MVCC database system
Publication Date: 2025.09.30 GOOGLE LLC
  • US12430320B2 patent drawing
  • US12430320B2 patent drawing
  • US12430320B2 patent drawing

AI summary

A method includes obtaining a query to perform an operation on a tuple of a plurality of tuples stored at a database. Each respective tuple assigned a respective transaction identifier (ID) from a set of transaction IDs. The set of transaction IDs includes a subset of unavailable transaction IDs each currently assigned to one of the tuples and a subset of available transaction IDs each currently unassigned to any tuple. The method also includes assigning one of the available transaction IDs to the tuple based on the query and determining an oldest transaction ID age from the set of transaction IDs. The method also includes determining that the oldest transaction ID age satisfies a threshold and performing a garbage collection process on the database based on determining that the oldest transaction ID age satisfies the threshold.