Integrating Reliable Memory in Databases Wee Teck Ng, Peter M. Chen - - PDF document

integrating reliable memory in databases
SMART_READER_LITE
LIVE PREVIEW

Integrating Reliable Memory in Databases Wee Teck Ng, Peter M. Chen - - PDF document

Integrating Reliable Memory in Databases Wee Teck Ng, Peter M. Chen Computer Science and Engineering Division Electrical Engineering and Computer Science University of Michigan Objectives Introduce the Rio file cache software-based reliable


slide-1
SLIDE 1

Integrating Reliable Memory in Databases

Wee Teck Ng, Peter M. Chen Computer Science and Engineering Division Electrical Engineering and Computer Science University of Michigan

slide-2
SLIDE 2

Objectives

Introduce the Rio file cache software-based reliable memory Examine three different ways of using reliable memory and their implications I/O interface: non-persistent database buffer cache memory interace: persistent database buffer cache protected memory interface: protected persistent database buffer cache Show quantitatively that it is safe to mmap reliable memory directly into database address space simplify database design significant performance advantage

slide-3
SLIDE 3

Reliable Memory

Reliable memory = main memory as safe as disk from operating system crashes Reliable memory is important for current and future database systems [Rosenblum95]

100 80 60 40 20 1994 1996 1998

Disk I/O Other

Normalized Execution Time (%)

slide-4
SLIDE 4

Benefits of Reliable Memory

Simplify database design fast recovery (no redo log, checkpt, warm cache) direct control of buffer cache (optimized for DB) simpler and smaller code (less bugs) Significant performance improvements

100 200 300

Database Size (MB)

10 100 1,000 10,000 100,000

Transactions/Second

Vista RVM-Rio RVM Memory interface I/O interface Disk interface

slide-5
SLIDE 5

Rio: A Reliable File Cache

Remove reliability-induced writes to disk (sync, fsync, bwrite, bawrite) Makes memory safe from operating system crashes, requires no hardware reboot protect memory restore memory during crash during reboot

slide-6
SLIDE 6

I/O Interface to Reliable Memory

Benefits + performance improvement without any change to application code + as safe as standard database from operating system crashes Drawbacks

  • performance (we can do better)
  • double buffering

database write() read()

database system

  • perating system

Rio file cache (reliable memory) buffer cache (non-persistent)

slide-7
SLIDE 7

Memory Interface to Reliable Memory

Benefits + significant performance improvements + simplify database design + safe from operating system and database failures Drawbacks

  • require some changes in database design
  • increase database’s vulnerability to software

errors

database store load

database system

  • perating system

Rio file cache (reliable memory) buffer cache (non-persistent)

slide-8
SLIDE 8

Protected Memory Interface

Benefits + same as memory interface + minimize database’s vulnerability to software errors Drawbacks

  • affect performance due to protection overheads
  • does it really help?

database store load

database system

  • perating system

Rio file cache (reliable memory) buffer cache (non-persistent)

slide-9
SLIDE 9

Fault Models

Goal is wide variety and realism [Sullivan91]

Fault Type Example of Programming Error destination register numFreePages = count(freePageHeadPtr) source register numPages =physicalMemorySize/pageSize delete branch if while (...) {body} delete random inst. for (i=0; i<10; i++,j++) {body} initialization function () {int i=0; ...} pointer ptr = ptr->next->next; allocation ptr = malloc(); use ptr; use ptr; free(ptr); copy overrun for (i=0; i<sizeUsed; i++) {a[i] = b[i]};

  • ff-by-one

for (i=0; i < <= size; i++) synchronization getWriteLock; write(); freeWriteLock; memory leak {code} free(ptr); {more code} interface error insert(bufTemp, index);

slide-10
SLIDE 10

Reliability Results

Fault Type I/O Interface kernel text 1 kernel heap kernel stack destination register 4 source register 2 delete branch 1 delete random inst. 2 initialization pointer allocation copy overrun

  • ff-by-one

5 synchronization memory leak interface error 4 Total 19 of 750 (2.5%)

slide-11
SLIDE 11

Memory Interface 1 5 2 1 2 1 5 3 20 of 750 (2.7%)

slide-12
SLIDE 12

Protected Memory I/F 1 5 2 2 1 3 3 17 of 750 (2.3%)

slide-13
SLIDE 13

Conclusions

Reliable memory yields huge benefits, particularly when using a memory interface to it (persistent buffer cache) Memory interface does not hurt reliability, so we should use it Need to verify our findings on commercial database More information available at http://www.eecs.umich.edu/~pmchen/