DOI QR코드

DOI QR Code

멀티코어 시스템에서 흐름 수준 병렬처리에 기반한 리눅스 TCP/IP 스택의 성능 개선

A Performance Improvement of Linux TCP/IP Stack based on Flow-Level Parallelism in a Multi-Core System

  • 권희웅 (숭실대학교 정보통신전자공학부) ;
  • 정형진 (숭실대학교 정보통신전자공학부) ;
  • 곽후근 (숭실대학교 정보통신전자공학부) ;
  • 김영종 (숭실대학교 정보통신전자공학부) ;
  • 정규식 (숭실대학교 정보통신전자공학부)
  • 발행 : 2009.04.30

초록

최근 멀티코어가 장착된 시스템이 증가하면서 이를 통한 애플리케이션 성능향상에 대한 노력이 계속 되어왔다. 하나의 시스템에 다수의 처리장치가 존재함으로 인해 프로세싱 파워는 기존보다 증가했지만 기존의 소프트웨어나 하드웨어들은 싱글코어 시스템에 적합하게 설계된 경우가 많아 멀티코어의 이점을 충분히 활용하지 못하고 있는 경우가 많다. 기존의 많은 소프트웨어들은 멀티코어 상에서 공유 자원에 대한 병목현상과 비효율적인 캐시 메모리 사용으로 인하여 충분한 성능향상을 기대하기 어려우며 이러한 문제점들로 인하여 기존 소프트웨어는 코어의 개수에 비례한 성능을 얻지 못하며, 최악의 경우 오히려 감소될 수 있다. 본 논문에서는 TCP/IP를 사용하는 기존의 네트워크 애플리케이션과 운영체제에 흐름 수준 병렬처리 기법을 적용하여 성능을 증가 시킬 수 있는 방법을 제안한다. 제안된 방식은 개별 코어단위로 네트워크 애플리케이션, 운영체제의 TCP/IP 스택, 디바이스 드라이버, 네트워크 인터페이스가 서로 간섭 없이 작동할 수 있는 환경을 구성하며, L2 스위치를 통해 각 코어 단위로 트래픽을 분산하는 방법을 적용하였다. 이를 통해 각 코어 간에 애플리케이션의 데이터 및 자료구조, 소켓, 디바이스 드라이버, 네트워크 인터페이스의 공유를 최소화하여, 각 코어간의 자원을 차지하기 위한 경쟁을 최소화하고 캐시 히트율을 증가시킨다. 이를 통하여 8개의 멀티코어를 사용하였을 경우 네트워크 접속속도와 대역폭이 코어의 개수에 따라 선형적으로 증가함을 실험을 통해 입증하였다.

With increasing multicore system, much effort has been put on the performance improvement of its application. Because multicore system has multiple processing devices in one system, its processing power increases compared to the single core system. However in many cases the advantages of multicore can not be exploited fully because the existing software and hardware were designed to be suitable for single core. When the existing software runs on multicore, its performance improvement is limited by the bottleneck of sharing resources and the inefficient use of cache memory on multicore. Therefore, according as the number of core increases, it doesn't show performance improvement and shows performance drop in the worst case. In this paper we propose a method of performance improvement of multicore system by applying Flow-Level Parallelism to the existing TCP/IP network application and operating system. The proposed method sets up the execution environment so that each core unit operates independently as much as possible in network application, TCP/IP stack on operating system, device driver, and network interface. Moreover it distributes network traffics to each core unit through L2 switch. The proposed method allows to minimize the sharing of application data, data structure, socket, device driver, and network interface between each core. Also it allows to minimize the competition among cores to take resources and increase the hit ratio of cache. We implemented the proposed methods with 8 core system and performed experiment. Experimental results show that network access speed and bandwidth increase linearly according to the number of core.

키워드

참고문헌

  1. T. Tian and C-P Shih, 'Software Techniques for Shared-Cache Multi-Core Systems', Intel Software Network, http://softwarecommunity.intel.com/articles/eng/2760.htm
  2. Intel${(R)}$ white paper, Supra-linear Packet Processing Performance with Intel${(R)}$ Multi-core Processors,' www.intel.com/technology/advanced_comm/311566.htm, 2006
  3. Intel${(R)}$ Excecutive Summary, 'Accelerating Security Applications with Intel${(R)}$ Multi-core Processors', www.intel.com/technology/advanced_comm/314312.htm, 2006
  4. E. Lemoine, C. Pham and L. Lef`evre, 'Packet Classification in the NIC forImproved SMP-based Internet Servers', IEEE Proceedings of the InternationalConference on Networking (ICN 2004),Guadeloupe, French Caribbean, Feb., 2004
  5. Yi, Z. and Waskiewicz, P.J., 2007. Enabling Linux Network Support of Hardware Multiqueue Devices. Proc. of 2007 Linux Symposium, Ottawa, Canada, June, 2007, 305-310
  6. A. Muir and J.Smith. 'AsyMOS: An asymmetric multiprocessor OS', In Proc. of OPENARCH'98, 25-34, April, 1988
  7. G. Regnier, D.Minturn, G. McApline, V. Saletore, A.Foong. 'ETA: Experience with an Intel Xeon Processor as a Packet Processing Engine', IEEE Micro, Jan., 2004 https://doi.org/10.1109/MM.2004.1268989
  8. Bryan Veal, Annie Foong, 'Performance Scalability of a Multi-core Web Server', ANCS 2007 https://doi.org/10.1145/1323548.1323562
  9. IRQ affinity, http://www.kernel.org/doc/Documentation/IRQ-affinity.txt, Linux Kernel Documentation
  10. Annie Foong, Jason Fung, Donald Newell, Seth Abraham, Peggy Irelan, Alex Lopez-Estrada: Architectural Characterization of Processor Affinity in Network Processing. ISPASS 2005: 207-218 https://doi.org/10.1109/ISPASS.2005.1430575
  11. Christian Benvenuti, Chapter 10 Frame Receptions, Understanding Linux Network Internals, O'Reilly &Associates, 2005
  12. Paul E. McKenney. RCU vs. locking performance on different CPUs. Inlinux.conf.au, Adelaide, Australia, January, 2004
  13. M. Bjorkman and P.Gunningberg. Locking effects in multiprocessor implementation of protocols. In Proc. ACM SIGCOMM '93 Conference, pages 74-83, October, 1993 https://doi.org/10.1145/166237.166245
  14. bonding driver, http://www.kernel.org/doc/Documentation/networking/bonding.txt
  15. Link Aggregation, http://standards.ieee.org/reading/ieee/std_public/new_desc/lanman/restricted/802.3ad-2000.html
  16. Process Affinity, http://www.kernel.org/doc/man-pages/online/pages/man2/sched_ getaffinity.2.html
  17. Lighttpd, http://www.lighttpd.net/
  18. apache bench, http://httpd.apache.org/docs/2.0/programs/ab.html
  19. vtune, http://www.intel.com/cd/software/products/asmona/eng/239144.htm

피인용 문헌

  1. A Performance Improvement of Linux TCP Networking by Data Structure Reuse vol.3, pp.8, 2014, https://doi.org/10.3745/KTCCS.2014.3.8.261