Reaves.dev

v0.1.0

built using

Phoenix v1.7.17

Latency Limits

Stephen M. Reaves

::

2024-03-09

Notes about Lecture 5c for CS-6210

Summary

Latency vs Throughput

Latency := Elapsed time

Throughput := Events per unit time

RPC Performance:

Components of RPC Latency

  1. Client Call
  2. Controller Latency
  3. Time on Wire
  4. Interrrupt Handling
  5. Server setup to execute call
  6. Server execution and reply
  7. Client setup to receive results and restart

Sources of overhead in RPC

Marshaling and Data Copying

Copying is biggest source of latency

Three copies of data:

You can reduce copies by marshaling into kernel buffer directly, or by using shared descriptors between client stub and kernel

Control Transfer

Gcluster_clientclientcluster_serverserverccc1c1c->c1call outs1s1c1->s1netc2c2c2->cresult insss1->scall ins2s2s->s2result outs2->c2net

Potentially 4 context switches, but at least two are required

Can even reduce down to one context switch if we spin

Protocol Processing

What transport for RPC?

Choices for reducing latency in transport: