IBM Haifa Research Laboratoryresearch.ibm.com/haifa/Workshops/SystemsAndStorage...© 2002 IBM...

20
© 2002 IBM Corporation IBM Haifa Research Laboratory IBM Systems and Storage Seminar | 24/11/2003 Improving Database Functionality and Performance Using an Object Store Architecture Gary Valentin Noam Rinetzky Michael Factor

Transcript of IBM Haifa Research Laboratoryresearch.ibm.com/haifa/Workshops/SystemsAndStorage...© 2002 IBM...

  • © 2002 IBM Corporation

    IBM Haifa Research Laboratory

    IBM Systems and Storage Seminar | 24/11/2003

    Improving Database Functionality and Performance Using an Object Store Architecture

    Gary Valentin Noam Rinetzky Michael Factor

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation2

    Research Goals

    §Potential benefits of Object Stores (ObS) to Data Base Managers (DBM)

    §Effects of ObS technology on DBM design

    §Making ObS more attractive for DBM√

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation3

    Outline

    §Background– Database managers storage model

    – Object Store

    §DBM / ObS§Expected benefits§Prototype Implementation §Related work§Conclusions

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation4

    Database Managers

    Programs that manage data§ Insert, delete, update, query, etc. via SQL§Advanced services

    – Backup, transactional access, …

    §Responsible for storing the data– Store data in tables and indexes

    – Use various data structures

    – B+Trees, heaps, …– Data layout is invisible to end-user

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation5

    DBM Storage ModelsFile system

    managed data§ DBM: places each table

    and index in a separate file§ File system: manages

    the storage

    DBM managed data

    § DBM works with raw partitions§ Takes responsibility

    for storage management

    ObSmanaged data

    DBM

    Block Device

    DBM

    Object Store

    DBM

    Block Device

    File System

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation6

    What is an Object Store?

    What is a block device?§ Abstraction: array of unrelated

    blocks§ Access: based on block

    number

    What is an object store?§ Abstraction: collection of

    storage objects§ Access: object id, range

    0x1000x000

    0x3000x200

    0x4000x400

    O2 O4

    O1O3

    O5

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation7

    What is an Object Store?

    ObS interface§ Create / delete object§ Read / write byte range in an

    object§ Set / Get object attributes

    O2 O4

    O1O3

    O5

    ObS is responsible for§ Managing object meta data

    – Offset à data

    – Attributes§ Free space management

    ObS provides a higher level of abstraction

    What is an object store?§ Abstraction: collection of

    storage objects§ Access: object id, range

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation8

    DBM ObS Storage Model

    § Each table / index is mapped to a different storage object§ By design, similar to the

    FS-MD modelHowever, storage management is done by the ObS and not by the file system

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation9

    Expected Benefits

    Performance§Code path

    reduction § Improved caching §Atomic writes§Advanced Search

    Functions

    Functionality§Quality of Service §Object point in time

    copy§Object encryption§Object compression

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation10

    Performance Boosting via Code Path Reduction§ ObS-MD minimizes the

    storage management code path on the DBM host

    FS-MD: FS-layer overhead

    DBM-MD: DBM Storage management overhead

    ObS-MD: Storage management overhead moved to storage server

    § Conjecture: moving work from DBM host to the storage server is beneficial

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation11

    Performance Boosting via Code Path Reduction§ ObS-MD minimizes the

    storage management code path on the DBM host

    FS-MD: FS-layer overhead

    DBM-MD: DBM Storage management overhead

    ObS-MD: Storage management overhead moved to storage server

    § Conjecture: moving work from DBM host to the storage server is beneficial

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation12

    Object Compression

    Pros§ Transparent to DBM§ Does not use DBM host

    CPU cycles§ Efficient compression

    – large blocks

    Cons§ Complicates object

    updates§ Does not save network

    bandwidth

    ObS can provide lossless object compression

    The DBM may choose to compress only suitable objects

    e.g. rarely modified large text objects

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation13

    Prototype Implementation

    §Modified DB2 Universal database V8.1 to use a native ObS interface§Changed components

    – Data cache

    – Agents

    – Prefetchers

    – Page cleaners

    § Internal object store prototype

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation14

    Object Caching

    § Prototyped the ability to specify which objects to cache§ Scanned tables:

    – 60MB size

    – 1M records

    Conclusions• Performance gained by caching object in the ObS cache approaches optimal• Changing the ObS caching policies, i.e., according to QoS considerations can influence the DBM overall performance

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation15

    Related Work

    §Object Stores:NASD [G. Gibson et al., 1997]

    ObS Security [Gobioff 1999, A. Azagury et al., 2002]

    T10 OSD standard §DBM & Storage

    My cache or yours? [T. M. Wong and J. Wilkes 2002]

    Lachesis [B. Schindler et al. 2003]

    Active storage [E. Reidel et al. 1998]

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation16

    Conclusions

    Object store managed data model

    § An attractive alternative to current storage models§ Provides many benefits

    – Performance: code path reduction, caching, advanced search function, atomic writes

    – Functional: QoS, point in time copy, object encryption, object compression

    § Benefits originate from – ObS higher level of abstraction

    – DBM deep understanding of the objects it maintains

    § Fits well with current DBM design

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation17

    ?

  • © 2002 IBM Corporation

    IBM Haifa Research Laboratory

    IBM Systems and Storage Seminar | 24/11/2003

    Coffee time

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation19

    Advanced Search Functions

    §A search of a string in a not-indexed column leads the DBM to read an entire table§An advanced search function would allow

    the DB to send the string to the OBS and get back the offsets in an object in which a match was found§Save network bandwidth and CPU cycles

    from DBM host

  • IBM Haifa Research Laboratory

    Improving Database Functionality and Performance Using an Object Store Architecture © 2002 IBM Corporation20

    Atomic Writes

    § SCSI Block devices guarantee atomic writes at sector granularity§ DBM manages tables with

    different page sizes– e.g., 4K, 8K, 16K, 32K

    § Pages has to be written atomically§ Partial page is an unrecoverable

    situation

    old

    old

    old

    old

    old

    old

    old

    old

    new

    new

    new

    new

    new

    new

    new

    new

    new

    new

    new

    old

    old

    old

    old

    old

    4K page = 8 sectors

    Can dofrom log

    Can undo from log

    ObS solution: set atomic write length as an object property

    Restore from backup