Top Banner
SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram Adve
79

Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

May 20, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

SLIPSTREAM: AUTOMATIC

INTERPROCESS COMMUNICATION

OPTIMIZATION

Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram Adve

Page 2: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Introduction

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

2

Use of TCP is ubiquitous

Widely Supported

Location Transparency

Programmer-friendly but not always ideal

Faster IPC exists for local communication

Goal: Best of TCP generality with fast performance locally

Page 3: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Motivating Example3

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IPTCP/IP

Page 4: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Motivating Example4

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

Optimization opportunity:

Local communication could use UDS

Page 5: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Motivating Example – Manually Optimized5

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IPUDS vs TCP: up to 2x ops/sec!

Avoid TCP layers

Page 6: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Motivating Example – Manually Optimized6

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IPUDS vs TCP: up to 2x ops/sec!

Avoid TCP layers

Can we do this

automatically?

Slipstream: Automatic IPC Optimization

Page 7: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

What’s Coming

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

7

Slipstream Overview

How Slipstream Works

Selected Results

Performance

Compatibility

Docker

Conclusions

Page 8: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Slipstream Overview8

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Page 9: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Design Principles: Automatic and Useful9

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IPTCP/IP TCP/IP

No App. Modifications

Language Agnostic

No Kernel Modifications

No Network Assumptions

Backwards Compatible

Page 10: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Slipstream Architecture: What is it?10

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

Page 11: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Example + (libipc)11

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipc libipc

libipc:

Shim library between application and OS

Page 12: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Example + (libipc + ipcd)12

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

ipcd:

Coordinating daemon for all libipc on host

Page 13: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Example + Slipstream13

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Page 14: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

How Slipstream Works14

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Page 15: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

How Slipstream Works: Overview15

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Track TCP State

Detect Local Communication

Switch to UDS

Page 16: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Tracking TCP State16

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Track TCP StateDetect Local

CommunicationSwitch to UDS

Page 17: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

1) Tracking TCP State17

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

readwrite listen

Track TCP StateDetect Local

CommunicationSwitch to UDS

libipc:

Transparently monitors TCP operations

Page 18: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

1) Tracking TCP State18

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

readwrite listen

Track TCP StateDetect Local

CommunicationSwitch to UDS

libipc:

Maintains state throughout execution

libipc:

Transparently monitors TCP operationsfork

exec dup

Page 19: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Detecting Local Communication19

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Track TCP StateDetect Local

CommunicationSwitch to UDS

Page 20: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Detecting Local Communication20

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

ipcd:

Uses information from libipc to perform

endpoint matching

Track TCP StateDetect Local

CommunicationSwitch to UDS

Page 21: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Detecting Local Communication21

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

ipcd:

Uses information from libipc to identify local

communication

Endpoint Matching:

1. {SRC IP:Port, DEST IP:Port}

2. N-Byte Checksum of Stream Data

3. Timing Windows

Track TCP StateDetect Local

CommunicationSwitch to UDS

Page 22: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

2) Detecting Local Communication22

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Local communication detected!

Track TCP StateDetect Local

CommunicationSwitch to UDS

Page 23: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Switching to UDS23

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Track TCP StateDetect Local

CommunicationSwitch to UDS

Page 24: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Switching to UDS24

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Track TCP StateDetect Local

CommunicationSwitch to UDS

ipcd:

Generate optimized socketpair, send to

libipc instances

Page 25: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Switching to UDS25

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Track TCP StateDetect Local

CommunicationSwitch to UDS

libipc:

Transparently switch to new transport

Page 26: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Switching to UDS26

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcdlibipc:

Preserve expected socket behavior

for compatibility

Track TCP StateDetect Local

CommunicationSwitch to UDS

libipc:

Transparently switch to new transport

Page 27: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Switching to UDS27

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Slipstream: up to 2x ops/sec

Track TCP StateDetect Local

CommunicationSwitch to UDS

Page 28: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Selected Results28

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Page 29: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Performance vs Local TCP

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

29

Memcached

Up to +80% ops/sec!

At least +40% ops/sec!

Page 30: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Performance vs Manual UDS

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

30

Netperf UDS

Slipstream automatically achieves

performance similar to manual UDS!

Page 31: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Performance Overhead31

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

~3.5% overhead

< 3% overhead

Memcached

Netperf

Page 32: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Software Compatibility

Supports many popular server applications

MySQL, PostgreSQL, Redis, Memcached, Apache, Jenkins, …

Language agnostic in practice

Java, C, Python, …

All work correctly with Slipstream

All are optimized when communicating locally

