Cache Partitioning for Concurrent In-Memory Database Workloads
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Modern in-memory database management systems face performance degradation due to cache pollution from concurrent queries, leading to inefficiencies and increased costs in addressing this issue, as cache-sensitive operations are affected by cache-insensitive operations sharing the same last-level cache.
Innovation Solution
Implementing enhanced cache partitioning techniques that allow dynamic control over the last-level cache, enabling specific cores or threads to evict cache lines only from designated portions, thereby isolating cache-sensitive operations and preventing pollution, and associating threads with cache allocation bitmasks based on their cache usage to optimize resource allocation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multiple cores share the same last-level cache to enable concurrent query execution, then system throughput is improved, but cache-sensitive operations suffer from cache pollution and performance degradation
Solution Approach 1:
The last-level cache is divided into multiple partitions, with each partition assigned to specific cores. This segmentation prevents cache pollution by isolating the cache resources used by different cores, allowing cache-sensitive operations on one core to not interfere with cache-sensitive operations on other cores, thereby maintaining high throughput while protecting cache-sensitive performance
2Reliability
If cache partitioning is implemented to prevent cache pollution, then cache-sensitive operation performance is improved, but cache utilization efficiency may deteriorate
Solution Approach 1:
The cache partition assignment is made dynamic rather than static. The system can adaptively adjust which cores access which cache partitions based on workload characteristics, allowing cache resources to be optimally utilized for different types of operations at different times, thus maintaining both cache-sensitive performance and overall cache utilization efficiency
Data Source
Figure 1
Figure 2
Figure 3A~3C
AI summary
Disclosed herein are system, method, and computer program product embodiments for cache partitioning to accelerate concurrent workload performance of in-memory databases. An embodiment operates by storing a first bitmask (120), associating the first bitmask with a first processor core (110), setting a subset of the bits of the first bitmask, wherein the subset of the bits of the first bitmask represents a first portion of shared last-level cache (150), and wherein any part of the first bitmask excluding the subset of the bits of the first bitmask represents a second portion of the lowest-level cache, and disallowing eviction of any cache line in the second portion of the lowest-level cache by the first processor core.