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

free transactions with
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Free Transactions with Rio Vista

David E. Lowell Peter M. Chen

Rio Project Electrical Engineering and Computer Science University of Michigan

slide-2
SLIDE 2

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

The Problem

Writing or modifying permanent data is 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!

slide-3
SLIDE 3

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

A Solution

Use transactions to group these steps into an indivisible unit.

  • 1. Deduct $1,000,000 from Dave’s account
  • 2. Add $1,000,000 to Pete’s account
  • 3. Pete signs Dave’s thesis

Transaction

v a

slide-4
SLIDE 4

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Transactions on Memory

An area of memory made persistent and updated within transactions Essence of a transaction

  • Just atomicity, durability
  • No nesting, concurrency control

RVM is an example

slide-5
SLIDE 5

A Transaction on Memory

transaction writes log begin transaction end memory database redo CPU log undo

. . .

log truncation memory database redo CPU log memory database redo CPU log memory database redo CPU log

slide-6
SLIDE 6

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

But...

Transactions are slow

  • disk writes
  • system calls
  • copies
  • log management

Rio can help...

slide-7
SLIDE 7

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Introduction to Rio

Protects file cache during crash Restores file cache contents on reboot → file cache pages are persistent!

Disk File Cache Process write() mmap() I/O

slide-8
SLIDE 8

A Transaction with Rio

transaction writes log begin transaction end memory database redo CPU log undo

. . .

log truncation memory database redo CPU log memory database redo CPU log memory database redo CPU log filecache filecache filecache filecache

slide-9
SLIDE 9

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Vista: A Transaction System Tailored for Rio

Maps persistent memory from Rio file cache

  • all updates immediately permanent
  • no redo log needed
  • just undo updates on abort/crash

File Cache Application Space database undo log

slide-10
SLIDE 10

A Vista Transaction

  • 1. Vista copies before-images to undo log
  • 2. Application directly writes permanent data
  • 3. Vista discards undo log on commit

writes transaction begin transaction end file cache addr space DB undo log CPU file cache addr space DB undo log CPU

slide-11
SLIDE 11

Recovery in Vista

vista_map reboot file cache addr space DB undo log CPU disk file cache addr space DB undo log CPU disk warm writes crash Rio’s

. . . . . .

transaction begin

slide-12
SLIDE 12

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Vista Highlights

Simplicity and Performance

  • no disk I/O
  • no redo log
  • simple recovery
  • nly 1 data copy
  • no system calls
  • nly 720 lines in size
  • scales linearly with CPU speed
slide-13
SLIDE 13

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Performance Evaluation

Benchmarks:

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.

slide-14
SLIDE 14

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Transaction Overhead

100 101 102 103 104 105 106

Transaction Size (bytes)

100 101 102 103 104 105 106

Transaction Overhead (µsec) Vista RVM RVM-Rio synthetic benchmark

slide-15
SLIDE 15

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Transaction Throughput

100 200 300

Database Size (MB)

10 100 1,000 10,000 100,000

Transactions/Second Vista RVM-Rio RVM debit-credit benchmark

slide-16
SLIDE 16

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Transaction Throughput

100 200 300

Database Size (MB)

10 100 1,000 10,000 100,000

Transactions/Second Vista RVM-Rio RVM

  • rder-entry benchmark
slide-17
SLIDE 17

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Using Vista

What we do now:

  • 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

slide-18
SLIDE 18

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Conclusions

Vista is really fast

  • 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

slide-19
SLIDE 19

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Isn’t Vista trivial?

RVM-Rio and Vista performance gap is still 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?
slide-20
SLIDE 20

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

What about concurrency?

Vista provides minimal transactions

  • 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

slide-21
SLIDE 21

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Is Vista DB vulnerable?

Only two known quantitative studies of this 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

slide-22
SLIDE 22

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

What about BIG databases?

No database works well when thrashing

  • 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

slide-23
SLIDE 23

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

What about group commit?

Group commit improves throughput for a 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

slide-24
SLIDE 24

FREE TRANSACTIONS WITH RIO VISTA David E. Lowell University of Michigan

Transaction Throughput

100 200 300

Database Size (MB)

10 100 1,000 10,000 100,000

Transactions/Second RVM-group size 64 RVM-group size 8 RVM Vista debit-credit benchmark with group commit