In-Memory Databases Algorithms and Data Structures on Modern Hardware. Martin Faust David Schwalb Jens Krüger Jürgen Müller

Similar documents
In-Memory Data Management for Enterprise Applications

SAP HANA - Main Memory Technology: A Challenge for Development of Business Applications. Jürgen Primsch, SAP AG July 2011

IN-MEMORY DATABASE SYSTEMS. Prof. Dr. Uta Störl Big Data Technologies: In-Memory DBMS - SoSe

Binary search tree with SIMD bandwidth optimization using SSE

Memory Hierarchy. Arquitectura de Computadoras. Centro de Investigación n y de Estudios Avanzados del IPN. adiaz@cinvestav.mx. MemoryHierarchy- 1

Benchmarking Cassandra on Violin

Big Data Technology Map-Reduce Motivation: Indexing in Search Engines

361 Computer Architecture Lecture 14: Cache Memory

Architectures for Big Data Analytics A database perspective

Performance Verbesserung von SAP BW mit SQL Server Columnstore

Actian Vector in Hadoop

SAP HANA SAP s In-Memory Database. Dr. Martin Kittel, SAP HANA Development January 16, 2013

RCFile: A Fast and Space-efficient Data Placement Structure in MapReduce-based Warehouse Systems CLOUD COMPUTING GROUP - LITAO DENG

The Quest for Speed - Memory. Cache Memory. A Solution: Memory Hierarchy. Memory Hierarchy

EFFICIENT EXTERNAL SORTING ON FLASH MEMORY EMBEDDED DEVICES

In-memory databases and innovations in Business Intelligence

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System

DKDA 2012 and the Impact of In-Memory Database Algorithms

low-level storage structures e.g. partitions underpinning the warehouse logical table structures

Improve Business Productivity and User Experience with a SanDisk Powered SQL Server 2014 In-Memory OLTP Database

In-Memory Columnar Databases HyPer. Arto Kärki University of Helsinki

Enterprise Applications

Increasing Flash Throughput for Big Data Applications (Data Management Track)

Physical Data Organization

Rethinking SIMD Vectorization for In-Memory Databases

SAP HANA PLATFORM Top Ten Questions for Choosing In-Memory Databases. Start Here

<Insert Picture Here> Best Practices for Extreme Performance with Data Warehousing on Oracle Database

Price/performance Modern Memory Hierarchy

External Sorting. Why Sort? 2-Way Sort: Requires 3 Buffers. Chapter 13

Cache Conscious Column Organization in In-Memory Column Stores

Accelerating Enterprise Applications and Reducing TCO with SanDisk ZetaScale Software

MS SQL Performance (Tuning) Best Practices:

Secondary Storage. Any modern computer system will incorporate (at least) two levels of storage: magnetic disk/optical devices/tape systems

SQL/XML-IMDBg GPU boosted In-Memory Database for ultra fast data management Harald Frick CEO QuiLogic In-Memory DB Technology

WITH A FUSION POWERED SQL SERVER 2014 IN-MEMORY OLTP DATABASE

Integrating Apache Spark with an Enterprise Data Warehouse

2009 Oracle Corporation 1

The SAP HANA Database An Architecture Overview

FPGA-based Multithreading for In-Memory Hash Joins

Preview of Oracle Database 12c In-Memory Option. Copyright 2013, Oracle and/or its affiliates. All rights reserved.

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

Query Acceleration of Oracle Database 12c In-Memory using Software on Chip Technology with Fujitsu M10 SPARC Servers

6. Storage and File Structures

Condusiv s V-locity Server Boosts Performance of SQL Server 2012 by 55%

Storing Data: Disks and Files

Safe Harbor Statement

Solid State Drive Architecture

Columnstore Indexes for Fast Data Warehouse Query Processing in SQL Server 11.0

Parquet. Columnar storage for the people

This Unit: Putting It All Together. CIS 501 Computer Architecture. Sources. What is Computer Architecture?

The Classical Architecture. Storage 1 / 36

