Building reliable, high-performance communication systems from components

21
Building reliable, high-performance communication systems from components Xiaoming Liu, Christoph Kreitz, Robbert van Renesse, Jason Hickey, Mark Hayden, Ken Birman, Bob Constable (shepherd: Peter Lee) Cornell, Caltech, Compaq (CMU, Cedilla)

description

Building reliable, high-performance communication systems from components. Xiaoming Liu, Christoph Kreitz, Robbert van Renesse, Jason Hickey, Mark Hayden, Ken Birman, Bob Constable (shepherd: Peter Lee) Cornell, Caltech, Compaq (CMU, Cedilla). Why software components?. - PowerPoint PPT Presentation

Transcript of Building reliable, high-performance communication systems from components

Page 1: Building reliable, high-performance communication systems from components

Building reliable, high-performance

communication systems from components

Xiaoming Liu, Christoph Kreitz, Robbert van Renesse, Jason Hickey,

Mark Hayden, Ken Birman, Bob Constable

(shepherd: Peter Lee)

Cornell, Caltech, Compaq (CMU, Cedilla)

Page 2: Building reliable, high-performance communication systems from components

Why software components?

1. Ease design and development

2. Tuning to environment3. Customization to user app4. Extensibility5. Verification and

robustness

Page 3: Building reliable, high-performance communication systems from components

Why not?• Configuration is hard• Performance is bad

– Abstraction barriers– Poor locality– Redundant code

• Not reliable• Not faster

Page 4: Building reliable, high-performance communication systems from components

Group Communication

Network

Page 5: Building reliable, high-performance communication systems from components

History

V Ensem

ble

Isis

Horus

• Multicast

• Membership• CATOCS

• Layers• Protocols

• ML• Formal methods

Page 6: Building reliable, high-performance communication systems from components

Specification

Concrete (ML)Implementation

Properties(English)

code of a layerlogical

predicates

Page 7: Building reliable, high-performance communication systems from components

Specification

Abstract Spec

Concrete (ML)Implementation

Properties(English)

refinement proof

(I/O Automata)

Page 8: Building reliable, high-performance communication systems from components

Abstract IOA specificationof totally ordered multicast

S: array[integer] of messagenext: integerdeliv: array[process] of integer

action Multicast(m) { S[next++] := m; }

action Deliver(p, m)precond: deliv[p] < next && m ==

S[deliv[p]]{ deliv[p]++; }

globalstate

Page 9: Building reliable, high-performance communication systems from components

Layer correctness

abstract FIFOnetwork spec

abstract TotalOrder network

spec

Hickey, Lynch, VanRenesse, TACAS’99

network + layer == network++

Token layer on each CPU

Page 10: Building reliable, high-performance communication systems from components

Stack correctness

Seqno layer

FIFO

total

unreliable

Token layer

For example: Seqno

Token

Page 11: Building reliable, high-performance communication systems from components

Efficiency?

• Ensemble stacks have many layers, improving clarity, but inefficient.

• 5 optimization techniques:1. Avoiding (in-line) garbage collection2. Avoiding marshaling3. Delaying non-critical message

processing4. Identifying common paths5. Header compression

Page 12: Building reliable, high-performance communication systems from components

A protocol layer is a function!

old statenew state

input event output events

layer

Page 13: Building reliable, high-performance communication systems from components

(off-line) partial evaluation

Common CasePredicate

original code

Specialized code

Hacker +Formal person

NuPrl

layer

Page 14: Building reliable, high-performance communication systems from components

Two-phase optimization

Programmer Formal User

code CCP

bypassfunction

Off-line On-line

TT TT

Page 15: Building reliable, high-performance communication systems from components

Header compaction

T_Data

T_Dataseqno

T_Last

Hashseqno

• Less space• Faster processing

Page 16: Building reliable, high-performance communication systems from components

Architecture (deliver only)

Network

Application

?

generated bypassoriginal stack

CCP (e.g., hdr.seq = win.lo)

Transport driver (marshaling, deviceindependence)

Page 17: Building reliable, high-performance communication systems from components

Architecture

Network

Application

?

?

generated bypass

original stack

CCP

Transport driver (marshaling, deviceindependence)

Page 18: Building reliable, high-performance communication systems from components

Performance

• Three different versions:1. Original (ORIG)2. Hand-optimized (HAND) 3. Machine-optimized (MACH)

• 300 MHz UltraSparc/Solaris 2.6• OCaml 2.0 native code compiler

Page 19: Building reliable, high-performance communication systems from components

Code latency (sec)

10 layer 4 layer stackORIG MACH ORIG MACH HAND

Down Stack 20 9 13 2 2+ 4Down

Transport27 8 6 6

Up Transport 20 7 8 7 6 + 2Up Stack 14 8 10 4

Total 81 32 37 19 14

(See paper for CPU cycles and TLB misses)

Page 20: Building reliable, high-performance communication systems from components

Lessons learned

1. Design with formalization in mind 2. Use small, but not too small

components3. Use a language with formal semantics4. Use IOA as a specification language5. Use formal tool with in-house expertise

Page 21: Building reliable, high-performance communication systems from components

Final remarks

• See CD or Web for code samples, links to all code, as well as how to reproduce our results

• Still working on a machine-generated proof of correctness