Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
EdgeBalance: Model-Based Load Balancing for Network Edge Data Planes
Wei Zhang†, Abhigyan Sharma*, Timothy Wood†
†George Washington University*AT&T Labs Research
1
Wei Zhang
Outline• Background and Motivation
• EdgeBalance Design
• Environment Setup and Evaluation
• Conclusion
•
2
Wei Zhang
Network Edge Computing
3
User Plane
• Current
Control Plane
Wei Zhang
Network Edge Computing
4
User Plane
Control Plane
User Plane
User Plane
User Plane
User Plane
• Current
• 5G Edge Control Plane
Wei Zhang
Network Edge Computing
5
User Plane
Control Plane
User Plane
User Plane
User Plane
User Plane
• Current
• 5G Edge
User plane more distributedMore network services can be pushed into edge
Control Plane
Wei Zhang
Edge Computing runs NFs• Network services comprise of chains
6
Wei Zhang
Edge Computing runs NFs• Replicated NF chains require a load balancer
7
Wei Zhang
Cloud Load Balancer• Homogeneous services, static policies • Google Maglev • Microsoft Ananta • Facebook Mcrouter • Twitter TwemProxy • ……
8
Web
Web
Web
Memcached
Memcached
Memcached
Memcached
Wei Zhang
Cloud Load Balancer• Homogeneous services, static policies • Google Maglev • Microsoft Ananta • Facebook Mcrouter • Twitter TwemProxy • ……
9
Web
Web
Web
Memcached
Memcached
VPN Snort FW
VPN Snort FW
VPN Snort FW
LB for NF Chains
Memcached
Memcached
Wei Zhang
Bidirectional Affinity• Forward and reverse flows are required to pass through the same set of network functions
10
Update header
Client ServerLoad Balancer
NF NF NF NF
Client Server
Wei Zhang
Static LB is not enough• Dynamic server resources • Dynamic service chains • Dynamic workloads
11
NF1 NF2 NF3
NF4 NF5
NF1
NF6
NF6
Different Length of NF Chains
Proc
essi
ng C
ost
0
25
50
75
100
NF1 NF2 NF3 NF4 NF5 NF6
Different Processing Cost of NFs
Wei Zhang
Challenges for Dynamic LB
12
• Fine-grained metrics are required for dynamic load balancing • Real time CPU monitoring is • Impossible for poll mode NFs
• May have stale data
• Increases system overhead
CPU
Usa
ge
0
25
50
75
100
0 20 40 60 80 100 120
Wei Zhang
Outline• Background and Motivation
• EdgeBalance Design
• Environment Setup and Evaluation
• Conclusion
•
13
Wei Zhang
EdgeBalance1. Bidirectional affinity 2. Accurate CPU prediction
14
3. Dynamic load balancing 4. High performance
Client
ServerLoad Balancer
NF NF
Client
ServerFlow 1 (purple) Host 1, Core 2, Chain2
Flow 2 (yellow) Host 2, Core 2, Chain2
Chain 2Host 1, Core 2
Host 2, Core 2Host1C1 C2
NF NFChain1 Chain2
NF NF
Host2C1 C2
NF NFChain1 Chain2
Rule
Flow Table
Wei Zhang
Bidirectional Affinity
15
• Add forward flow and reverse flow into forward table and reverse table
5 Tuple NF Chains
<srcIP1, dstIP1, udp, srcPort1, dstPort1> NF11->NF21->NF31
<srcIP2, dstIP2, tcp, srcPort2, dstPort2> NF12->NF22->NF32Forward Table
Reverse Table
NF11
5 Tuple NF Chains
<dstIP1, srcIP1, udp, dstPort11, srcPort1> NF11->NF21->NF31
<dstIP2, srcIP2, tcp, dstPort2, srcPort2> NF12->NF22->NF32
NF21 NF31
NF12 NF22 NF32 Flow2
Flow1
Update dst port
Wei Zhang
Bidirectional Affinity
16
• Remove forward flow and reverse flow from forward table and reverse table
5 Tuple NF Chains
<srcIP1, dstIP1, udp, srcPort1, dstPort1> NF11->NF21->NF31
Forward Table
Reverse Table
NF11
5 Tuple NF Chains
<dstIP1, srcIP1, udp, dstPort11, srcPort1> NF11->NF21->NF31
NF21 NF31
NF12 NF22 NF32
Flow1
Wei Zhang
Accurate CPU Prediction
17
• Model to predict CPU usage
• Chain processing cost
• The number of flows
• Flow rate
NF1 NF2 NF3
Core
NF4 NF5 NF6
NF7 NF8 NF9
Wei Zhang
Accurate CPU Prediction
18
• Model to predict CPU usage
• Chain processing cost
• The number of flows
• Flow rate
NF1 NF2 NF3
Core
NF4 NF5 NF6
NF7 NF8 NF9
<hostID, coreID, chainID> Stats (bits, packets)
<host1, core1, chain1> xx, yy
Pr edict _CPUijk = Costijkk=1
n
∑ *Rateijki: host Ij: core jk: number of chains
Wei Zhang
Dynamic Load Balancing
19
• Balance the load across the hosts and cores • PID controller for LB weight setting
- Seeks to equalize load on hosts and cores
- Uses local information for feedback
Host1
C1 CM
Weight?
…
Hostk
C1 CN…Controller Target system:
Evenly CPU usage
Average_PCPUDiff_PCPU_i
Weight_iDisturbance
PCPU_i
-
Wei Zhang
High Performance
20
• DPDK high network IO • Multi-threads
- RSS dispatch flows to cores • Lockless flow table
- Per-core flow table
- Cleanup on the same thread Kernel Space
User Space
Core1 Core1
NIC RSS
Flow Table Flow Table
Wei Zhang
Outline• Background and Motivation
• EdgeBalance Design
• Environment Setup and Evaluation
• Conclusion
•
21
Wei Zhang
Experiment Setup
22
• Cloudlab c220g5 specs • DPDK 18.02 • Ubuntu 14.04 • Packet generator
- Pktgen-DPDK
- Cisco Trex • Bess runs NFs
EdgeBalance
Pktgen-DPDK Cisco-Trex
Bess
NF1 NF2 NF3
Bess
NF1 NF2 NF3
Wei Zhang
Evaluation: Prediction Accuracy
23
• Accuracy of model-based CPU use prediction
0102030405060708090100
180 300 700 1400 1850
CPU
Usage
(%)
Processing cost of NF chain (ns)
Measured CPUPredicted CPU
Wei Zhang
Evaluation: Outperform
24
• A workload with a mix of elephant and mice flows • EdgeBalance outperforms static and monitor-based LBs
02004006008001000120014001600
0 5 10 15 20 25 30 35 40 45 50
Throughput(Mbps)
Elephant traffc ratio (%)
Static WRRMonitor
EdgeBalace050100150200250300350400
0 5 10 15 20 25 30 35 40 45 50
Latency(us)
Elephant traffc ratio (%)
Static WRRMonitor
EdgeBalace
Wei Zhang
Conclusions• EdgeBalance aims to balance the load for network service chains at edge • Network edge has unique challenges
➡Limited resources ➡Heterogeniety ➡Affinity due to stateful network functions
• Bidirectional flow affinity ➡ Forward flow and reverse flow go through the same set of NFs
• Dynamic load balance ➡Accurately predict CPU load ➡Dynamically adjust allocation weight with PID controller to balance CPU load across hosts
25