Spool Cache Management via Residency Time Metrics

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Contemporary database systems are unable to directly involve the Query Optimizer in runtime spool cache management, leading to inefficient use of precious cache memory, as they lack the capability to effectively manage spool space usage based on data block residency times and sizes.

Innovation Solution

A system and method that estimate the residency time of data blocks and calculate a residency/size metric to determine whether to store or flush data blocks from cache memory, allowing for efficient cache utilization by prioritizing smaller data blocks with shorter residency times over larger ones with longer residency times.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If cache memory is used to store data blocks, then system performance is improved by reducing disk I/O, but cache memory is a precious resource that is expensive per byte and should be used efficiently

Engineering Contradiction:
Improvesystem performanceVSAvoidcache memory usage
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent changes the parameters of cache management by estimating residency time for each data block and calculating a metric that combines residency time and data block size. This allows the system to dynamically determine which data blocks to store in cache based on their expected utility and size, optimizing the trade-off between performance improvement and cache resource consumption.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent applies local quality by treating different data blocks differently based on their individual characteristics (residency time and size). Instead of a uniform cache allocation strategy, the system evaluates each data block separately and makes cache admission decisions based on local metrics, ensuring that cache space is allocated to the most valuable data blocks.

Inventive Principle:
Principle #3Local quality

2Loss of energy

If larger data blocks with longer residency times are stored in cache, then disk I/O is reduced, but cache memory is consumed by larger blocks that could potentially store more smaller blocks with shorter residency times

Engineering Contradiction:
Improvedisk I/O operationsVSAvoidcache memory consumption
Core Design Contradiction:
Loss of energyVSQuantity of substance

Solution Approach 1:

The patent introduces a metric that combines residency time and data block size parameters to evaluate cache admission decisions. By changing from a simple size-based or residency-based decision to a combined metric, the system can identify data blocks that offer the best balance between reducing disk I/O and consuming cache space.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent applies partial action by not always storing data blocks in cache even when they meet certain criteria. Instead, the system uses the calculated metric to make selective decisions, storing only those data blocks that provide the most benefit relative to cache consumption, thereby avoiding excessive cache usage while still reducing disk I/O operations.

Inventive Principle:
Principle #16Partial or excessive action

3Productivity

If the Query Optimizer is involved in runtime spool cache management, then cache utilization is optimized, but the complexity of the system increases

Engineering Contradiction:
Improvecache utilization efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent applies universality by making the Query Optimizer multi-functional. The Query Optimizer not only generates execution plans but also participates in runtime cache management decisions. This allows the existing Query Optimizer component to serve multiple purposes, improving cache utilization without adding entirely new system components.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent applies self-service by enabling the Query Optimizer to use its own knowledge and metrics for cache management decisions. The system leverages the Query Optimizer's existing understanding of query characteristics and data access patterns to make cache admission decisions, allowing the system to optimize itself without external intervention or additional complex control mechanisms.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9489310B2System, method and computer-readable medium for spool cache management
Publication Date: 2016.11.08 TERADATA US INC
  • US9489310B2 patent drawing
  • US9489310B2 patent drawing
  • US9489310B2 patent drawing

AI summary

A system, method, and computer-readable medium that facilitate efficient use of cache memory in a massively parallel processing system are provided. A residency time of a data block to be stored in cache memory or a disk drive is estimated. A metric is calculated for the data block as a function of the residency time. The metric may further be calculated as a function of the data block size. One or more data blocks stored in cache memory are evaluated by comparing a respective metric of the one or more data blocks with the metric of the data block to be stored. A determination is then made to either store the data block on the disk drive or flush the one or more data blocks from the cache memory and store the data block in the cache memory. In this manner, the cache memory may be more efficiently utilized by storing smaller data blocks with lesser residency times by flushing larger data blocks with significant residency times from the cache memory. The disclosed cache management mechanisms are effective for many workloads and are adaptable to various database usage scenarios without requiring detailed studies of the particular data demographics and workload.