计算机与现代化

• 操作系统 • 上一篇    下一篇

一种优化的内核态文件发送方法

  

  1. (河南大学计算机与信息工程学院,河南开封475001)
  • 收稿日期:2018-12-17 出版日期:2019-05-14 发布日期:2019-05-14
  • 作者简介:屠雪真(1998-),女,河南开封人,CCF会员,本科生,研究方向:分布式计算存储,E-mail: tuxuezhen@qq.com。
  • 基金资助:
    深圳市科技创新委员会科技应用示范项目 (sf20170036)

An Optimized Kernel State File Sending Method

  1. (School of Computer and Information Engineering, Henan University, Kaifeng 475001, China)
  • Received:2018-12-17 Online:2019-05-14 Published:2019-05-14

摘要: 传统的Linux内核协议栈已不能满足大规模数据处理系统对网络传输越来越高的性能要求。现有很多研究是将原来在内核态实现的协议和接口移到用户态去实现,但针对内核态优化的研究比较少。在研究分析Linux内核态文件发送接口sendfile( )处理流程和管理机制的基础上,本文提出一种内核态文件发送优化方法,采用自动负载均衡的定长内存池管理、CPU亲和性等技术,对内核态文件发送接口进行优化改造。解决了系统在高负载情况下内存碎片、内存耗尽及CPU抖动的问题,有效提升了数据传输性能。实验结果表明,在高并发、高吞吐场景下,采用本文优化方法后,系统运行更稳定,内核态CPU占有率下降50%。

关键词: 大规模数据处理, 用户态协议栈, 负载均衡, 内存池管理, CPU亲和性

Abstract: The traditional Linux kernel protocol stack can no longer meet the higher performance requirements of large-scale data processing systems for network transmission. A lot of researches have been done to move the protocols and interfaces from the kernel state to the user state, but there are few studies on kernel state optimization. Based on the analysis of the Linux kernel state file sending interface sendfile( ) processing flow and management mechanism, this paper proposes a kernel state file sending optimization method, using automatic load balancing fixed-length memory pool management, CPU affinity technologies, the kernel state interface sendfile( ) has been optimized and modified. It solves the problems of memory fragmentation, memory exhaust and CPU jitter under high load conditions, and improves data transmission performance effectively. Experimental results show that in the high concurrent and high throughput scenario, the system using this optimization method runs more stably, and the kernel state CPU occupancy rate drops by 50%.

Key words: large-scale data processing, user state protocol stack; load balance; memory pool management; CPU affinity

中图分类号: