Benchmarking Hybrid OLTP&OLAP Database · PDF fileI Nothink-time Benchmark Design: OLAP...

download Benchmarking Hybrid OLTP&OLAP Database  · PDF fileI Nothink-time Benchmark Design: OLAP Workload AND s_nationkey = n_nationkey AND n_regionkey = r_regionkey

If you can't read please download the document

Transcript of Benchmarking Hybrid OLTP&OLAP Database · PDF fileI Nothink-time Benchmark Design: OLAP...

  • Benchmarking Hybrid OLTP&OLAP DatabaseSystems

    Florian Funke Alfons Kemper Thomas Neumann

    TU Mnchen

  • The Real-Time Business Intelligence Challenge

    ++OLAP

    --OLTP

    Dedicated OLAP-EnginesMonetDB, Vertica,SAP T-REX (BWA),IBM ISAO (BLINK)

    ++OLTP

    --OLAP

    Dedicated OLTP-EnginesVoltDB, SAP P*Time,TimesTen, SolidDB,

    many Start-ups

    I OLTP and OLAP: very different workloadsI Separate systems Extract-Transform-Load process required

    I CostlyI Stale data in OLAP system

    I Unsuitable for real-time Business Intelligence Hybrid DBMSI Various approaches to reconcile OLAP and OLTP

    I Update stagingI VersioningI . . .

    Benchmark for hybrid DBMS

  • The Real-Time Business Intelligence Challenge

    Hybrid OLTP&OLAPIn-Memory DB-Systems

    SAP NewDB, SanssouciDB, HyPer++OLAP

    --OLTP

    Dedicated OLAP-EnginesMonetDB, Vertica,SAP T-REX (BWA),IBM ISAO (BLINK)

    ++OLTP

    --OLAP

    Dedicated OLTP-EnginesVoltDB, SAP P*Time,TimesTen, SolidDB,

    many Start-ups

    I OLTP and OLAP: very different workloadsI Separate systems Extract-Transform-Load process required

    I CostlyI Stale data in OLAP system

    I Unsuitable for real-time Business Intelligence Hybrid DBMSI Various approaches to reconcile OLAP and OLTP

    I Update stagingI VersioningI . . .

    Benchmark for hybrid DBMS

  • Related Work

    I OLTPI TPC-C & TPC-E

    I OLAPI TPC-H & TPC-DS

    I Composite Benchmark for Online Transaction Processing by HPII Focus: Comparing DBMS for specific use case

    CH-BenCHmark

  • Benchmark Design

    I Primary design goal: Comparability of DBMSI Merge of TPC benchmarks

    I Schema: TPC-C + 3 relations of TPC-HI OLTP workload: TPC-C transactionsI OLAP workload: Adapted TPC-H queries

  • Benchmark Design: Schema

    Warehouse

    W

    Stock

    W 100k

    District

    W 10

    Item

    100k

    Customer

    W 30k

    Order

    W 30k+

    Supplier

    10k

    Orderline

    W 300k+

    Nation

    62

    Neworder

    W 9k+

    Region

    5

    History

    W 30k+

    Computed relationships:I Stock SupplierI Customer Nation

  • Benchmark Design: Schema

    Warehouse

    W

    Stock

    W 100k

    District

    W 10

    Item

    100k

    Customer

    W 30k

    Order

    W 30k+

    Supplier

    10k

    Orderline

    W 300k+

    Nation

    62

    Neworder

    W 9k+

    Region

    5History

    W 30k+

    Computed relationships:I Stock SupplierI Customer Nation

  • Benchmark Design: Schema

    Warehouse

    W

    Stock

    W 100k

    District

    W 10

    Item

    100k

    Customer

    W 30k

    Order

    W 30k+

    Supplier

    10k

    Orderline

    W 300k+

    Nation

    62

    Neworder

    W 9k+

    Region

    5History

    W 30k+

    Computed relationships:I Stock SupplierI Customer Nation

  • Benchmark Design: OLTP Workload

    I 5 TPC-C transactions:I New-Order (44%)I Payment (44%)I Order-Status (4%)I Delivery (4%)I Stock-Level (4%)

    I Distribution & semantics: TPC-CI Differences to TPC-C

    I No simulated terminalsI No think-time

    Sto

    ckLe

    vel

    4%

    OrderStatus4% De

    livery

    (batch

    10Or

    ders)

    4%

    Paym

    ent

    44%

    NewOrder(10 OrderLines)

    44%

  • Benchmark Design: OLAP Workload

    Q2

    Q1

    Q3

    ...Q20

    Q21

    Q22

    Q(1)

    ......

    Q(2)

    Q(3)

    ... ...

    Q(20)

    Q(21)

    Q(22)

    I 22 TPC-H queries, adapted to schema, but with originalI Business semanticsI Syntactical structure

    I Query 5 TPC-HSELECT n_name , SUM(l_extendedprice * (1 - l_discount)) AS revenueFROM customer , orders , lineitem , supplier , nation , regionWHERE c_custkey = o_custkey AND l_orderkey = o_orderkey

    AND l_suppkey = s_suppkey AND c_nationkey = s_nationkeyAND s_nationkey = n_nationkey AND n_regionkey = r_regionkeyAND r_name = [REGION] AND o_orderdate >= DATE [DATE]AND o_orderdate < DATE [DATE] + INTERVAL 1 YEAR

    GROUP BY n_name ORDER BY revenue DESC

    I Query 5 CH-BenCHmarkSELECT n_name , SUM(ol_amount) AS revenueFROM customer , "order", orderline , stock , supplier , nation , regionWHERE c_id=o_c_id AND c_w_id=o_w_id AND c_d_id=o_d_id

    AND ol_o_id=o_id AND ol_w_id=o_w_id AND ol_d_id=o_d_idAND ol_w_id=s_w_id AND ol_i_id=s_i_idAND mod(( s_w_id * s_i_id) ,10000)=su_suppkeyAND ascii(SUBSTRING(c_state , 1, 1))=su_nationkeyAND su_nationkey=n_nationkey AND n_regionkey=r_regionkeyAND r_name=[REGION] AND o_entry_d >=[DATE]

    GROUP BY n_name ORDER BY revenue DESC

  • Benchmark Parameters

    StockLevel

    4%

    OrderStatus4% De

    livery

    (batch10Orders)

    4%

    Paym

    ent

    44%

    OLAP Workload(n 1 parallel Query Streams)

    OLTP Workload

    NewOrder(10 OrderLines)

    44%Q2

    Q1

    Q3

    ...Q20

    Q21

    Q22

    Q(1)

    ......

    Q(2)

    Q(3)

    ... ...

    Q(20)

    Q(21)

    Q(22)

    I Size: Number of warehousesI OLTP sessions: Random TPC-C transactionsI OLAP sessions: 22 TPC-H queriesI Isolation levelI Data freshness

  • The contestants

    I System X: Universal database systemI Popular, commercial DBI Disk-based

    I MonetDB: OLAP-focusedI In-memory column storeI 10-year Best Paper Award

    (VLDB 2009)I VoltDB: OLTP-focused

    I H-Store (Stonebraker) successorI In-memoryI Private partitions with

    serial executionI Java stored procedures

    I HyPer: Hybrid OLTP & OLAP OLA

    P Pe

    rform

    ance

    OLTP Performance

    +-

    +-

    CHBenCHmark

    DB2,Oracle 11g,SQL Server

    VoltDB, TimesTen

    MonetDB,VectorWise,

    T-REX (BWA),ISAO (BLINK)

    HyPer,SAP NewDB

    (SanssouciDB)

    TPC-CTP

    C-H

  • The contestants: HyPerI Main-memory hybrid OLTP&OLAP database system

    I Kemper&Neumann @ ICDE 2011I Hardware-/OS-based snapshots to reconcile OLTP & OLAP

    I Ultra-efficient shadow paging (cf. Lorie 77)I No synchronization necessary between OLAP & OLTP

    c

    OLTP Requests /Tx

    Virtual Memory

    abdc

    OLAP Queries

    dc

    *

  • The contestants: HyPer

    Page

    Tabl

    eOLTP Process

    Pages

    Transactions

  • The contestants: HyPer

    Page

    Tabl

    e

    Page

    Tabl

    e

    OLTP Process OLAP Process

    Pages

    Transactions Queries

    fork

  • The contestants: HyPer

    Page

    Tabl

    e

    Page

    Tabl

    e

    OLTP Process OLAP Process

    Pages

    Transactions Queries

    AttemptedModification

  • The contestants: HyPer

    Page

    Tabl

    e

    Page

    Tabl

    e

    OLTP Process OLAP Process

    Pages

    Transactions Queries

    Copy on Write: 2s

  • The contestants: HyPer

    Multiple Snapshots

    Page

    Tabl

    e

    Page

    Tabl

    e

    OLTP Process OLAP Process A

    Pages

  • The contestants: HyPer

    Multiple Snapshots

    Page

    Tabl

    e

    Page

    Tabl

    e

    OLTP Process OLAP Process A

    Pages

  • The contestants: HyPer

    Multiple Snapshots

    Page

    Tabl

    e

    Page

    Tabl

    e

    OLTP Process OLAP Process A

    Pages

    Page

    Tabl

    e

    OLAP Process B

  • The contestants: HyPer

    Multiple Snapshots

    Page

    Tabl

    e

    Page

    Tabl

    e

    OLTP Process OLAP Process A

    Pages

    Page

    Tabl

    e

    OLAP Process B

  • The contestants: HyPer

    Multiple Snapshots

    Page

    Tabl

    e

    Page

    Tabl

    e

    OLTP Process OLAP Process A

    Pages

    Page

    Tabl

    e

    OLAP Process B

  • The contestants: HyPer

    Multiple Snapshots

    Page

    Tabl

    e

    Page

    Tabl

    e

    OLTP Process OLAP Process A

    Pages

    Page

    Tabl

    e

    OLAP Process B

    Page

    Tabl

    e

    OLAP Process C

  • The contestants: HyPer

    Multiple Snapshots

    Page

    Tabl

    e

    Page

    Tabl

    e

    OLTP Process OLAP Process A

    Pages

    Page

    Tabl

    e

    OLAP Process B

    Page

    Tabl

    e

    OLAP Process C

  • The contestants: HyPer

    Multiple Snapshots

    Page

    Tabl

    e

    Page

    Tabl

    e

    OLTP Process OLAP Process A

    Pages

    Page

    Tabl

    e

    OLAP Process B

    Page

    Tabl

    e

    OLAP Process C

    Terminate B

  • The contestants: HyPer

    Multiple Snapshots

    Page

    Tabl

    e

    Page

    Tabl

    e

    OLTP Process OLAP Process A

    Pages

    Page

    Tabl

    e

    OLAP Process C

    Terminated

  • ExperimentsI Setup

    I 2 quad-core 2.93 GHz Xeon, 64GB memory, RHEL 5.4I Benchmark size: 12 warehouses

    I System XI 3 query sessionsI 25 OLTP sessions, group commit (5 transactions)

    I MonetDBI 3 query sessionsI no OLTP

    I VoltDBI No OLAPI 12 sitesI No partition crossing transactions

    I HyPerI 3 OLAP sessions or 8 OLAP sessionsI 5 OLTP sessions or 1 OLTP session (incl. partition crossing Tx)I Snapshot taken before 1st transaction

  • Results System (# OLAP Sessions / # OLTP Sessions)System X (3/25) HyPer (8/1) HyPer (3/5) MonetDB (3/0) VoltDB (0/12)

    NO tps 222 tps 25 166 tps 112 217 tps 16 274 tpsTotal tps 493 tps 55 924 tps 249 237 tps