Supports use with Docker!

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

32

Page 33: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Example with Docker33

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

Slower comm., extra layers

Put app in container

Container per component

Page 34: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Example with Docker + Slipstream?34

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

Slower comm., extra layers

Put app in container

Container per component

Did someone say they

need Automatic IPC

Optimization?

Page 35: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Slipstream with Docker35

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipc

libipc per container

Page 36: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Slipstream with Docker36

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipc

ipcd

libipc per container

Connect to common ipcd

Page 37: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Slipstream with Docker37

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipc

ipcd

ipcd can run in a container too

libipc per container

Connect to common ipcd

Page 38: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Slipstream with Docker38

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipc

ipcd

Optimize across containers!

Page 39: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Slipstream with Docker39

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipc

ipcd

Same perf. as without Docker

Optimize across containers!

2x-3x ops/sec over Docker

Page 40: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Docker with NetPIPE-C40

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Baseline Docker is significantly slower

Slipstream shows large speedups

Same perf. with or without Docker!

Page 41: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Conclusions:

Automatically use faster IPC mechanism when available

Easy to deploy, highly compatible

No OS modifications

No modifications to application

Language-agnostic

Backwards-compatible (partial deployment supported)

~2x bandwidth improvement for host-local communication

Low overhead when optimization is not possible

Freely Available at http://wdtz.org/slipstream

Thank you! Questions?

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

41

Page 42: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

(End of presentation)

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

42

Page 43: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

FAQ43

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Page 44: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Q: Why use UDS instead of other local IPC?

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

44

Simply: Socket interface of UDS facilitated prototyping

Any local IPC mechanism should be possible

(Patches welcome! )

Others could avoid kernel interaction for even better performance

See ipc-bench paper

Slipstream is not UDS-specific

UDS implementation detail, idea is faster performance leveraging locality

In fact, netperf sometimes slower with UDS (see paper).

Page 45: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Q: Why not have application do this itself?

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

45

Legacy: many applications don’t do this today

(Knowledge that UDS faster than TCP is not new!)

They shouldn’t have to, Slipstream!

Achieves performance of manual optimization

Low overhead when optimization not possible

Applications have better things to do than transport selection!

Page 46: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Q: Why userspace solution, not in-kernel?

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

46

Mostly: Legacy

Ease of use, ease of deployment

Suitable for use on other systems (FreeBSD, etc.)

May not be appropriate for kernel

Correctness concerns

(Opt-in approach likely appropriate)

Possibility for using even more efficient transports than UDS

Can’t cut out kernel with a kernel-based solution

Page 47: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Q: What about frequent short-lived connections?

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

47

Current implementation not well-suited for this, but could be!

Would not benefit from optimization

only applied to longer-lived connections

In fact, initial connection latency over localhost increased

Not by design, result of implementation choices (but nevertheless)

Probably better off with custom “is local” decision mechanism

Ex: “Is destination IP 127.0.0.1”

Would allow optimizing before connection, get faster connect() times

Thanks for the question, Joshua .

Page 48: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Extra Slides48

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Page 49: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Category Name Application Transparency OS Transparency

OS Feature

Windows Fast-Path

Solaris TCP Fusion

AIX fastlo

Linux TCP Friends ?

VM-VM

XWay

XenSocket

XenLoop

Userspace

Networking Stack

mTCP

Sandstorm

Userspace

Shim Library

Fable

Java Fast Sockets

Universal Fast Sockets

FastSockets

Slipstream

Related Work49

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Page 50: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Building on Slipstream

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

50

Alternative transports (shared memory, etc.) (see ipc-bench)

Select best transport for workload/configuration

Support multiple locality detection mechanisms

Provided one is suitable for many use-cases

If can assume network topology, can directly determine this

More exhaustive testing, performance investigation

Page 51: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Try it out today!

No configuration, simple deployment

Big performance gains for many applications (Docker support!)

Low overheads when optimization is not possible

Makes most of partial deployment

Open-source, CRAPL (don’t judge, it’s research!)

Download today!

http://wdtz.org/slipstream

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

51

Page 52: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Deploying Slipstream53

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Page 53: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Example + Slipstream: Deployment54

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

Page 54: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Example + Slipstream: Deployment55

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipc libipc

libipc deployed with application(LD_PRELOAD or /etc/ld.so.preload)

Page 55: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Challenges and Solutions56

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Page 56: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Example + Slipstream: Key Challenge57

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Challenge:

Which connections are communicating

locally?

libipc only sees what goes through it

Solution:

Endpoint matching algorithm to identify

local communication

