SNU INC Lab 고속 packet processing 기술 김 종 권김 종 권
SNU INC Lab Contents Introduction Forwarding engine 현재의 IP 패킷 처리 방법 Router 에의 QoS 기능 추가 Packet filtering(classification) Scheduling algorithms Open problems Summary
SNU INC Lab Common Architecture
SNU 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
SNU 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 전송의 세 부분
SNU 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 의 목적지 주소
SNU INC Lab Router 의 구조 Fig. Integrated services architecture implemented in router
SNU 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 고려
SNU INC Lab Wash Univ Algo (1/ 3) Grid-of-tries Two-dimensional filters
SNU INC Lab Wash Univ Algo (2/ 3) Cross-Producting 각 Field 별로 따로 검색하여, cross-product table 의 hash table 을 lookup Memory explosion problem
SNU 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
SNU 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 를 사용한다.
SNU INC Lab Bell-Lab Algo (2/ 3) 2-dimension 인 경우의 예
SNU INC Lab Bell-Lab Algo (3/ 3) Hardware Implementation Integer comparator, counter AND operation n 번의 binary search n 개의 값에 대한 AND 연산
SNU INC Lab Scheduling 필요성
SNU INC Lab Weighted Fair Queueing 특징 GPS simulation(Packet GPS) Variable-size packets Algorithm GPS 를 simulation 하여 그 결과에 따라 service 순서 결정 Finish number GPS 에서 packet 의 finishing time
SNU INC Lab WFQ - Evaluation Evaluation GPS scheduling 에 비해 maximum packet size 보다는 늦게 전송되지 않는다는 것을 보장 Isolation 보장 최대 지연은 다른 connection 의 behavior 에 영향 받지 않는다. Problem Expensive and complex to implement O(N)
SNU INC Lab Virtual Clock Real time 사용 Time complexity Virtual time 계산 : O(1) Sorting: O(log N) 단점 Unbounded unfairness
SNU 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
SNU 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
SNU INC Lab Deficit Round-Robin DRR can handle variable packet size without knowing the mean packet size Second Round First Round Head of Queue A B C 0 Quantum 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)
SNU INC Lab Frame-based Fair Queueing Potential function 사용 Re-calibration periodically Fairness 보장 Bounded period system potential update Bounded discrepancy
SNU INC Lab Leap Forward Virtual Clock 두개의 priority queue 사용 H: Priority Queue of Active Well-behaved Flows L: Holding Area for Active Oversubscribed Flows Transfer before a packet can miss its deadline. Transfer when a flow becomes oversubscribed. Service Packet with Lowest tag in H
SNU 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 개일 수 있다.
SNU 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 분배
SNU INC Lab H/W Implementation Calendar queue 사용
SNU INC Lab Core-Stateless Fair Queueing Core-Stateless architecture Edge nodes: do perform per flow management Core nodes: do not perform per flow management
SNU 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{, }
SNU 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
SNU INC Lab Summary Current research issues Table lookup QoS Open problems
SNU 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 “Hardware Implementation of Fair Queueing Algorithms for Asynchronous Transfer Mode Networks”, A. Varma, D. Stiliadis, IEEE Comm., Dec
SNU 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.