Adaptive Caching for Hybrid Columnar Databases

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Legacy caching mechanisms in columnar databases inefficiently manage memory by reusing it from existing pools before rebalancing from other pools, leading to suboptimal performance due to delayed utilization of underutilized memory in other pools.

Innovation Solution

Implement a dynamic rebalancing approach that uses housekeeper threads to sample statistics and determine when to reuse memory from existing pages or rebalance from other pools based on reuse rates, allowing for adaptive caching and efficient memory allocation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If legacy caching mechanisms reuse memory from existing pages of a pool before rebalancing from other pools, then memory is managed in a simple sequential manner, but cache efficiency deteriorates due to delayed utilization of underutilized memory

Engineering Contradiction:
Improvecache efficiencyVSAvoidtime to utilize underutilized memory
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent implements dynamic rebalancing that adapts memory management strategies based on real-time pool utilization statistics. Housekeeper threads continuously monitor reuse rates and dynamically adjust whether to reuse memory from existing pages or rebalance from other pools, making the system responsive to changing conditions rather than following a fixed sequential approach

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system employs feedback mechanisms where housekeeper threads sample statistics about pool utilization and reuse rates, then use this information to guide memory management decisions. The rebalancing logic is informed by observed usage patterns, allowing the system to learn from past behavior and optimize future memory allocation decisions

Inventive Principle:
Principle #23Feedback

2Adaptability or versatility

If housekeeper threads sample statistics and dynamically determine when to rebalance memory, then memory allocation becomes adaptive and efficient, but system complexity increases due to additional monitoring and decision-making mechanisms

Engineering Contradiction:
Improvememory allocation adaptabilityVSAvoidmemory management system complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The housekeeper threads operate autonomously to monitor pool statistics and trigger rebalancing operations when needed. The system essentially manages itself by having dedicated threads that continuously assess conditions and execute appropriate actions without requiring external intervention or complex centralized control

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The memory management system is divided into separate pools that can be independently monitored and managed. Housekeeper threads can focus on specific pools and make localized rebalancing decisions, which simplifies the overall control logic compared to managing all memory as a single monolithic structure

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12153816B2Adaptive caching for hybrid columnar databases with heterogeneous page sizes
Publication Date: 2024.11.26 SAP SE
  • US12153816B2 patent drawing
  • US12153816B2 patent drawing
  • US12153816B2 patent drawing

AI summary

Disclosed herein are system, method, and computer program product embodiments for adaptive caching for hybrid columnar databases with heterogeneous page sizes. An embodiment operates by scanning one or more pools comprising one or more pages of the same size in a buffer cache. The embodiment determines an increment of a reuse rate for the pools in the buffer cache within a time interval. The embodiment determines a cumulative reuse rate that is the sum of the increments of the reuse rate over several time intervals. The embodiment determines a gliding average reuse rate of the cumulative reuse rate over several time intervals. The embodiment compares the average reuse rates of the plurality of the pools to a threshold to dynamically determine whether a pool should reuse memory from the existing pages of the same pool or rebalance memory from one or more victim pools.