協議棧并行化技術的研究與實現
發(fā)布時間:2018-11-17 13:56
【摘要】:近年來,隨著互聯網技術的迅猛發(fā)展和互聯網用戶數量的大幅增加,網絡數據量呈指數型增長,對網絡協議處理能力提出更高的要求。在應對高速大規(guī)模網絡流量時,誕生于單核處理器時代的傳統(tǒng)內核協議棧,已經不能滿足需求。利用多核處理器并行編程技術,對協議棧進行并行化改進是解決這一問題的有效途徑,能夠有效提升協議處理性能。本文首先分析了制約傳統(tǒng)內核協議棧性能的主要因素,明確其性能開銷主要集中于中斷處理、內存拷貝、協議處理和系統(tǒng)調用等方面。在對當前存在的協議棧加速方案進行分析之后,提出了連接級用戶態(tài)并行協議棧加速方案。在用戶態(tài)實現協議棧可以從根本上消除系統(tǒng)調用等協議處理開銷;以連接為基本的并行單位,能夠有效降低CPU核之間的數據同步開銷,提高多連接吞吐量。連接級用戶態(tài)并行協議棧主要包括底層包處理模塊、數據包分發(fā)器和協議處理模塊三部分。底層包處理模塊主要負責打通網卡到用戶空間的直接數據通路,旁路內核協議棧,利用零拷貝技術降低了內存拷貝與中斷處理開銷;數據包分發(fā)器通過對數據包連接四元組進行哈希散列運算,將同一連接的數據包分發(fā)到相同協議處理線程中進行處理,消除了線程間對連接狀態(tài)的同步開銷;協議處理模塊負責高效地完成協議處理任務,通過優(yōu)先級隊列、事件批處理等技術優(yōu)化協議處理性能,并向上層應用程序提供訪問接口。通過實驗證明本文設計的連接級用戶態(tài)并行協議棧能夠有效提升協議處理性能。
[Abstract]:In recent years, with the rapid development of Internet technology and the large increase in the number of Internet users, the amount of network data increases exponentially, which puts forward higher requirements for the ability of network protocol processing. When dealing with high speed and large scale network traffic, the traditional kernel protocol stack born in the era of single core processor can no longer meet the demand. Using parallel programming technology of multi-core processors to improve the protocol stack parallelization is an effective way to solve this problem and can effectively improve the performance of protocol processing. This paper first analyzes the main factors that restrict the performance of the traditional kernel protocol stack, and clarifies that the performance overhead is mainly focused on interrupt processing, memory copy, protocol processing and system call. After analyzing the existing protocol stack acceleration scheme, a connection level user state parallel protocol stack acceleration scheme is proposed. The implementation of the protocol stack in the user state can fundamentally eliminate the processing overhead of the protocols such as system call, and taking the connection as the basic parallel unit can effectively reduce the data synchronization overhead between the CPU cores and improve the throughput of multiple connections. The connection level user state parallel protocol stack consists of three parts: the underlying packet processing module, the packet distributor and the protocol processing module. The underlying packet processing module is mainly responsible for opening the direct data path from the network card to the user space, bypassing the kernel protocol stack, and using zero-copy technology to reduce the memory copy and interrupt processing overhead. The packet distributor distributes the same connection data packet to the same protocol processing thread by hash operation on the packet connection quaternion, which eliminates the synchronization overhead of the connection state between the threads. Protocol processing module is responsible for efficiently completing protocol processing tasks, optimizing protocol processing performance through priority queue and event batch, and providing access interface to upper application programs. The experiments show that the parallel protocol stack designed in this paper can effectively improve the performance of the protocol.
【學位授予單位】:西安電子科技大學
【學位級別】:碩士
【學位授予年份】:2014
【分類號】:TP393.04
[Abstract]:In recent years, with the rapid development of Internet technology and the large increase in the number of Internet users, the amount of network data increases exponentially, which puts forward higher requirements for the ability of network protocol processing. When dealing with high speed and large scale network traffic, the traditional kernel protocol stack born in the era of single core processor can no longer meet the demand. Using parallel programming technology of multi-core processors to improve the protocol stack parallelization is an effective way to solve this problem and can effectively improve the performance of protocol processing. This paper first analyzes the main factors that restrict the performance of the traditional kernel protocol stack, and clarifies that the performance overhead is mainly focused on interrupt processing, memory copy, protocol processing and system call. After analyzing the existing protocol stack acceleration scheme, a connection level user state parallel protocol stack acceleration scheme is proposed. The implementation of the protocol stack in the user state can fundamentally eliminate the processing overhead of the protocols such as system call, and taking the connection as the basic parallel unit can effectively reduce the data synchronization overhead between the CPU cores and improve the throughput of multiple connections. The connection level user state parallel protocol stack consists of three parts: the underlying packet processing module, the packet distributor and the protocol processing module. The underlying packet processing module is mainly responsible for opening the direct data path from the network card to the user space, bypassing the kernel protocol stack, and using zero-copy technology to reduce the memory copy and interrupt processing overhead. The packet distributor distributes the same connection data packet to the same protocol processing thread by hash operation on the packet connection quaternion, which eliminates the synchronization overhead of the connection state between the threads. Protocol processing module is responsible for efficiently completing protocol processing tasks, optimizing protocol processing performance through priority queue and event batch, and providing access interface to upper application programs. The experiments show that the parallel protocol stack designed in this paper can effectively improve the performance of the protocol.
【學位授予單位】:西安電子科技大學
【學位級別】:碩士
【學位授予年份】:2014
【分類號】:TP393.04
【相似文獻】
相關期刊論文 前10條
1 李威;殷志堅;;ZLIP TCP/IP協議棧在嵌入式系統(tǒng)中的應用[J];單片機與嵌入式系統(tǒng)應用;2013年12期
2 謝雪松,胡長陽;基于驅動程序的協議棧設計[J];電子工程師;2000年04期
3 郝京宇,黃建華,賈風根;協議棧的實現方法[J];計算機工程;2004年14期
4 何友鳴,郭凱紅;協議棧內部非阻塞通信的一種實現策略[J];計算機系統(tǒng)應用;2005年08期
5 李偉;;基于協議棧的移動性技術對比分析[J];江蘇通信技術;2006年06期
6 王;;楊斌;;Linux TCP/IP協議棧的設計及實現特點[J];云南民族大學學報(自然科學版);2007年01期
7 宋麗華;張曉彤;王沁;郭艷飛;;嵌入式協議?芍貥嬓苑治雠c設計實現[J];計算機科學;2007年09期
8 李慶江;;基于LwIP協議棧的嵌入式Web服務器的設計及實現[J];山東輕工業(yè)學院學報(自然科學版);2008年04期
9 孟浩;;一種通用嵌入式Web服務器精簡協議棧的設計與實現[J];科技資訊;2008年34期
10 徐宏U,
本文編號:2338038
本文鏈接:http://www.sikaile.net/guanlilunwen/ydhl/2338038.html
最近更新
教材專著