integrating reliable memory in databases
play

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


  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

  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

  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] Normalized Execution Time (%) 100 Disk I/O Other 80 60 40 20 0 1994 1996 1998

  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,000 Vista Transactions/Second Memory interface 10,000 RVM-Rio I/O interface 1,000 RVM 100 Disk interface 10 0 100 200 300 Database Size (MB)

  5. Rio: A Reliable File Cache reboot protect memory restore memory during crash during reboot Remove reliability-induced writes to disk (sync, fsync, bwrite, bawrite) Makes memory safe from operating system crashes, requires no hardware

  6. I/O Interface to Reliable Memory database system operating system read() database Rio file cache buffer cache (reliable memory) (non-persistent) write() 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

  7. Memory Interface to Reliable Memory database system operating system store load Rio file cache (reliable memory) database buffer cache (non-persistent) 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

  8. Protected Memory Interface database system operating system Rio file cache store load (reliable memory) database buffer cache (non-persistent) Benefits + same as memory interface + minimize database’s vulnerability to software errors Drawbacks - affect performance due to protection overheads - does it really help?

  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; ...} ptr = ptr->next -> next; pointer allocation ptr = malloc(); use ptr; use ptr; free(ptr); copy overrun for (i=0; i<sizeUsed; i++) {a[i] = b[i]}; for (i=0; i < <= size; i++) off-by-one synchronization getWriteLock; write(); freeWriteLock; memory leak {code} free(ptr); {more code} interface error insert(bufTemp, index);

  10. Reliability Results I/O Fault Type 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 off-by-one 5 synchronization memory leak interface error 4 19 of 750 Total (2.5%)

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

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

  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/

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend