23
The Peregrine High-Performance RPC System David B. Johnson Willy Zwaenepoel Software—Practice & Experience February 1993.

The Peregrine High-Performance RPC System David B. Johnson Willy Zwaenepoel Software—Practice & Experience February 1993

Embed Size (px)

Citation preview

The PeregrineHigh-Performance

RPC System

David B. JohnsonWilly ZwaenepoelSoftware—Practice & Experience February 1993.

Client Server Models

Request Reply

Function calling

Request

Response

Client Server

Benefits of RPC

Network programming made easy RPC package takes care of timeouts, out of

order packets RPC package takes care of data translation

Server

RPC Model

Client Client-stub Runtime Runtime Server-stub

call packet

result packet

call

work

returnpack result

unpack argumentreceive

transmit

transmit

receiveunpack result

pack argument

local return

local call

RPC Issues

Pass by reference Binding functions

Parameter Types

In In-out Out

Key RPC Optimizations in Peregrine Arguments (results) are directly transmitted from

client (server) address space No data representation conversion Both call and return packets are transmitted using

pre-allocated headers No thread specific state is saved after the execution

of call at the server Arguments are mapped into the server address

space avoiding copying Multi-packet argument transmission avoids copying

in critical path

Peregrine Implementation

Peregrine kernelComponent

OS kernel

IP

RPC STUB/SKEL

Rpc protocol

Hardware Requirements

“gather” DMA Page remapping

Packet Header

Type service

IP total length

IP identification Frag. offset

Source IP

Destination IPRPC packet type RPC Packet data length

Packet sequence numberClient IdentifierServer Identifier

Procedure number

IHL

flags

Call sequence number

RPC total message length

TTL Check Sum

Version

Role of Stubs

Client Stub Kernel trap to send call message and return Builds buffer descriptors Data translation

Server Stub Call server procedure kernel trap to return results.

Sending the packet RPC

Receiving the RPC packet

Result packet

Sending the result packet Stub builds descriptors Kills server thread

Receiving the result packet In-out and out buffers are copied

Multi Packet RPC

Blast Beginning of argument list is sent last all

others in order

Performance

Single Packet Network RPC

Multi packet Network RPC

Effectiveness of Optimizations

Arguments (results) are directly transmitted from client (server) address space

No data representation conversion Both call and return packets are transmitted using

pre-allocated headers No thread specific state is saved after the

execution of call at the server Arguments are mapped into the server address

space avoiding copying Multi-packet argument transmission avoids

copying in critical path

Peregrine VS the rest