Deliverable Billion Triple dataset hosted on the LOD2 Knowledge Store Cluster. LOD2 Creating Knowledge out of Interlinked Data

Data Warehouse: Introduction

The Big Picture. Cache Memory CSE Memory Hierarchy (1/3) Disk

White Paper. Optimizing the Performance Of MySQL Cluster

PostgreSQL Business Intelligence & Performance Simon Riggs CTO, 2ndQuadrant PostgreSQL Major Contributor

A Deduplication File System & Course Review

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

Performance Baseline of Hitachi Data Systems HUS VM All Flash Array for Oracle

RAID. RAID 0 No redundancy ( AID?) Just stripe data over multiple disks But it does improve performance. Chapter 6 Storage and Other I/O Topics 29

An Overview of SAP BW Powered by HANA. Al Weedman

Chapter 6: Physical Database Design and Performance. Database Development Process. Physical Design Process. Physical Database Design

Petabyte Scale Data at Facebook. Dhruba Borthakur, Engineer at Facebook, SIGMOD, New York, June 2013

Tiber Solutions. Understanding the Current & Future Landscape of BI and Data Storage. Jim Hadley

Performance Tuning for the Teradata Database

SQL Server 2014 New Features/In- Memory Store. Juergen Thomas Microsoft Corporation

Achieving Nanosecond Latency Between Applications with IPC Shared Memory Messaging

Chapter 1 Computer System Overview

Virtuoso and Database Scalability

Scaling Your Data to the Cloud

System Architecture. In-Memory Database

Scalable Data Analysis in R. Lee E. Edlefsen Chief Scientist UserR! 2011

Parallel Data Warehouse

1. Memory technology & Hierarchy

Oracle Database In-Memory The Next Big Thing

Performance Tuning and Optimizing SQL Databases 2016

Infrastructure Matters: POWER8 vs. Xeon x86

Computer Architecture

Protect Data... in the Cloud

Main Memory Data Warehouses

Chapter 13 File and Database Systems

Chapter 13 File and Database Systems

Maximizing VMware ESX Performance Through Defragmentation of Guest Systems. Presented by

Rackspace Cloud Databases and Container-based Virtualization

SWISSBOX REVISITING THE DATA PROCESSING SOFTWARE STACK

05. Alternative Speichermodelle. Architektur von Datenbanksystemen I

Bringing Big Data Modelling into the Hands of Domain Experts

RAMCloud and the Low- Latency Datacenter. John Ousterhout Stanford University

Architecture Sensitive Database Design: Examples from the Columbia Group

Using Synology SSD Technology to Enhance System Performance Synology Inc.

Performance Baseline of Oracle Exadata X2-2 HR HC. Part II: Server Performance. Benchware Performance Suite Release 8.4 (Build ) September 2013

Big Fast Data Hadoop acceleration with Flash. June 2013

COS 318: Operating Systems. Virtual Memory and Address Translation

Transcription:

In-Memory Databases Algorithms and Data Structures on Modern Hardware Martin Faust David Schwalb Jens Krüger Jürgen Müller

The Free Lunch Is Over 2 Number of transistors per CPU increases Clock frequency stalls http://www.gotw.ca/publications/concurrency-ddj.htm PIMDB WiSe 2011/12

Capacity vs. Speed (latency) 3 Memory hierarchy: Capacity restricted by price/performance SRAM vs. DRAM (refreshing needed every 64ms) SRAM is very fast but very expensive Memory is organized in hierarchies Fast but small memory on the top Slow but lots of memory at the bottom technology latency size CPU SRAM < 1 ns bytes L1 Cache SRAM ~ 1 ns KB L2 Cache SRAM < 10 ns MB Main Memory DRAM 100 ns GB Magnetic Disk ~ 10 000 000 ns (10 ms) TB

Data Processing 4 In DBMS, on disk as well as in memory, data processing is often: Not CPU bound But bandwidth bound I/O Bottleneck CPU could process data faster Memory Access: Not truly random (in the sense of constant latency) Data is read in blocks/cache lines Even if only parts of a block are requested Potential waste of bandwidth V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 Cache Line 1 Cache Line 2

