edgebalance: model-based load balancing for network edge
TRANSCRIPT
![Page 1: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/1.jpg)
EdgeBalance: Model-Based Load Balancing for Network Edge Data Planes
Wei Zhang†, Abhigyan Sharma*, Timothy Wood†
†George Washington University*AT&T Labs Research
1
![Page 2: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/2.jpg)
Wei Zhang
Outline• Background and Motivation
• EdgeBalance Design
• Environment Setup and Evaluation
• Conclusion
•
2
![Page 3: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/3.jpg)
Wei Zhang
Network Edge Computing
3
User Plane
• Current
Control Plane
![Page 4: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/4.jpg)
Wei Zhang
Network Edge Computing
4
User Plane
Control Plane
User Plane
User Plane
User Plane
User Plane
• Current
• 5G Edge Control Plane
![Page 5: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/5.jpg)
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
![Page 6: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/6.jpg)
Wei Zhang
Edge Computing runs NFs• Network services comprise of chains
6
![Page 7: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/7.jpg)
Wei Zhang
Edge Computing runs NFs• Replicated NF chains require a load balancer
7
![Page 8: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/8.jpg)
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
![Page 9: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/9.jpg)
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
![Page 10: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/10.jpg)
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
![Page 11: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/11.jpg)
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
![Page 12: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/12.jpg)
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
![Page 13: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/13.jpg)
Wei Zhang
Outline• Background and Motivation
• EdgeBalance Design
• Environment Setup and Evaluation
• Conclusion
•
13
![Page 14: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/14.jpg)
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
![Page 15: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/15.jpg)
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
![Page 16: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/16.jpg)
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
![Page 17: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/17.jpg)
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
![Page 18: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/18.jpg)
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
![Page 19: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/19.jpg)
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
-
![Page 20: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/20.jpg)
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
![Page 21: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/21.jpg)
Wei Zhang
Outline• Background and Motivation
• EdgeBalance Design
• Environment Setup and Evaluation
• Conclusion
•
21
![Page 22: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/22.jpg)
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
![Page 23: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/23.jpg)
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
![Page 24: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/24.jpg)
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
![Page 25: EdgeBalance: Model-Based Load Balancing for Network Edge](https://reader031.vdocument.in/reader031/viewer/2022020623/61f22b04ae106b06641dfaad/html5/thumbnails/25.jpg)
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