free transactions with
play

Free Transactions with WITH RIO VISTA Rio Vista David E. Lowell - PowerPoint PPT Presentation

FREE TRANSACTIONS Free Transactions with WITH RIO VISTA Rio Vista David E. Lowell University of Michigan David E. Lowell Peter M. Chen Rio Project Electrical Engineering and Computer Science University of Michigan FREE TRANSACTIONS


  1. FREE TRANSACTIONS Free Transactions with WITH RIO VISTA Rio Vista David E. Lowell University of Michigan David E. Lowell Peter M. Chen Rio Project Electrical Engineering and Computer Science University of Michigan

  2. FREE TRANSACTIONS The Problem WITH RIO VISTA David E. Lowell Writing or modifying permanent data is University of Michigan dangerous Example: Transferring money 1. Deduct $1,000,000 from Dave’s account 2. Add $1,000,000 to Pete’s account 3. Pete signs Dave’s thesis A crash in the middle of these steps leaves things corrupted!

  3. FREE TRANSACTIONS A Solution WITH RIO VISTA David E. Lowell Use transactions to group these steps into University of Michigan an indivisible unit. Transaction 1. Deduct $1,000,000 from Dave’s account 0 2. Add $1,000,000 to Pete’s account 3. Pete signs Dave’s thesis a v

  4. FREE TRANSACTIONS Transactions on Memory WITH RIO VISTA David E. Lowell An area of memory made persistent and University of Michigan updated within transactions Essence of a transaction Just atomicity, durability • No nesting, concurrency control • RVM is an example

  5. A Transaction on Memory log transaction transaction truncation begin end writes . . . CPU CPU CPU CPU undo memory memory memory memory log database redo database redo database redo database redo log log log log

  6. FREE TRANSACTIONS But... WITH RIO VISTA David E. Lowell Transactions are slow University of Michigan disk writes • system calls • copies • log management • Rio can help...

  7. FREE TRANSACTIONS Introduction to Rio WITH RIO VISTA David E. Lowell Protects file cache during crash University of Michigan Restores file cache contents on reboot → file cache pages are persistent! Process mmap () write () File Cache I/O Disk

  8. A Transaction with Rio log transaction transaction truncation begin end writes . . . CPU CPU CPU CPU undo memory memory memory memory log filecache filecache filecache filecache database redo database redo database redo database redo log log log log

  9. FREE TRANSACTIONS Vista: A Transaction System WITH RIO VISTA Tailored for Rio David E. Lowell University of Michigan Application Space undo database log File Cache Maps persistent memory from Rio file cache all updates immediately permanent • no redo log needed • just undo updates on abort/crash •

  10. A Vista Transaction transaction transaction begin writes end CPU CPU addr space addr space undo undo DB DB log log file cache file cache 1. Vista copies before-images to undo log 2. Application directly writes permanent data 3. Vista discards undo log on commit

  11. Recovery in Vista Rio’s warm transaction reboot crash vista_map begin writes . . . . . . CPU CPU addr space addr space undo undo DB DB log log file cache file cache disk disk

  12. FREE TRANSACTIONS Vista Highlights WITH RIO VISTA David E. Lowell Simplicity and Performance University of Michigan no disk I/O • no redo log • simple recovery • only 1 data copy • no system calls • only 720 lines in size • scales linearly with CPU speed •

  13. FREE TRANSACTIONS Performance Evaluation WITH RIO VISTA David E. Lowell Benchmarks: University of Michigan Synthetic, Debit-Credit, Order-Entry Systems: RVM, RVM-Rio, Vista Platform: 175 MHz DEC Alpha 3000/600 workstation with 256 MB of memory. Separate disks for RVM database, log, and swap.

  14. FREE TRANSACTIONS Transaction Overhead WITH RIO VISTA David E. Lowell University of 10 6 Michigan Transaction Overhead ( µ sec) 10 5 RVM 10 4 RVM-Rio 10 3 10 2 10 1 Vista 10 0 10 0 10 1 10 2 10 3 10 4 10 5 10 6 Transaction Size (bytes) synthetic benchmark

  15. FREE TRANSACTIONS Transaction Throughput WITH RIO VISTA David E. Lowell University of 100,000 Michigan Vista Transactions/Second 10,000 RVM-Rio 1,000 RVM 100 10 0 100 200 300 Database Size (MB) debit-credit benchmark

  16. FREE TRANSACTIONS Transaction Throughput WITH RIO VISTA David E. Lowell University of 100,000 Michigan Vista Transactions/Second 10,000 RVM-Rio 1,000 RVM 100 10 0 100 200 300 Database Size (MB) order-entry benchmark

  17. FREE TRANSACTIONS Using Vista WITH RIO VISTA David E. Lowell What we do now: University of Michigan Persistent VM • Fine grained transactions • Explicit or implicit logging • Do mallocs and frees within transactions • Extending and using free transactions: Send and receive messages within • transactions Build inexpensive checkpointing and • persistent processes Build a DSM with persistence and • transactions

  18. FREE TRANSACTIONS Conclusions WITH RIO VISTA David E. Lowell Vista is really fast University of Michigan Rio speeds up RVM by 20x • Vista gets another 100x (2000x total) • You can do neat stuff with free transactions Use transactions for fine-grained tasks • Reliable atomic messages, persistent • DSM, persistent processes, ... http://www.eecs.umich.edu/Rio

  19. FREE TRANSACTIONS Isn’t Vista trivial? WITH RIO VISTA David E. Lowell RVM-Rio and Vista performance gap is still University of Michigan surprising Vista’s simplicity is an interesting result It’s really small • It’s really simple • It’s really fast • Isn’t that the ideal? •

  20. FREE TRANSACTIONS What about concurrency? WITH RIO VISTA David E. Lowell Vista provides minimal transactions University of Michigan Many applications are single threaded • Concurrency schemes can be added as • needed in manner appropriate for each application Given ultra-fast transactions, • concurrency schemes can be simpler The lower the overhead of transactions, the more places they’ll be useful

  21. FREE TRANSACTIONS Is Vista DB vulnerable? WITH RIO VISTA David E. Lowell Only two known quantitative studies of this University of Michigan effect Both Chen96 and Ng97 show data not corrupted substantially more than disk We map metadata in a separate region from user data Fixes “off-by-one” and “buffer overrun” errors which are very common failure modes Updates within transactions help Could use sandboxing or similar technique if really necessary

  22. FREE TRANSACTIONS What about BIG databases? WITH RIO VISTA David E. Lowell No database works well when thrashing University of Michigan Vista’s reliable memory might help a bit • No double buffering or double paging • Vista is optimized for working sets that fit Vista is targeted for new, finer grained applications

  23. FREE TRANSACTIONS What about group commit? WITH RIO VISTA David E. Lowell Group commit improves throughput for a University of Michigan group of transactions Vista improves latency for a single transaction Group commit is not a general solution Group commit is limited by disk bandwidth Vista is still 100x better than group commit

  24. FREE TRANSACTIONS Transaction Throughput WITH RIO VISTA David E. Lowell University of 100,000 Michigan Vista Transactions/Second 10,000 RVM-group size 64 1,000 RVM-group size 8 100 RVM 10 0 100 200 300 Database Size (MB) debit-credit benchmark with group commit

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