360 likes | 503 Views
Online Packet Switching Techniques and algorithms. Yossi Azar Tel Aviv University. Motivation. Current networks are mostly packet-based (Internet) QoS guarantees essential to most network applications Steady traffic increase + constant fluctuation lead to packet loss
E N D
Online Packet Switching Techniques and algorithms Yossi Azar Tel Aviv University
Motivation • Current networks are mostly packet-based (Internet) • QoS guarantees essential to most network applications • Steady traffic increase + constant fluctuation lead to packet loss • Objective: transmit “valuable” packets
Single queue switch B • FIFO queue with bounded capacity (B) • Packets marked with values • One packet transmitted each time step • Objective: maximize total transmitted value 9 7 4
Greedy single queue admission control (preemptive) Algorithm G Accept packets greedily. Packet accepted if: • Queue not full -or- • Packet with smallest value discarded from queue
… … ε ε ε ε B B ε ε ε ε ε ε ε ε 1 1 ε ε B B 1 1 1 1 1 1 Online Greedy is not optimal t = 3 t = 1 t = 2 Same goes on… t=B+2 No more packets arrive G 1 1 1 1 ε 1 ε 1 1 ε 1 ε 1 ε 1 ε ε ε 1 ε ε ε ε ε … ε 1 … 1 B Opt 1 1 1 1 1 1 1 1 ε ε 1 1 … 1 1 … 1 2B
Single queue – results • Upper bound: • [KLMPSS '01] – Greedy is 2-competitive • [KMvS '03] – 1.98-competitive • [BFKMSS '04] – 1.75-competitive • Lower bound: • [AMZ ’03] – 1.41
3 9 m 7 1 4 B … … … … … Multi-Queue QoS switch • m bounded capacity FIFO queues • Single output port, one packet transmitted each time step • Objective: maximize total transmitted value
Multi-queue switch - results • Arbitrary values: • [AR '03] – 4-competitive algorithm • [AR '04] – 3-competitive algorithm • Unit value: • [AR '03] – deterministic 2-competitive randomized 1.58-competitive • [AS '04] – deterministic 1.89 • [AL '04] - deterministic 1.58 ( )
1 1 1 m 1 1 B Special case – unit packets • Model remains the same • All packets have equal (unit) value • Goal: maximize number of transmitted packets • Motivation: IP networks • Better algorithms for this case
Lower bound for unit-value • B=1 • Packet arrives to each queue • As long as ON has at least two full queues: • ON empties some queue • Adversary empties queue not used by ON • New packet arrives to this queue
Lower bound - construction t=1 t=2 t=3 t=4 t=7 ON No more packets arrive X 2 X 3 X 4 OPT X 7 X 2 X 3 X 4
Getting below 2-competitive • “Any” algorithm is 2-competitive • Randomized 1.58-compeititve (AR ‘03) • (Albers+Schmidt ’04): • Any Greedy is at least 2-competitive • First deterministic 1.89 • Deterministic 1.58 (large buffers) (AL ’04) AS 0.Partition into busy periods • If load(max_queue) > B/2 – use max_queue • Otherwise, if there are queues that were never full – use max_queue among them • Otherwise, use max_queue
3 9 m 7 1 4 B … … … … … Multi-Queue QoS switch • m bounded capacity FIFO queues • Single output port, one packet transmitted each time step • Objective: maximize total transmitted value
Single queue admission control Multi-queue scheduling + admission control 4-competitive upper bound • Based on reduction to single-queue • Generic Scheme: (A+Richter ’03) C-competitive 2C-competitive
Model Relaxation • Relaxation: • packets can be transmitted in any order, not only FIFO • preemption allowed • Optimal solution remains unchanged • Relaxation adds considerable strength to online algorithms
Relaxed model – algorithm Relax Algorithm Relax • Admission control: Greedy algorithm (G) in each queue (optimal non-fifo) • Scheduling: Transmit packet with largest value in all queues
Relax demonstration t = 4 t = 3 t = 8 t = 5 t = 2 t = 1 7 4 1 9 2 7 1 4 2 9 1 9 9 1 9 9 9 7 9 9 7 3 7 7 3 7 9 9 7 9 7 4 3 1
Generic Scheme Algorithm M(A) (A – admission control for single queue) • Maintain online simulation of Relax • Admission control: according to A • Scheduling: according to Relax
M(G) - demonstration Relax simulation 9 4 9 9 3 7 9 7 9 3 9 8 8 4 8 4 7 t = 4 t = 1 t = 5 t = 2 t = 3 3 8 9 9 7 3 9 7 9 9 3 9 4 8 4 8 4 8 9
Algorithm Relax - analysis Theorem 1: Relax is 2-competitive in relaxed model. Proof: • Relies on potential function • Based on minimum weighted perfect matching in a graph that measures the distance between the values on Relax and OPT
Algorithm M(A) - analysis Theorem 2: CM(A) ≤ CRelax∙CA = 2∙CA Proof: • Relax is 2-competitive • In each queue we lose a factor of CA compared to non-fifo, by transforming the input sequence
Compact σi: σi : 4 2 7 2 7 4 9 7 9 4 3 1 1 3 1 3 1 3 7 time 2 σ*i : 1 9 7 4 7 1 3 7 2 1 4 1 9 4 3 3 3 7 time
Corollaries • Preemptive: 4-competitive (using KLMPSS ’01) • Unit-value: 2-competitive • 2-values, preemptive: 2.6-comp. (using LP ’02) • Non-preemptive: 2e∙ln(max / min)-competitive (using AMZ ’03)
Zero-One Principle (A+Richter ’04) • Analysis of packets with arbitrary values is complicated • Goal: reduce to “simpler” sequences • Zero-one principle: Comparison-based algorithm (given a network) Sufficient to analyze 0/1 sequences (with arbitrary tie breaking)
Comparison-based algorithms Informally, A is comparison-based if decisions made based on relative order between values Notation: • A(σ) – possible output sequences, ties broken in every possible way • V(σ)– total value of sequence
Zero-one principle Theorem: Let A be comparison-based (deterministic or randomized). A achieves c-approximation if and only if A achieves c-approximation with respect to all 0/1 sequences, for all possible tie breaking
σ: 3 1 5 9 4 3 f3(σ): 1 0 1 1 1 1 f6(σ): 0 0 0 1 0 0 Zero-one principle - proof 1 x ≥ t Define: ft(x) = 0 otherwise
Proof – continued Claim1: Sequence can be broken into sum of 0/1 sequences using ft: Claim 2: For comparison-basedA, sequence σ, and t ≥ 0 :
Claim 2 Claim 1 Claim 1 - 0/1 sequence Putting it all together:
m B Application 1 Algorithm TLH • Admission control:greedy, independently in each queue • Scheduling: Transmit packet with largest value among all packets at head of queues 0/1 principle -> TLH is 3-competitive
. . . . . . . . . 1 1 . . . N N CIOQ switch • N×N switch • Virtual output queues at input ports • Speedup S • Objective: maximize totaltransmittedvalue
Results • General CIOQ switch: • arbitrary packet values • Any speedup • (Kesselman+Rosen ’03): • Linear in speedup -or- • Logarithmic in value range • (A+Richter ’04): • constant-competitive algorithm
Dynamic Routing • All models can be generalized to networks, with switches at the nodes • Line topology • Cycles • Trees • General networks • With / without routing decisions
Example (line) • Dynamic Routing on a line of length k 0/1 principle -> simple alg. is (k+1)-comp. • Greedy is at least k0.5-competitive (AKOR ’03) Example (tree) • Merging trees (KLMP ’03)
Summary • Single queue • Multiple queues • Multiple queues – unit packets • Zero-One principle • CIOQ switch • Networks (e.g. line, tree)
Open problems • Explore connections between different models • General theorems to facilitate analysis • Improve upper bounds of specific problems: • Single-queue switches • Multi-queue switches • Dynamic routing on a line • General networks