计算进入了多核时代,处理器的发展不再由更快的主频带动,而是依靠增加片上的多个核心.但是,对于高性能应用来说,多核平台的并行处理由于缺少适合的并行程序开发工具还处于初始阶段.一个串行B-NIDS的优化需要对底层线程结构的深入了解和正确使用.发现了现有并行系统基于细粒度锁同步机制的瓶颈,根据应用的数据流特点提出了没有竞争的同步机制.然后,提出了改进系统三级流水的多线程结构,并实现了不同特征流的差别服务.在性能评价中,改进系统在8核32线程服务器上从资源占用、吞吐率及响应时间3个方面都表现出了更好的性能.
With the rapid increase of network bandwidth and the growing variety of Internet applications,the backbone network intrusion detection systems(B-NIDS) meet the great requirements of delivering higher performance and enhancing effectiveness according to different features of network streams.Computing is entering a new phase in which CPU improvements are driven by the addition of multiple cores on a single chip,rather than higher frequencies.Parallel processing on these systems is in a primitive stage,and the parallelization of a sequential B-NIDS requires the explicit use and knowledge of underlying thread architecture.In this paper the bottleneck of the thread synchronization using fine-grained lock operations is discovered,and the new synchronization mechanism with no contention for shared structures is proposed based on the characteristics of data flow.Then a pipelining programming model of multithreading system with three contexts is issued,and the differential service for streams is implemented with the multiple weighed queues.In performance evaluation,the optimized system shows much better performance in three aspects of resource utilization,throughput,and response time on 8 core server.The improved system with the proposed synchronization mechanism shows good scalability.The processing capability on tested server can exceed over 1Gbps traffic flow.Also the multiple weighed queues for service quality introduce little latency,and a kind of probe-based sampling test shows that the response times of prioritized streams are shorter than those of non-prioritized.