Automatic ECN Tuning for HighSpeed Datacenter Networks
Xiaoliang Wang, Nanjing University
With： Siyu Yan, Xiaolong Zheng, Yinben Xia, Derui Liu, Weishan Deng
Huawei Technologies Co.,LtdNanjing University

The demand for high performance network
High-performance storage• HDDSSDNVMe• Storage at host: ms -> sub-us -> us

HPC• Frequent communication• Need ms even us

Distributed AI training• CPUGPU, FPGA, ASIC
• Faster compute, and huger model
parameters to communicate

Applications need High-throughput, Low latency network

The deployment of high performance network• Unfortunately, the deployment is challenging !
1. Determining the requirement• tenants, applications, scalability, reliability, cost (devices, operation) ….
• Lack of experienced architect, new feature support, new devices like smart NIC

2. Set up configuration• Switch/NIC settings, QoS, multipath, reliability ….
• Long terms of testing, legacy devices, multiple vendors …
• NIC and switch belong to different groups

3. Operating/maintaining• Monitoring• incremental deployment• fairness between multiple protocols• …

Can we make the network operation easier?

Prior works• Control plane• Software-Defined Networks (SDN)• Intention Based Networks (IBN)• Protocol optimization• HPCC [SIGCOMM 2019]：change NIC CC and need INT• Timely/Swfit [SIGCOMM 2020]：accurate measurement with NIC timestamp• ECN# [CoNEXT 2019 ]: New switch chip supports• Parameters boosting• Carver: Finding Important Parameters for Storage System Tuning [FAST 2020]• Towards Better Understanding of Black-box Auto-Tuning [ATC’18]• Classic Meets Modern: a Pragmatic Learning-Based Congestion Control for the Internet[SIGCOMM 2020]

ACC: Automatic ECN tuning for High-speed
Datacenter Networks
From the networking operational point of view: smart dataplane
1. "zero-configuration” when deploying the network
2. minimize the impact on the tenants at run timebuilding up the network by using the default setting of commodity
devices, while enabling automatic and fine-grained parameters
tuning over volatile datacenter traffic without human intervention.

The challenges of ECN setting
Observation 1: Various traffic patterns demand for adaptive ECN settings.
 Environments: 24 servers with 25 Gbps NICs, 2 ToR switches and 2 Spineswitches connected with 100 Gbps links

The challenges of ECN setting
Observation 2: Existing solutions of static ECN settings do not work well atrun time.

FCT under different DCQCN parameters:
SECN0(DCTCP) :Kmin=Kmax=C×RTT×λ=18KB;
SECN1(DCQCN) :Kmin=5KB,Kmax=200KB;
SECN2(HPCC) :Kmin=100KB,Kmax=400KB
DataMining

WebSearch

The challenges of ECN setting
Observation 3：Parameter tuning is complicated and time consuming

Operator  need expertise  collecting data  adjusting manually  conservative ECN  new application

Need a few weeks or months Automatic ECN tuning Adapt to dynamic traffic Easy to deploy
Don’t need any modification on ECN-based protocols.
Easy to implement in the commodity switches Good performance: Both network-level and applications-level

Basic idea
Tuning ECN dynamically can be considered an Reinforcement Learning (RL)
problem{Kmax ,Kmin, Pmax}

Centralized design vs. Distributed design
Apply a centralized DRL agent like a centralized controller to implement theautomatic ECN tuning.
ManagerServer

Agent

Data Collection &Configuration delivery
AgentAgent
1. Collecting the whole networkswitches states together
2. Inferring ECN actions for different
switch’s ports

Challenges in Centralized Design• Large space of network states and actions• 1K switches and 48 ports in each switch , NF features/switch, 10 values/feature• State: 1048K × 2×NF , Actions: {10 × 10 × 10}96K• Long latency for collecting network state and updating ECN configuration• Model updating：millisecond or seconds• Large bandwidth consumption to collect data.

• ECN tuning period is 100 us and 4 features per queue (4 bytes/feature)
UDP packet to transfer data (46B header),• 5.952MB/100μs = 476Gbps

ACC: multi-agent DRL for ECN tuning
A distributed design:
Each DRL agent observes the local queuing states and chooses an action for ECN setting
independently based on the delay and throughput functions
Agent Agent

Switch

Spine

Agent

Agent

Agent

Agent

Leaf
Agent

Agent

Agent

Agent

Agent

Agent

Pros:
1. dramatically reduce the stateaction space
2. reduces transmission latency
3. avoids inter-device datatransmission.

Simulation study on centralized design
96-host leaf-spine topology with 4 leaf switches and 2 spine switches.

Agent: combine offline and online training
Offline : pre-trained model to speed up the training
Online: Interacts with the environment, adapts to optimize the action.

State/action/reward
State:
 The common features supported by major switch chip vendors
 Also related to network congestion
I. current queuing length (qlen),
II. output data rate for each link (txRate),
III. output rate of ECN marked
IV. packets for each link (txRate(m))

Action:Kmax {1MB, 2MB，5MB，10MB }Kmin
Reward:Mapping function of queue length rewardImplementation
ACC works as a module or container in commodity switch
ACC takes 2400 lines of C codes

Evaluation
 Topology: 2-layer Clos network
 RTT = 2.3us for inner-rack， 6.1us for inter-rack PFC Xoff = α(1 + α) × Bufferfree α=1/8
 NIC : Mellanox CX3/CX5…

SpinesCompare with two static ECN settings
 SECN1: refers to the DCQCN SECN2: refers to the HPCC
Metrics:
 FCT (ave/99%)
 IOPS

100GE

…

ToRs
25GE 25GE

Servers

…

…

…

…

…

Traffic pattern:• RDMA Incast by Perftest• Diff QPs and senders for dynamic traffic• Distributed storage traffic by FIO• Distributed GPU training by Tensorflow

Heterogeneous traffic
 Change numbers of senders and flows every 100s
 Offline training for 4 hours

Thput: 26% higher

Queue: 1~3x lower

Realistic application: ACC performs better
Distributed SSD-storage system

Distributed GPU training system (PS 8servers1ps, P100)~12% Higher~15% Higher~7% Higher~10% Higher

Fairness between RDMA and TCP traffics

TCP and RDMA traffic in DCN
Pangu block storage service
framework [NSDI 2021]

The average throughput of RDMA and TCP traffic over100Gbps network

Large Scale Simulation
 leaf-spine: 288-host, 12 Leafs and 6 Spines.
 Web Search and Data Mining No any offline pre-Training

Variance in short period

Betterlatter• For unseen traffic, ACC causes a high FCT in short time (1 second) and converges to achieve a better
performance than that of static ECN.
• ACC: Good Stability with unseen traffic patternDeep Dive of ACC.

ACC always maintains short queues by adjusting ECN marking threshold based on the state of theenvironment dynamically.

Conclusion• Toward "zero-configuration" to simplify network operation byautomatic in-network optimization.
w/o any modification at end-hostw/o any modification of ECN protocol at switches• ACC achieves good performance network-level measures applications-level metrics

Thanks!
Xiaoliang Wang
waxili@nju.edu.cn
we are always looking for motivated students