• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2013, Vol. 35 ›› Issue (9): 27-35.

• 论文 • 上一篇    下一篇

针对搜索服务的操作系统伸缩性研究

赵玉龙, 王雷, 王欢   

  1. (北京航空航天大学计算机学院,北京 100191)
  • 收稿日期:2013-05-03 修回日期:2013-07-24 出版日期:2013-09-25 发布日期:2013-09-25
  • 基金资助:

    863计划资助项目(2011AA01A204);国家自然科学基金资助项目(61272167);核高基重大专项资助项目(2012ZX01039004)

Research on operating system scalability for search service         

ZHAO Yulong,WANG Lei,WANG Huan   

  1. (School of Computer Science and Engineering,Beihang University,Beijing 100191,China)
  • Received:2013-05-03 Revised:2013-07-24 Online:2013-09-25 Published:2013-09-25

摘要:

分析当前成熟操作系统,找出其在多核环境下的性能瓶颈并进行改进,已经成为了现代操作系统研究的重点之一。通过搜索服务压力测试实验发现,运行Nginx反向代理的64核Linux服务器的伸缩性不佳,启用64核时的吞吐量仅是1核时的3倍。瓶颈在于服务器上所有网卡中断和软中断处理都集中在一个CPU核上。结合网卡的Flow Direction机制和Linux内核中断的亲和性配置,实现了网卡中断负载均衡的方法,系统吞吐量提升33%。多核环境下网卡中断负载均衡无法保证TCP连接的亲和性。通过修改Linux内核代码,解决了TCP连接的非亲和性问题,系统吞吐量在之前的提升基础上,又提升9%。

关键词: 多核, 操作系统伸缩性, 搜索服务, 网卡中断均衡, TCP连接亲和性

Abstract:

The scalability of the operating system is the ability that the performance of operating system grows with the increase of the number of CPU cores. Analyzing current mature operating systems to find the performance bottleneck in multicore environments and eliminate it has become one of the research spots of modern operating systems. Through pressure experiments of search service, it's found that the scalability of 64 cores Linux server running Nginx reverse proxy is poor and the throughput of 64 cores only increases by 3 times in comparison to 1 core. The bottleneck is that all NIC interrupts and soft interrupt handling concentrate in one core of the server. Using the NIC Flow Direction mechanisms and the Linux kernel interrupt affinity, the NIC interrupt load balancing approach is achieved. The average throughput increases by 33%. NIC interrupts load balancing in multicore environments cannot guarantee the TCP connection affinity. By modifying the code of the Linux kernel, the nonaffinity problem is solved, and the throughput keeps increasing by 9%.

Key words: multi core;operating system scalability;search service;NIC interrupts balance;TCP connection affinity