snu inc lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

32
22年 6年 20年 SNU INC Lab SNU INC Lab 고고 packet processing 고고 年 年 年

Upload: roger-holland

Post on 30-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

고속 packet processing 기술

김 종 권

Page 2: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Contents Introduction

Forwarding engine 현재의 IP 패킷 처리 방법

Router 에의 QoS 기능 추가 Packet filtering(classification) Scheduling algorithms

Open problems Summary

Page 3: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Common Architecture

Page 4: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

FE 의 기능 Input

IP header Inbound MAC header 의 일부

Output MAC header info Outbound interface Outbound next hop

Performance FE module 의 성능 = 전체 system 의 성능 Pipelining

한 packet 의 header 를 처리하는 동안 다음 packet 의 header load

Page 5: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

FE 알고리즘 병렬화 문제점

Route lookup 후에만 TTL = 1/0 인 packet 을 폐기한다 . Route lookup 후에만 header 를 갱신하다 .

1. Error Check Lengths Version Martians Checksum TTL

2. Route Lookup Cache Full

3. Header Update TTL Checksum Link Layer

header Fragmentation

IP 전송의 세 부분

Page 6: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Router 의 IP Packet 처리 방법 Packet 도착

Link level processing (CRC check 등 )

Link 정보를 IP 에 제공 Header 확인

IP header checksum, version, header length 등 확인 주소 확인

Link-layer 주소와 의미가 일치하는 지 확인 Router 를 위한 packet 결정

Router 를 위한 packet 은 다르게 처리된다 .

Router 를 위한 packet 의 목적지 주소

Page 7: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Router 의 구조

Fig. Integrated services architecture implemented in router

Page 8: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Queueing Disciplines Packet filtering(Classification)

Map each arriving packet into one of classes Proposed algorithm (SIGCOMM ‘98)

“Fast and Scalable Layer Four Switching” Washington University V. Srinivasan, G. Varghese, S. Suri, M. Waldvogel

“High Speed Policy-based Packet Forwarding Using Efficient Multi-dimensional Range Matching”

Bell Labs T. V. Lakshman, D. Stiliadis

Scheduling 어떤 순서로 packet 들을 서비스 할 것인가 ? Desired link sharing 고려

Page 9: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Wash Univ Algo (1/ 3) Grid-of-tries

Two-dimensional filters

Page 10: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Wash Univ Algo (2/ 3) Cross-Producting

각 Field 별로 따로 검색하여 , cross-product table 의 hash table 을 lookup

Memory explosion problem

Page 11: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Wash Univ Algo (3/ 3) Comparison

Grid-of-tries Destination-source prefix filter 에만 적용 가능

On-demand cross-producting 임의의 filter 에 적용 가능 Cache miss 때문에 speed 를 예상하기 어렵다 .

Grid-of-tries 와 Cross-producting 의 혼합 Grid-of-tries

Destination-source filters On-demand cross-producting

나머지 filters

Page 12: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Bell-Lab Algo (1/ 3) Point location problem in multidimensional space

Given a point in a d-dimensional space, and a set of n d-dimensional objects,

Preprocessing 각 dimension 마다 생기는 interval 을 계산한다 . 각 interval 을 포함하는 filter 들을 계산한다 .

Packet classification Packet 의 각 차원 별로 어느 interval 에 속하는지

계산한다 . 각 interval 을 포함하는 filter 들의 교집합을 구한다 . 가장 우선 순위가 높은 filter 를 사용한다 .

Page 13: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Bell-Lab Algo (2/ 3) 2-dimension 인 경우의 예

4

32

1P 1

Y6

Y5

Y3

Y2

Y1

X1 X2 X3 X5 X6X4

0 0 1 0

0 1 1 0

1 1 1 1

1 0 1 1

Y4

1 0 0 1

1 0 0 0

1 2 3 4

1000

1100

1101

1011

1010

1000

4321

Page 14: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Bell-Lab Algo (3/ 3) Hardware Implementation

Integer comparator, counter AND operation n 번의 binary search n 개의 값에 대한 AND 연산

Page 15: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Scheduling 필요성

Page 16: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Weighted Fair Queueing 특징

GPS simulation(Packet GPS) Variable-size packets

Algorithm GPS 를 simulation 하여 그 결과에 따라 service 순서

결정 Finish number

GPS 에서 packet 의 finishing time

)i(

)t,k,i(P)t(R),t,k,i(Fmax)t,k,i(F

}1{

Page 17: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

WFQ - Evaluation Evaluation

GPS scheduling 에 비해 maximum packet size 보다는 늦게 전송되지 않는다는 것을 보장

Isolation 보장 최대 지연은 다른 connection 의 behavior 에 영향 받지 않는다

.

Problem Expensive and complex to implement O(N)

Page 18: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Virtual Clock Real time 사용

Time complexity Virtual time 계산 : O(1) Sorting: O(log N)

단점 Unbounded unfairness

)i(

)t,k,i(P),t,k,i(Fmax)t,k,i(F

time} real1{

Page 19: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Self-Clocked Fair Queueing 현재 서비스 중인 packet 의 finish number 를

system 의 virtual time 으로 사용 .

Time complexity Virtual time 계산 : O(1) Sorting: O(log N)

단점 End-to-end delay bound N Unfair over short time scales

)i(

)t,k,i(P),t,k,i(Fmax)t,k,i(F

CF}1{

Page 20: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Weighted Round-Robin Weighted round-robin

Different weight Different size

Divide each connection’s weight by its mean packet size to obtain a normalized set of weights.

단점 Source’s packet size may be unpredictable.

Source cannot predict its mean packet size. Fair only over time scales longer than a round time.

If a connection has a small weight, or the number of connections is large, this may lead to long periods of unfairness.

Good in high speed network like ATM

Page 21: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Deficit Round-Robin DRR can handle variable packet size without knowing

the mean packet size.

1500

800

1200

2000 1000

SecondRound

FirstRound

Head ofQueue

A

B

C

0Quantum size : 1000 byte

1st Round A’s count : 1000 B’s count : 200 (served) C’s count : 1000

2nd Round A’s count : 500 (served) B’s count : 0 C’s count : 800 (served)

Page 22: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Frame-based Fair Queueing Potential function 사용 Re-calibration periodically Fairness 보장

Bounded period system potential update

Bounded discrepancy

Page 23: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Leap Forward Virtual Clock 두개의 priority queue 사용

H: Priority Queue of ActiveWell-behaved Flows

L: Holding Area for Active Oversubscribed Flows

Transfer beforea packet can

miss its deadline.

Transfer whena flow becomesoversubscribed.

Service Packetwith Lowest

tag in H

Page 24: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

LFVC Implementation & Evaluation Implementation

van Emde Boas Data Structure 사용 O(loglog N)

Evaluation Data Structure 가 H/W 로 구현하기에는 너무 복잡하다 . Worst case 에는 L 에서 H 로 옮겨야 하는 packet 이 N

개일 수 있다 .

Page 25: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Discrete-rate Approach Per-rate queueing for ATM

같은 rate 를 갖는 session 들을 하나로 묶어 macro-session 형성

Two-level hierarchical scheduler First level: GPS-related scheduler

각 macro-session 의 output-link access 관리 Second level: Round-robin fashion

각 session 에 rate 분배

Page 26: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

H/W Implementation Calendar queue 사용

Page 27: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Core-Stateless Fair Queueing Core-Stateless architecture

Edge nodes: do perform per flow management Core nodes: do not perform per flow management

Page 28: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

CSFQ Algorithm Edge router

Maintain per flow state Estimate the incoming rate Label the packet

Core router Maintain no per flow state FIFO packet scheduling with probabilistic dropping algorithm

Drop each packet with prob. P(= max{0, }) Update packet label to min{ , }r r

1

r

Page 29: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Open Problems - by Keshav Flow Identification

Fast classification algorithm, efficient flow descriptors

Resource Reservation Efficient flow classifiers, good policing

Ease of Configuration Configuration tools

Stability of Large Systems Stability of router software

Accountability Pricing

Page 30: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

Summary Current research issues

Table lookup QoS

Open problems

Page 31: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

References “Fast and Scalable Layer Four Switching”, V.

Srinivasan, G. Varghese, S. Suri, M. Waldvogel, SIGCOMM’98. “High Speed Policy-based Packet Forwarding Using

Efficient Multi-dimensional Range Matching”, T. V. Lakshman, D. Stiliadis, SIGCOMM’98.

“Efficient Fair-Queueing Algorithms for Packet-Switched Networks”, D. Stiliadis, A. Varma, Trans. on Net., Apr. 1998.

“Hardware Implementation of Fair Queueing Algorithms for Asynchronous Transfer Mode Networks”, A. Varma, D. Stiliadis, IEEE Comm., Dec. 1997.

Page 32: SNU INC Lab 2015-10-05 고속 packet processing 기술 김 종 권김 종 권

23年 4月 19日 SNU INC LabSNU INC Lab

References “Leap Forward Virtual Clock: A New Fair Queuing

Scheme with Guaranteed Delays and Throughput Fairness”, S. Suri, G. Varghese, G. Chandranmenon, INFOCOM’97.

“High Speed, Scalable, and Accurate Implementation of Packet Fair Queueing Algorithms in ATM Networks”, J. Bennett, D. Stephens, H. Zhang, ICNP’97.

“Implementing Fair Queueing in ATM Switches: The Discrete-Rate Approach”, F. Chiussi, Andrea Francini, INFOCOM’98.

“Core-Stateless Fair Queueing: Achieving Approximately Fair Bandwidth Allocations in High Speed Networks”, I. Stoica, S. Shenker, H. Zhang, SIGCOMM’98.