---
# System prepended metadata

title: 'ZygOS: Achieving Low Tail Latency for Microsecond-scale Networked Tasks'

---

# ZygOS: Achieving Low Tail Latency for Microsecond-scale Networked Tasks

###### paper origin: SOSP '17
###### paper: [link](https://dl.acm.org/doi/10.1145/3132747.3132780)

### Motivation
* Datacenter application
* To server μs-scale RPCs with low tail latency

### Problem
* IX has two main issues
    * Imbalance : some cores may be idle while other cores can barely finish its' work
    * Bad tail-latency performance when the service time distribution has a high dispersion

### Evaluted systems
* Queuing model : Load vs. Latency
    * Single-queue system performs better compared to systems with multiple queues
    * FCFS performs better in regards to tail latency for distribution with low dispersion
![](https://i.imgur.com/HzZ0RYS.png =420x)
![](https://i.imgur.com/6nqIHbQ.png)

* Systems evalution, during the benchmark, systems simply receive request from open connections, wait the requested amount of time and return a response
    * Upper bounds : zero operating system overheads, no scheduling overheads, no propagation delays, no head-of-line blocking, no interrupt delays, etc.
    * Linux-floating : all open connections are put into a single poll which all threads my poll
    * Linux-partitioned : each thread accept its set of connections
    * IX : modeled as partitioned-FCFS
![](https://i.imgur.com/RofDuW1.png)

### Design & Implementation
* Although it can not provide a robust solution to the tail latency problem, synchronization-free dataplane still provides substantial throughput improvement over conventional OS
* Based on IX dataplane, add a pull-based, work-stealing scheme
    * shuffle layer added, a shuffle queue per core
    * cores poll on each other's shuffle queue while in idle
    * replace adaptive batching by intermediate buffering
    * use IPI to ask other cores to fullfill the shuffle queue

![](https://i.imgur.com/ysUy0WU.png)

### Evaluation
![](https://i.imgur.com/kRL0pRW.png)

![](https://i.imgur.com/BmaHHzh.png)

### Discussion
* The choice of an SLO also informs on the choice of the underlying operating system and scheduling strategy
![](https://i.imgur.com/EiXX1EL.png)