近年來,繪圖晶片處理器(GPU, Graphics Processing Unit)被應用在網路的封包處理上,利用封包間資料互相獨立的特性,有效的使用GPU大量且平行的運算能力進行更快速的運算,本論文以速寫演算法(K-ary sketch)為主要之演算法,並且在AMD Radeon HD 5870上進行優化。 本論文將分成以下三個部分:第一個部分將會分析Theophilus Wellem的碩士論文所撰寫的OpenCL程式架構,第二部分將會蒐集並探討目前CPU以及GPU在OpenCL中可以實現之優化方式,第三部分將把適用於K-ary sketch的優化方式實現並探討其結果,並且著重於減少傳輸資料時間、準備運算核心(kernel)的時間以及優化運算的時間,也探討並實現如何有效的同時利用CPU以及GPU同時進行運算以重疊並隱藏所必須花費的傳輸及準備時間,在結果中顯示,利用本論文所提到之優化方式,可以將速寫演算法之查詢(Query)的速度提高21.836倍,處理封包的吞吐量(throughput)將可以達到11.85Gbps,以達到更快速的查詢異常流量的目的。
This dissertation explores several schemes to optimize a set of OpenCL kernels designed for network traffic change detection on AMD Radeon HD 5870 GPU. Utilizing the techniques such as zero copy, kernel combining, vector instructions, and hiding memory access with kernel execution, the original performance of query process is increased substantially. The throughput can achieve up to 11.85Gbps for minimum-sized Ethernet frame.