5 Memory Hierarchy Cache Small but fast memory, which keeps data from main memory for fast access. CPU Cache performance is crucial Similar to disk cache (e.g. buffer pool) Cache But: Caches are controlled by hardware. Cache hit Data was found in the cache. Fastest data access since no lower level is involved. Cache miss Data was not found in the cache. CPU has to load data from main memory into cache (miss penalty). Main Memory

Locality is King! 6 To improve cache behavior Increase cache capacity Exploit locality Spatial: related data is close (nearby references are likely) Temporal: Re-use of data (repeat reference is likely) To improve locality Non random access (e.g. scan, index traversal): Leverage sequential access patterns Clustering data to a cache lines Partition to avoid cache line pollution (e.g. vertical decomposition) Squeeze more operations/information into a cache line Random access (hash join): Partition to fit in cache (cache-sized hash tables)

Motivation 7 Hardware has changed TB of main memory are available Cache sizes increased Multi-core CPU s are present Memory bottleneck increased Data/Workload Tables are wide and sparse Lots of set processing Traditional databases Optimized for write-intensive workloads show bad L2 cache behavior

Problem Statement 8 DBMS architecture has not changed over decades Redesign needed to handle the changes in: Hardware trends (CPU/cache/memory) Changed workload requirements Data characteristics Data amount Query engine Buffer pool Traditional DBMS Architecture

Row- or Column-oriented Storage 9 Row Store Column Store SELECT * FROM Sales Orders WHERE Document Number = 95779216 Row 1 Row 2 Doc Num Doc Date Sold- To Value Sales Status Org Row 3 Row 4 SELECT SUM(Order Value) FROM Sales Orders WHERE Document Date > 2009-01-20 Row 1 Row 2 Doc Num Doc Date Sold- To Value Sales Status Org Row 3 Row 4

Question + Answer 10 How to optimize an IMDB? Exploit sequential access, leverage locality -> Column store Reduce I/O Compression Direct value access -> Fixed-length (compression schemes) Late Materialization Parallelize

Seminar Organization

Objective of the Seminar 12 Work on advanced database topics in the context of in-memory databases (IMDB) with regards to enterprise data management Get to know characteristics of IMDBs Understand the value of IMDBs for enterprise computing Learn how to work scientifically Fully understand your topic and define the objectives of your work Propose a contribution in the area of your topic Quantitatively demonstrate the superiority of your solution Compare your work to existing related work Write down your contribution so that others can understand and reproduce your results

Seminar schedule 13 Today: Overview of topics, general introduction Tomorrow (17.4.): Q&A on topics, in depth topics 22.4.: Send your priorities for topics to lecturers (david.schwalb@hpi.uni-potsdam.de) 26.4.: Assignment of topics to students 28. & 29.5.: Mid-term Presentations 9. & 10.7.: Final Presentations 19.7.: Deadline for final documentation Throughout the seminar: individual coaching by teaching staff Meetings (Room V-1.16)

Final Presentation 14 Why a final presentation? Show your ideas and their relevance to others Explain your starting point and how you evolved your idea / implementation Present your implementation, explain your implementations properties

Final Documentation 15 10-12 pages, ACM format [1] Suggested Content: Abstract, Introduction into the topic, Related work, Implementation, Experiment/Results, Interpretation, Future Work Important! Related work needs to be cited Quantify your ideas / solutions with measurements All experiments need to be reproducible (code, input data) and the raw data to the experiment results must be provided [1] http://www.acm.org/sigs/publications/proceedings-templates

Grading 16 6 ECTS Grading: 30% Presentations (Mid-term 10% / Final 20%) 30% Results 30% written documentation 10% general participation in the seminar

Topic Assignment 17 Each participant sends list of top 3 topics in order of preference to lecturers by 22.4. Topics are assigned based on preferences and skills by 26.4.

Topics (i) Data Structures 18 1) Partitioned Bitvector for In-Memory Column-Store A bitvector that allows for multiple partitions with different value-id-widths (bits) to create a merge-free insert-only column store. For the seminar, an evaluation of the performance impact for lookups is the main topic. 2) Vertical Bitvector A modified bitvector storage layout of values on a cacheline to enable faster decompression of multiple values at once due to better utilization of SSE units. [1] 3) Unsorted Dictionaries Evaluation of a lookup-table scheme, enabling fast range queries with unsorted dictionaries. The idea is to create a cache-sized probing-bitvector by scanning matching positions on the dictionary, which can be accessed fast while scanning the column. [1] https://github.com/grundprinzip/bitcompressedvector

Topics (ii) Index Structures 19 4) Default Value Index A data structure to store very sparse columns without sacrificing OLTP performance. The idea is to only store exceptions and a bit-index to mark non-default positions. 5) Multi Column Indices Classic Multi-Column Indices use a tree-structure to index tuples. In column store this is a cumbersome solution, because values are stored as encoded integers and these are used as long as possible (late materialization), and values that would form one tuple are in different columns.

Topics (iv) Join Algorithms 20 6) Multi Column Join Algorithms When joining tables with multiple key columns, column stores need to materialize all keys or need an uncompressed tree structure (actual values not value-ids). The goal is an optimized join algorithm enabling fast joins over multiple columns. 7) Join Algorithms on shared Dictionaries Columns that store values from the same application domain could be stored with a shared dictionary and joins could be performed directly on value-ids instead of values. 8) Cache-Optimized Parallel Join Evaluation/Development of a cache-sensitive join algorithm for HYRISE.

Topics (v) User Interface 21 9) Analytical User Interface for HYRISE A graphical, drag and drop based javascript user interface to get fast information about the loaded data, its value distribution, distinct values etc, similar to Visual Intelligence. 10) Set-based Query Language A query language or graphical query tool that allows a user to define the desired result in a set-based manner, similar to QlikView. The user can define a query by defining subsets of tables etc, natural joins are performed automatically.

Topics (vi) 22 11) Branching Deltas (Simulation) For some applications, many of simulations need to be performed. Since they typically require write access, an idea would be to have separate deltas buffers for each simulation. The simulation can then be run in parallel, in order to find the best set of input parameters. 12) Result Set Compression Currently, result sets are transferred as is to the client, where it is simply read row-by-row. In scenarios where the connection between database and applications is limited (mobile, cloud), the idea of compression the result set might lead to significant performance gains. 13) Memory Compression Algorithms in Hardware (PPC) Modern PowerPC processors have hardware supported main memory compression. A first evaluation could investigate how well it compresses enterprise data, how performance is affected, and how a row store compares to a column store. 14) Rough query runtime prediction based on optimizer results During development, it is desirable to get rough estimates of how long a query will take to execute. The idea for this seminar is to use the output of the the database query optimizer to roughly estimate the execution time of given SQL queries.

Topics (vii) - Database Co-Processors 23 15) Execution model for co-processors Based on the memory bandwidth limitation of database co-processors, multiple execution models are possible. Evaluation of the following different models: Co-Process, Procedural Language Architecture, GPU hosted data. 16) Co-processor integration into databases Evaluation how a co-processor can be integrated with a database for application specific logic with SAP HANA (AFL) or HYRISE. 17) Automatic execution unit detection in a heterogeneous system In a heterogeneous system, the capabilities of database (co-)processors differ with respects to bandwidth, parallelization, clock frequency. To determine the best suited execution unit an execution model needs to be created based on device benchmarks and a programs current workflow.

Topics (viii) - Database Co-Processors 24 18) Optimized co-processor data structures Database co-processors used for application specific tasks, such as prediction algorithms or scientific calculations, require the to have a different layout than database tables. The student working on this topic will evaluate which data structures are favorable for different coprocessors and algorithms. 19) Automatic code optimization for co-processors As a heterogeneous programming framework, OpenCL enables the developer to write a single program that can be executed on many different hardware platforms. Nevertheless, the code needs to be optimized for each device to run optimal. The goal will be to optimize the code written in OpenCL C for different devices automatically based on micro benchmarks.