The HV-tree: a Memory Hierarchy Aware Version Index Rui Zhang University of Melbourne Martin Stradling University of Melbourne.

Slides:



Advertisements
Similar presentations
Databasteknik Databaser och bioinformatik Data structures and Indexing (II) Fang Wei-Kleiner.
Advertisements

Improving Transaction-Time DBMS Performance and Functionality David Lomet Microsoft Research Feifei Li Florida State University.
Tuning: overview Rewrite SQL (Leccotech)Leccotech Create Index Redefine Main memory structures (SGA in Oracle) Change the Block Size Materialized Views,
External Sorting The slides for this text are organized into chapters. This lecture covers Chapter 11. Chapter 1: Introduction to Database Systems Chapter.
Introduction to Indexes Rui Zhang The University of Melbourne Aug 2006.
CpSc 3220 File and Database Processing Lecture 17 Indexed Files.
1 Parallel Scientific Computing: Algorithms and Tools Lecture #2 APMA 2821A, Spring 2008 Instructors: George Em Karniadakis Leopold Grinberg.
© Copyright 2012 STI INNSBRUCK Apache Lucene Ioan Toma based on slides from Aaron Bannert
External Memory Hashing. Model of Computation Data stored on disk(s) Minimum transfer unit: a page = b bytes or B records (or block) N records -> N/B.
©Silberschatz, Korth and Sudarshan12.1Database System Concepts Chapter 12: Part C Part A:  Index Definition in SQL  Ordered Indices  Index Sequential.
1 Hash-Based Indexes Module 4, Lecture 3. 2 Introduction As for any index, 3 alternatives for data entries k* : – Data record with key value k – –Choice.
Hash-Based Indexes The slides for this text are organized into chapters. This lecture covers Chapter 10. Chapter 1: Introduction to Database Systems Chapter.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Hash-Based Indexes Chapter 11.
Quick Review of Apr 10 material B+-Tree File Organization –similar to B+-tree index –leaf nodes store records, not pointers to records stored in an original.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Hash-Based Indexes Chapter 11.
Chapter 11 (3 rd Edition) Hash-Based Indexes Xuemin COMP9315: Database Systems Implementation.
Tutorial 8 CSI 2132 Database I. Exercise 1 Both disks and main memory support direct access to any desired location (page). On average, main memory accesses.
2P13 Week 11. A+ Guide to Managing and Maintaining your PC, 6e2 RAID Controllers Redundant Array of Independent (or Inexpensive) Disks Level 0 -- Striped.
1 Hash-Based Indexes Yanlei Diao UMass Amherst Feb 22, 2006 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
Index Sen Zhang. INDEX When a table contains a lot of records, it can take a long time for the search engine of oracle (or other RDBMS) to look through.
Data Indexing Herbert A. Evans. Purposes of Data Indexing What is Data Indexing? Why is it important?
Last Time –Main memory indexing (T trees) and a real system. –Optimize for CPU, space, and logging. But things have changed drastically! Hardware trend:
METU Department of Computer Eng Ceng 302 Introduction to DBMS Disk Storage, Basic File Structures, and Hashing by Pinar Senkul resources: mostly froom.
1 Hash-Based Indexes Chapter Introduction : Hash-based Indexes  Best for equality selections.  Cannot support range searches.  Static and dynamic.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 13 Disk Storage, Basic File Structures, and Hashing.
B + -Trees (Part 1) COMP171. Slide 2 Main and secondary memories  Secondary storage device is much, much slower than the main RAM  Pages and blocks.
1 CS222: Principles of Database Management Fall 2010 Professor Chen Li Department of Computer Science University of California, Irvine Notes 01.
1 Database Tuning Rasmus Pagh and S. Srinivasa Rao IT University of Copenhagen Spring 2007 February 8, 2007 Tree Indexes Lecture based on [RG, Chapter.
1 Overview of Storage and Indexing Chapter 8 1. Basics about file management 2. Introduction to indexing 3. First glimpse at indices and workloads.
Introduction to Database Systems 1 The Storage Hierarchy and Magnetic Disks Storage Technology: Topic 1.
Making B+-Trees Cache Conscious in Main Memory
Indexing structures for files D ƯƠ NG ANH KHOA-QLU13082.
Indexing. Goals: Store large files Support multiple search keys Support efficient insert, delete, and range queries.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 17 Disk Storage, Basic File Structures, and Hashing.
1 IT420: Database Management and Organization Storage and Indexing 14 April 2006 Adina Crăiniceanu
Optimized Transaction Time Versioning Inside a Database Engine Intern: Feifei Li, Boston University Mentor: David Lomet, MSR.
1 Chapter 17 Disk Storage, Basic File Structures, and Hashing Chapter 18 Index Structures for Files.
Overview of Physical Storage Media
CSE332: Data Abstractions Lecture 8: Memory Hierarchy Tyler Robison Summer
Parallel dynamic batch loading in the M-tree Jakub Lokoč Department of Software Engineering Charles University in Prague, FMP.
Indexing and hashing Azita Keshmiri CS 157B. Basic concept An index for a file in a database system works the same way as the index in text book. For.
Storage Structures. Memory Hierarchies Primary Storage –Registers –Cache memory –RAM Secondary Storage –Magnetic disks –Magnetic tape –CDROM (read-only.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Hash-Based Indexes Chapter 11 Modified by Donghui Zhang Jan 30, 2006.
Introduction to Database, Fall 2004/Melikyan1 Hash-Based Indexes Chapter 10.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Indexed Sequential Access Method.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Hash-Based Indexes Chapter 10.
Marwan Al-Namari Hassan Al-Mathami. Indexing What is Indexing? Indexing is a mechanisms. Why we need to use Indexing? We used indexing to speed up access.
Chapter 5 Index and Clustering
B+ Trees: An IO-Aware Index Structure Lecture 13.
Internal and External Sorting External Searching
What is it and why do we need it? Chris Ward CS147 10/16/2008.
Chapter 5 Record Storage and Primary File Organizations
1 Ullman et al. : Database System Principles Notes 4: Indexing.
Database Applications (15-415) DBMS Internals- Part III Lecture 13, March 06, 2016 Mohammad Hammoud.
Data Indexing Herbert A. Evans.
CPS216: Data-intensive Computing Systems
Record Storage, File Organization, and Indexes
CS 540 Database Management Systems
Indexing Goals: Store large files Support multiple search keys
File System Structure How do I organize a disk into a file system?
COMP 430 Intro. to Database Systems
Hash-Based Indexes Chapter 11
Database Applications (15-415) DBMS Internals- Part III Lecture 15, March 11, 2018 Mohammad Hammoud.
Lecture 12 Lecture 12: Indexing.
External Memory Hashing
KISS-Tree: Smart Latch-Free In-Memory Indexing on Modern Architectures
Hash-Based Indexes Chapter 10
File Storage and Indexing
Chapter 11 Instructor: Xin Zhang
Presentation transcript:

The HV-tree: a Memory Hierarchy Aware Version Index Rui Zhang University of Melbourne Martin Stradling University of Melbourne

What is Versioned data Data describing objects that has some attributes that change over time we want to keep track of ALL the changes (implicitly) has an attribute that never changes: identifier E.g. Bank account: account number, balance Stock: stock number, price Wikipedia entry: name, contents Sales record: item id, sales of a certain day Star positions: star name, location Every changed value is called a “version” and has a “version number” “Versioned data” also called “temporal data”, and “version number” becomes “timestamp”

What to do on Versioned Data Point query (query with single key and single time) What was the position of star #1234 on 1 Jan 2010? (Key-slice) Time-range query Show the trajectory of star #1234 between 1 Jan 2010 and today. (Time-slice) Key-range query Show the positions of all the stars on 1 Jan 2010 Time-range key-range query (relatively rare) Show the trajectories of the stars #1000~2000 between 1 Jan 2010 and today

Why do we Care about it Now Very large versioned databases Sales record: Wal-Mart’s data warehouse was 70 TB in 2001 Star positions: The Sloan Digital Sky Survey project receives 70 gigabytes of images every night Existing version indexes do not scale well Improvement on Hardware CPU/cache speed doubles every two years Memory size increases at a similar rate Existing version indexes do not take advantage of main memory techniques

Outline Existing Work Version indexes, especially TSB-tree Main memory techniques Design for multiple levels of memory hierarchy Principles Straightforward approaches HV-tree Experimental results

Existing Version Indexes Ones that move new data to new nodes Write-once B-tree Multi-version B-tree One that moves old data to new nodes Time Split B-tree (TSB-tree) Unique feature of progressively migrate old data to a new medium – a larger medium like hard disk or tape Leaving current data on high-speed medium like the main memory

Time Split B-tree (TSB-tree) 4,0,Dan1,1,Alan7,2,Ed1,3,Ben key, time, data Time split at time 4

4,0,Dan1,1,Alan7,2,Ed1,3,Ben Time Split B-tree (TSB-tree) 1,4,Tim4,4,Dan7,4,Ed key, time, data 0,00,4 key, time, ptr Time split at time 4

4,0,Dan1,1,Alan7,2,Ed1,3,Ben Time Split B-tree (TSB-tree) 1,4,Tim4,4,Dan7,4,Ed key, time, data 0,00,44,4 key, time, ptr Time split or key split depends on the portion of current entries in the node β: key split if β is greater than a threshold T Search: follow key-time range Key split at value 4

Main Memory Indexing Techniques Key techniques Aligning node size with block size CSS-tree, CSB+-tree: use the cache block size (typically 32B or 64B) as tree node size Later study shows that the actual optimal node size for the CSB+-tree is much larger than the cache block size We assume the optimal node size S cache is known Pointer elimination Hard to apply to a complicated structure like TSB-tree

Design for Multiple Levels of Memory Hierarchy Facts: big latency difference between adjacent levels of memories in the hierarchy, usually 1000 times. Principles Tailor the index’s structure to suits the characteristics of each level of the memory hierarchy. Keep as much as possible frequently accessed data in higher levels of the memory hierarchy.

Straightforward Adaptions of TSB-tree TSB-small use S cache as the node size let the operation system deal with caching and paging Worse than TSB-tree because of bad paging behavior TSB-cond use S cache as the node size initially expand/condense to node of size S disk as historical pages are created and moved to disk Worse than TSB-tree because of overhead caused by condensation

The HV-tree: memory Hierarchy aware Version tree Node size adjustable to the level of the memory the node resides in (Principle 1) Key: Gradual change of size Delayed data migration (Principle 2)

The HV-tree Structure Allowable node sizes S cache, 2S cache, …, S disk (S disk is a power of 2 times S cache ) E.g. S cache =1K, S cache =4K, so allowable node sizes are: 1K, 2K, 4K. Some additional pointers maintained for data migration

The HV-tree Insertion Start with the smallest allowable node size When node is full key split time split or node expansion Choice of T S cache /S disk

HV-tree Data Migration Upon creation of a historical node Do not move to disk immediately Added to a Migration Chain Migrate when out of memory

Experimental Setup Generated datasets with updates, search and mixed workloads Sizes: 500MB, 1000MB Queries follow Zipfian distribution, with varying skewness Hardware: 3GHz CPU, 1GB memory, 80GB disk L1 cache:, L2 cache: S cache =1K, S cache =4K

Results: Updates and Point Queries

Results: Key-Range Queries, Time-Range Queries Key-range queries Time-range queries

Experiments Finding S cache Validation of T

Conclusions and Future Work First index design optimizing performance for multiple levels of memory hierarchy, achieving a highly scalable and efficient version index. Key techniques Difference node sizes Gradual change of node sizes Data migration chain Performance Several times faster for updates and point queries 1000 times faster for key/time range queries Future work Other data structures Multi-core machine