DOI QR코드

DOI QR Code

A Performance Improvement of Linux TCP Networking by Data Structure Reuse

자료 구조 재사용을 이용한 리눅스 TCP 네트워킹 성능 개선

  • 김석구 (숭실대학교 정보통신공학과) ;
  • 정규식 (숭실대학교 정보통신전자공학부)
  • Received : 2014.01.02
  • Accepted : 2014.07.09
  • Published : 2014.08.31

Abstract

As Internet traffic increases recently, much effort has been put on improving the performance of a web server. In addition to hardware side solutions such as replacement by high-end hardware or expansion of the number of servers, there are software side solutions to improve performance. Recent studies on these software side solutions have been actively performed. In this paper, we identify performance degradation problems occurring in a conventional TCP networking reception process and propose a way to solve them. We improve performance by combining three kinds of existing methods for Linux Networking Performance Improvement and two kinds of newly proposed methods in this paper. The three existing methods include 1) an allocation method of a packet flow to a core in a multi-core environment, 2) ITR(Interrupt Throttle Rate) method to control excessive interrupt requests, and 3) sk_buff data structure recycling. The two newly proposed methods are fd data structure recycling and epoll_event data structure recycling. Through experiments in a web server environment, we verify the effect of our two proposed methods and its combination with the three existing methods for performance improvement, respectively. We use three kinds of web servers: a simple web server, Lighttpd generally used in Linux, and Apache. In a simple web server environment, fd data structure recycling and epoll_event data structure recycling bring out performance improvement by about 7 % and 6%, respectively. If they are combined with the three existing methods, performance is improved by up to 40% in total. In a Lighttpd and an Apache web server environment, the combination of five methods brings out performance improvement by up to 36% and 20% in total, respectively.

최근 인터넷 트래픽이 증가하면서 웹 서버의 성능 향상에 많은 노력들을 기울여왔다. 고사양 하드웨어로의 교체 또는 서버 수의 증설과 같은 하드웨어 측면 해결방법 외에 소프트웨어 측면의 해결 방법들이 있는데 최근 이에 대한 연구들이 활발히 진행되고 있다. 본 논문에서는 기존 TCP 네트워킹 수신과정에서 발생하는 성능 저하 문제점들을 파악하고 이를 해결할 수 있는 방법을 제안한다. 리눅스 TCP 네트워킹 성능 개선에 관한 기존 방법 세 가지와 본 논문에서 새로 제안하는 두 가지 방법을 통합 적용하여 성능을 향상시킨다. 기존 개선 방법들로는 멀티코어 환경에서 패킷을 흐름단위로 코어에 할당하는 방법, 과도한 인터럽트 요청을 조절하는 ITR(Interrupt Throttle Rate) 방법, sk_buff 자료구조 recycling 방법이다. 본 논문에서 새로 제안하는 방법은 fd 자료구조 recycling 방법과 epoll_event 자료구조 recycling 방법이다. 웹 서버 환경에서 실험을 통해 본 논문의 제안방법들의 성능 개선효과, 또한 기존방법들과의 통합 적용했을 경우 성능 개선효과를 검증한다. 웹 서버로는 간단한 웹 서버, 리눅스에서 일반적으로 사용하는 Lighttpd와 Apache 웹 서버를 사용한다. 간단한 웹 서버 환경에서 본 논문에서 제안한 fd 재사용과 epoll_event 재사용을 적용할 경우 성능이 각각 7%와 6% 개선되고, 이 두 가지 방법을 기존의 세 가지 방법과 통합하여 적용한 경우 성능이 총 40%까지 개선된다. Lighttpd와 Apache 웹 서버 환경에서 다섯 가지 통합 방법을 적용한 경우 성능이 각각 총 36%, 20%까지 개선된다.

Keywords

References

  1. Wenji Wu, Phil DeMar, and Matt Crawford, "A Transport-Friendly NIC for Multicore / Multiprocessor Systems", IEEE Transaction on Parallel and Distributed Systems, Vol.23, No.4, pp.607-615, Apr., 2012. https://doi.org/10.1109/TPDS.2011.195
  2. H. Kwon, H. Jung, H. Kwak, K. Chung, and Y. Kim, "Performance Improvement of Linux TCP Networking based on Flow-Level Parallelism in a Multi-Core System", The KIPS Transaction: Part A, Vol.16, No.2, pp.113-124, 2011. https://doi.org/10.3745/KIPSTA.2009.16-A.2.113
  3. S. J. Baek and J. M. Choi, "Internal structure of the Linux kernel", Gyohaksa, Korea, pp.230-231, 2008.
  4. Intel, "Interrupt Moderation Using Intel Gigabit Ethernet Controllers", April 2007, [Internet], http://www.intel.com/content/dam/doc/application-note/gbe-controllers-interrupt-moderation-appl-note.pdf
  5. Intel whitepaper, "Supra-linear Packet Processing Performance With Intel Multi-core Processors", 2006, [Internet], http://www.intel.com/content/www/us/en/intelligent-systems/intel-technology/multicore-supra-linear-packet-processing-paper.html
  6. Intel Executive Summary, "Accelerating Security Applications With Intel Multi-core Processors", 2006, [Internet], http://www.intel.in/content/dam/www/public/us/en/documents/technology-briefs/multi-core-processors-security-brief.pdf
  7. E. Lemoine, C. Phamand, and L. Lefevre, "Packet Classification in the NIC for Improved SMP-based Internet Servers", IEEE Proceedings of the International Conference on Networking(ICN 2004), Guadeloupe, French Caribbean, Feb., 2004.
  8. Linux Base Driver for the Intel(R) Ethernet 10 Gigabit PCI Express Family of Adapters, [Internet], http://downloadmirror.intel.com/14687/eng/readme.txt
  9. C. Walravens, "Receive Descriptor Recycling for Small Packet High Speed Ethernet Traffic", Electrotechnical Conference, MELECON 2006, IEEE Mediterranean, pp.1252-1256, 2006.
  10. R. Bolla and R. Bruschi, "A high-end Linux based Open Router for IP QoS networks: tuning and performance analysis with internal (profiling) and external measurement tools of the packet forwarding capabilities", Proc. of the 3rd International Workshop on Internet Performance, Simulation, Monitoring and Measurements(IPS MoMe 2005), Warsaw, Poland, Mar., 2005.
  11. apachebench, [Internet], http://httpd.apache.org/docs/2.0/programs/ab.html
  12. http://www.kegel.com/c10k.html
  13. Raffaele Bolla and Roberto Bruschi, "The IP Lookup Mechanism in a Linux Software Router: Performance Evaluation and Optimizations", Proc. of the 2007 IEEE Workshop on High Performance Switching and Routing.
  14. Open Router resources from the TNT Lab. [Internet], www.tnt.dist.unige.it
  15. R. Bolla and R. Bruschi, "RFC 2544 Performance Evaluation and Internal Measurements for a Linux Based Open Router", Proc. of IEEE 2006 Workshop on High Performance Switching and Routing(HPSR 2006), Poznan, Poland, pp. 9-14, June, 2006.
  16. Seokoo Kim and Kyusik Chung, "A Performance Improvement of Linux TCP Networking by Data Structure Reuse", Proc. of 2013 KICS(Korea Information and Communications Society) Fall Conference, Session 9A-1, pp.251-252, Nov., 2013.