Page 57: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Endpoint Matching Overview58

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

libipc works with ipcd which has more information

Observed behavior from both libipc

instances used by ipcd to find match

It’s the

orange one!

Page 58: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Endpoint Matching Overview59

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

It’s the

orange one! libipc works with ipcd which has more information

Observed behavior from both libipc

instances used by ipcd to find matchWhat information can

be used to help pair

endpoints?

Page 59: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Endpoint Matching Overview60

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Src/Dst

IP and Port

Data

Sent/Recv

Timing

Details

Observed behavior from both libipc

instances used by ipcd to find match…and it’s

orange.

libipc works with ipcd which has more information

Page 60: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Endpoint Matching Overview61

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Src/Dst

IP and Port

Data

Sent/Recv

Timing

Details

Observed behavior from both libipc

instances used by ipcd to find matchMore

details in

paper!

libipc works with ipcd which has more information

Page 61: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Endpoint Matching Overview62

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcdObserved behavior from both libipc

instances used by ipcd to find match

libipc works with ipcd which has more information

Page 62: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Endpoint Matching Overview63

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Local endpoints found!

libipc works with ipcd which has more information

Observed behavior from both libipc

instances used by ipcd to find match

Page 63: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Endpoint Matching: Complete64

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Local endpoints found!

Page 64: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Automatic IPC Optimization65

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Transparently switches to UDS

Page 65: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Automatic IPC Optimization66

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

UDS vs TCP: up to 2x ops/sec

Page 66: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Without Modifying Applications?67

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Kernel

Clients

Web App

(Java, C, Python, …)Memory Store Database

KernelTCP/IP TCP/IP

libipc libipcipcd libipc ipcd

Implementation Challenge:

libipc must preserve expected socket behavior

for compatibility

Solution:

Engineering!

Page 67: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Results, with slides.68

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.Source: http://www.penny-arcade.com/comic/2005/09/09

Page 68: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

69

NetPIPE-C NetPIPE-Java

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Faster than TCP? NetPIPE Microbenchmarks

1.4x to 2.5x improvement!

Works with both C and Java!

Page 69: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Faster than TCP? Memcached

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

70

1.4x to 1.8x ops/sec

Page 70: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

71

PostgreSQL – TPC-B PostgreSQL - Select

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Faster than TCP? PostgreSQL

No improvement when CPU/IO bound Small improvement for Select-only

Page 71: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

72

PostgreSQL – TPC-B PostgreSQL - Select

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Faster than TCP? PostgreSQL

No improvement when CPU/IO bound Small improvement for Select-only

Application benefit depends on how

much network is the bottleneck

Page 72: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

73

Netperf Memcached

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Slower than TCP? Slipstream Overhead

~3.5% overhead for Netperf < 3% overhead for Memcached

Page 73: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

74

Netperf Memcached

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Slower than TCP? Slipstream Overhead

~3.5% overhead for Netperf < 3% overhead for Memcached

Overhead incurred is low in even

network-intensive applications

Page 74: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Slower than manual UDS? Netperf Microbenchmark

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

75

Relative to fixed benchmark

(Default UDS does poorly)

Page 75: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Slower than manual UDS? Netperf Microbenchmark

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

76

Relative to fixed benchmark

(Default UDS does poorly)

Automatically achieves

performance close to manually

using UDS!

Page 76: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Docker with NetPIPE-C77

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Baseline Docker is significantly slower

Slipstream shows large speedups

Same perf. with or without Docker!

Page 77: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

78

Memcached with Docker Memcached without Docker

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

Docker with Memcached

Baseline Docker has lower performance

Curious:

Memcached with Slipstream

performs better across Docker

containers

Page 78: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Software Compatibility

Supports many popular server applications

MySQL, PostgreSQL, Redis, Memcached, Apache, Jenkins, …

Language agnostic in practice

Java, C, Python, …

And of course our microbenchmarks:

NetPIPE, netperf, iperf, lmbench

All work correctly with Slipstream

All are optimized when communicating locally

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

79

Page 79: Slipstream: Automatic Interprocess Communication Optimization · SLIPSTREAM: AUTOMATIC INTERPROCESS COMMUNICATION OPTIMIZATION Will Dietz, Joshua Cranmer, Nathan Dautenhahn, Vikram

http://wdtz.org/slipstream

Kernel

Slipstream Overview – Multiple Applications80

Presented by Will Dietz, University of Illinois at Urbana-Champaign. USENIX ATC'15.

ipcd

Web App

libipc

Web App

libipc

Web App

libipc

libipc:

One instance per process

ipcd:

One instance per host