计算机工程 ›› 2009, Vol. 35 ›› Issue (3): 103-105,.doi: 10.3969/j.issn.1000-3428.2009.03.036

• 网络与通信 • 上一篇    下一篇

高性能服务器底层网络通信模块的设计方法

王文武1,2,赵卫东1,2,王志成1,2,陈 悦1,2,韩下林1,2   

  1. (1. 企业数字化技术教育部工程研究中心,上海 200092;2. 同济大学CAD研究中心,上海 201804)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2009-02-05 发布日期:2009-02-05

Design Method of Underlying Module of Network Communication for High Performance Server

WANG Wen-wu1,2, ZHAO Wei-dong1,2, WANG Zhi-cheng1,2, CHEN Yue1,2, HAN Xia-lin1,2   

  1. (1. State Education Commission Engineering Center for Enterprise Digital Technology, Shanghai 200092;2. Research Center of CAD, Tongji University, Shanghai 201804)
  • Received:1900-01-01 Revised:1900-01-01 Online:2009-02-05 Published:2009-02-05

摘要: 在对I/O完成端口进行底层封装的基础上,提出一种具有高性能的、可扩展性的通用网络通信模块设计方案。该方案采用多种系统性能优化技术,如线程池、对象池和环形缓存区等。该模块在Win32平台上用C++开发完成,经过严格的压力和性能测试后,实验结果表明该模块能够支持海量并发连接,具有较高的数据吞吐量,在实际项目应用中也取得了良好的表现。

关键词: 完成端口, 服务器, 多线程, 线程池, 对象池, 缓存区

Abstract: On the base of underlying encapsulation for I/O Completion Port(IOCP), this paper presents a design solution with high performance and scalable module of generic network communication, which emploies a variety of optimization techniques of system performance, such as thread pool, object pool and ring buffer. The module is developed in C++ programming language on Win32 platform. Experimental results show that the module can support massive concurrent connections, and has higher data throughput based on severe pressure and performance tests. The proposed solution has also got a good performance in the actual project application.

Key words: completion port, server, multi-threading, thread pool, object pool, ring buffer

中图分类号: