SLIDE 1 A Sorted Partitioning Approach to High- speed and Fast-update OpenFlow Classification
Sorrachai Yingchareonthawornchai, James Daly, Alex X. Liu, Eric Torng November 9th, 2016
24th IEEE International Conference on Network Protocols (ICNP 2016) github.com/sorrachai/ParHtonSort
SLIDE 2 Motivation
- SoIware-defined networking:
- Performance boPleneck: lookup process
- OpenFlow places new demands on packet classifiers
- Incremental Update ( ~ 1 microseconds per update)
- Dimensional Scalability ( 5 in tradiHonal, up-to 45 fields in OpenFlow 1.5 and
higher)
- TradiHonal packet classificaHon focus on fast classificaHon
- but not for so fast on update
- Current pracHces (e.g., Open vSwitch) use Tuple Space Search (TSS)
- which has fast update, but slow classificaHon
SLIDE 3 Problem Statement
*Figures from [Pankaj Gupta, et al, Algorithms for Packet ClassificaHon]
New challenges for OpenFlow packet classificaHon, (1) Dynamism of Rules (2) High number of dimensions/fields
SLIDE 4 Related Work
- Decision Trees (HiCuts, HyperCuts, HyperSplit)
- Fast classificaHon, but slow update (rule replicaHon)
- ParHHoning Methods
- Fast update, but slow classificaHon (too many parHHons) (Tuple Space Search)
- Slow update, fast classificaHon (SAX-PAC, Independent Set)
- Decision Trees + ParHHoning (EffiCuts, SmartSplit)
- Slow update
SLIDE 5 Algorithms Classifica0on Update Space Linear Search O(dn) O(d) O(dn) Tuple Space Search O(dT) O(d) O(dn) Decision Trees O(log n) O(n) Ω(n2)
Challenge: achieving both (1) fast packet classificaHon
and (2) fast rule update
d – number of fields n – number of rules T – number of sub-partitions
SLIDE 6 Algorithms Classifica0on Update Space Linear Search O(dn) O(d) O(dn) Tuple Space Search O(dT) O(d) O(dn) Decision Trees O(log n) O(n) Ω(n2) Proposed: ParHHonSort O(dT’+ T’ log n) O(dT’ + T’ log n) O(dn)
d – number of fields n – number of rules T – number of sub-partitions
SLIDE 7
Algorithms Classifica0on Update Space Linear Search O(dn) O(d) O(dn) Tuple Space Search O(dT) O(d) O(dn) Decision Trees O(log n) O(n) Ω(n2) Proposed: ParHHonSort O(dT’+ T’ log n) O(dT’ + T’ log n) O(dn)
fast classificaHon and fast update if T’ is small
SLIDE 8
Current state of the art
1 Classification Time Update Time 2 1 2 3
100
Tuple Space Search Decision Trees
SLIDE 9
Current state of the art
1 Classification Time Update Time 2 1 2 3
100
Decision Trees Proposed Tuple Space Search
SLIDE 10
Proposed Approach
r1 r2 <f … <f rn <f Fast search and update with linear space Define “Sortable” Rules
SLIDE 11
- 1. Ruleset Sortability
- 2. MulH-dimensional Interval Tree
(MITree)
- 3. Sortable Ruleset ParHHoning
- 4. Online ParHHoning
r1 r2 <f
Fast Matching Fast Update Linear Memory Graph Coloring: 1 color, 1 BST Sequence of Intermixed InserHons and DeleHons
PartitionSort
SLIDE 12
Ruleset Sortability: Lexical Field Order Comparison
Defini0on: Rules are sortable if there exists field ordering that has total order Defini0on: Given field order F, rule 1 < rule 2 if on projecHon on F[1] If non-intersecHng, interval 1 < interval 2 If idenHcal, rule 1 < rule2 on projecHon on of next field recursively Else, rule 1 || rule 2
SLIDE 13
Ruleset Sortability: Lexical Field Order Comparison
r1 r2 <XY <XY r3 r1 r2 r3 r1 r2 r1 || r2
X(r2) = X(r3) x y
SLIDE 14
SLIDE 15
SLIDE 16
Sortable Ruleset Partitioning
SLIDE 17 Sortable Ruleset Partitioning
- ObjecHve: minimize number of sortable subsets
- Main Idea:
- repeatedly find the maximal sortable subset
- Challenges:
- d! field ordering!
- Need an efficient algorithm for maximal sortable subset
- Proposed:
- Greedy field selecHon: repeatedly find a field with maximum sortability
- For each unselected field, sortability = number of maximum non-intersecHng intervals
- Pick a field with maximum sortability
SLIDE 18 Example
r1 r2
Selected field: {}
X: r3 r4 r5 r6 r7 r1 Y: r7 r4 r2 r5 r3 r6 (a)
SLIDE 19 Example
r1 r2
Selected field: {}
X: r3 r4 r5 r6 r7 r1 Y: r7 r4 r2 r5 r3 r6
MWIS: 4 MWIS: 3 Partition 1 Partition 2 Discarded
(a)
SLIDE 20 Example
r1 r2
Selected field: {}
X: r3 r4 r5 r6 r7 r1 Y: r7 r4 r2 r5 r3 r6
MWIS: 4 MWIS: 3 Partition 1 Partition 2 Discarded
r1 Y: r7 r2 r6
MWIS: 4 Selected field: x Partition 1 Partition 2 Selected fields: xy with {r1 r2 r7 r6} in total order xy
(a) (b) (c)
SLIDE 21 Properties of GreedyFieldSelection
- Discover “good” field order and
- Find maximal sortable subset simultaneously
- Complexity: O(d2 n log n)
SLIDE 22 Online Sortable Ruleset Partitioning
- How to perform update?
- Given rule r, test for each tree if r can insert
- If not, create a new tree of the rule r
- Problem:
- Number of trees can be large
- Ad-hoc soluHon:
- periodically reparHHon using the previous algorithm
- Not acceptable in OpenFlow packet classificaHon!
SLIDE 23 Online Sortable Ruleset Partitioning
- Proposed SoluHon: Adap(ve Field Ordering
- Given rule r, test for each tree if r can insert
- Once inserted, if tree size is less than T, run sortable parHHoning on this
subset to find a bePer ordering
- This is fast due to small size of tree (T = 10)
- Work in completely online manner
- No need to know a sequence of rules a priori
SLIDE 24 Experimental Results
- Compare with SmartSplit, TupleSpace, SAX-PAC
- ClassificaHon Time, Update Time, Memory usage, ConstrucHon Time
- Internal comparison: Offline vs. Online ParHHon
- Run over 500 rulesets consisHng of ACL, FW, IPC from ClassBench
- Ranging number from 1k,2k,4k,8k,16k,32k,64k
- Ranging dimensions from 5,10,15,20
- Each size has mulHple of 5 rulesets
- Classify 1m packets, update 1m intermixed requests
- We run online construcHon by default
SLIDE 25
SLIDE 26
On average, ParHHonSort is 7.2x faster on classificaHon, but 1.7x slower on update On average, ParHHonSort can classify 4.5 Mpps with 0.65 microsecond update Hme
SLIDE 27
SLIDE 28
SLIDE 29
Conclusion
1 Classification Time Update Time 2 1 2 3
100
SmartSplit PartitionSort Tuple Space Search
SLIDE 30 Final Note
- ParHHonSort is available on Github
- SimulaHon and benchmark are available including implementaHons of
- ther packet classifiers
- Packet generator (by Classbench API)
- Rule generator (by Classbench API)
- Packet ClassificaHon Simulator (New)
- You can implement your own packet classifier and compare!
- QuesHons?
hPps://github.com/sorrachai/ParHtonSort
SLIDE 31
Appendix
SLIDE 32
PartitionSort vs. SaxPac
SLIDE 33