Hopkins Storage Systems Lab, Department of Computer Science A Workload-Driven Unit of Cache Replacement for Mid-Tier Database Caching Xiaodan Wang, Tanu Malik, Randal Burns Johns Hopkins University Stratos Papadomanolakis, Anastassia Ailamaki Carnegie Mellon University
25
Embed
A Workload-Driven Unit of Cache Replacement for Mid-Tier Database Caching
A Workload-Driven Unit of Cache Replacement for Mid-Tier Database Caching. Xiaodan Wang, Tanu Malik, Randal Burns Johns Hopkins University Stratos Papadomanolakis, Anastassia Ailamaki Carnegie Mellon University. Overview. Motivation Data intensive scientific database federations - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Hopkins Storage Systems Lab, Department of Computer Science
A Workload-Driven Unit of Cache Replacement for Mid-Tier Database Caching
Xiaodan Wang, Tanu Malik, Randal Burns
Johns Hopkins UniversityStratos Papadomanolakis,
Anastassia AilamakiCarnegie Mellon University
Hopkins Storage Systems Lab, Department of Computer Science
Overview
Motivation– Data intensive scientific database federations– Mid-tier caching improves scalability
Choosing the unit of cache replacement– Minimize aggregate network traffic– Improve query execution performance
Query prototypes– Cache groups of columns– Adapts to changes in the workload
Hopkins Storage Systems Lab, Department of Computer Science
OpenSkyQuery
Federation of sky surveys (a virtual telescope)– Expected to grow from 30 sites to over 100
Available over the Internet (community of astronomers, educational users)
Sites are autonomous, heterogeneous, and geographically distributed
Data intensive workload (large data sets, network-bound)
Hopkins Storage Systems Lab, Department of Computer Science
Caching Schema
Difficult to achieve good query performance– Caches employ commodity hardware– An index-free environment
Both network and query performance are sensitive to granularity of cache replacement
Fine granularity (column)– Poor network performance at small cache sizes– High I/O overhead
Coarse granularity (table)– Groups unrelated columns– Inefficient query and network performance
Hopkins Storage Systems Lab, Department of Computer Science
Contributions
Cache workload-defined groups of columns (query prototypes)
Adaptive – candidate query prototypes are discovered incrementally from the request stream
Self-organizing – each prototype describes a physical schema optimized for a specific class of queries
Improve in-cache query execution performance without sacrificing network savings
Hopkins Storage Systems Lab, Department of Computer Science
Caching for Network Savings
Identify and cache database objects that provide network savings
– Requests that access these objects are serviced from the cache
– Reduces contention for network bandwidth
Bypass Yield Caching (Malik et al., ICDE’05) – Caching framework that uses economic principles to
maximize network savings– Database objects are ranked by yield (expected network
savings per unit of cache space utilized)
Hopkins Storage Systems Lab, Department of Computer Science
Choosing the Unit of Cache Replacement
Semantic caching is unsuitable for Astronomy– Lack locality (objects are rarely reused)– Evaluating query containment is difficult (nested
queries, complex joins, and user-defined functions are common)
Employ schema-based caching– Queries reuse the same set of columns– Derive popular columns from the workload– Analogous materialized views
Hopkins Storage Systems Lab, Department of Computer Science
File-Bundling (Otoo et al., SC’04)
Loading only columns with high yield at small cache sizes
A B C D E F G H I J
Q1 Q2 Q3 Q4
BC
Cache
HI
Caching columns B, C, H, and I results in no cache hits Solution: cache groups of columns
Hopkins Storage Systems Lab, Department of Computer Science
Caching Groups of Columns
Existing schema-based caching models are static (e.g. CacheTables, MTCache, TimesTen)
– Do not account for dynamic workload access patterns– Physical schema of backend database or defined a priori– May group columns that are rarely used together
Query prototypes caching– Identifies the best groupings from the workload – Minimizes query execution cost against prototypes without
sacrificing network savings
Hopkins Storage Systems Lab, Department of Computer Science
Query Prototype
Given a query qi, define the Query Access Set, QAS(qi), as the set of attributes accessed by qi
qi and qj share the same query prototype if they access the same attributes (QAS(qi) = QAS(qj))
Example:
SELECT objID
FROM Galaxy, SpecObj
WHERE objID = bestobjID and specclass = 2 and z between 0.121 and 0.127
QAS = {Galaxy:objID, SpecObj:bestobjID,
SpecObj:specclass, SpecObj:z}
Hopkins Storage Systems Lab, Department of Computer Science