Computer Science ›› 2021, Vol. 48 ›› Issue (11A): 585-587.doi: 10.11896/jsjkx.210100205

• Information Security • Previous Articles     Next Articles

Optimization Study of Sketch Algorithm Based on AVX Instruction Set

TAN Ling-ling, YANG Fei, YI Jun-kai   

  1. Institute of Automation,Beijing Information Science and Technology University,Beijing 100192,China
  • Online:2021-11-10 Published:2021-11-12
  • About author:TAN Ling-ling,born in 1986,Ph.D,lecturer.Her main research interests include active and passive filter design,electromagnetic compatibility simulation,and cyberspace security.
  • Supported by:
    NSFC-General Technology Basic Research National Natural Science Foundation of China(U1636208).

Abstract: Network traffic detection is the most basic and important part of network measurement.The detection method based on Sketch can count data flow of network,which can distinguish elephant flow,detect and locate abnormal traffic in abnormal detection of network traffic.Higher requirement of the memory resources is needed for multiple hash functions used in the implementation of Sketch.To address the restriction problems raised by multiple hash functions applied in the realization of Sketch,a me-thod of improving the performance of Sketch algorithm using AVX instruction set is put forward,and also the effects on CPU instruction consumption and algorithm computing efficiency are studied,which had high efficiency and high maturity.Firstly,the elements of data stream are described and stored in the form of a vector,utilizing AVX instructions to realize structures and opera-tions of vectors.Secondly,multiple hash operations are transformed into a vector operation,which reduces the CPU resources consumption of the Sketch algorithm,improves the comprehensive performance of multiple hash functions,and made it possible to improve the optimized performance of Sketch algorithm.Finally,AVX instruction set is used to optimize the key functions in the Count-Min Sketch algorithm program,and the optimized code is tested and analyzed.The experimental results show that the AVX optimized version takes 25% time of the original version in the operation of hash function.When the data length is short,the instructions consumed by multiple hash functions are relatively small in the whole Sketch,and the AVX optimized version consumes about 70% time of the original version.As the length of the data increases,instructions consumed by multiple hash functions take up a larger proportion in the whole Sketch algorithm,and the time consumed by the AVX optimized version can be reduced to 40% of the original version.The simulation results demonstrate the effectiveness of the proposed algorithm in improving the measurement efficiency of network data flow.

Key words: AVX instruction set, CPU speed, Network measurement, Sketch

CLC Number: 

  • TP309
[1]LU Y Q,MAO Z S,CHENG Z,et al.SDN topology attack and defense[J].Journal of South China University of Technology:Natural Science,2020,48(11):114-122.
[2]XU Y H,SUN Z X.Research Development of Abnormal Traffic Detection in Software Defined Networking[J].Journal of Software,2020,31(1):183-207.
[3]LUO L.Anomaly Detection of Backbone Network Based on Dimensionality Reduction[D].Hefei:University of Science and Technology of China,2015.
[4]DING Y.Research on SDN-oriented Flooding Attack Defenseand Recovery Mechanism[D].Tianjin:Civil Aviation University of China,2020.
[5]NIU W N,JIANG T Y,ZHANG X S,et al.Fast-flux Botnet De-tection Method Based on Spatiotemporal Feature of Network Traffic[J].Journal of Electronics & Information Technology,2020,4(8):1872-1880.
[6]LUO L,YIN B Q,CAO J.Anomaly Analysis and Identification of Backbone network Based on Sketch and Regularity Distribution[J].Journal of Systems Science and Mathematics,2015,35(1):1-8.
[7]DOU F F.Research on Sketch-based Data Streams Mining ofFrequent Itemsets[D].Xi'an:Xidian Univeristy,2012.
[8]JING X Y,ZHAO J J,ZHENG Q H,et al.A reversible sketch-based method for detecting and mitigating amplification attacks[J].Journal of Network and Computer Applications,2019,142:15-24.
[9]CORMODE G,MUTHUKRISHNAN S.An improved datastream summary:the count-min sketch and its applications[J].Journal of Algorithms,2005,55(1):58-75.
[10]FENG W F,GUO Q,GUAN Z T,et al.Hierarchical Count-Min Sketch Data Structure for Data Streams[J].Computer Engineering,2007,33(14):20-23.
[11]RANA B,RWALV A,HALEPOVIC E,et al.Modeling Webquality-of-experience on cellular networks [C]//Proceedings of 20th Annual International Conference on Mobile Computing and Networking.New York:ACM,2014:213-224.
[12]ZHU L,FENG Y,ZHU L,et al.Optimization of H.264 encoder based on SIMD technology[J].Computer Applications,2005,25(12):2799-2802.
[13]SUN H M,DU B Y,ZHENG P,et al.BWT algorithm based on AVX instructions in the application of the DNA sequence alignment[J].Journal of Northeast Agricultural University,2016,47(11):93-99.
[14]JIANG W B,WANG H B,LIU P,et al.Hybrid Computational Strategy for Deep Learning Based on AVX2[J].Journal of Tsinghua University,2020,60(5):408-414.
[1] DOU Zhi, WANG Ning, WANG Shi-jie, WANG Zhi-hui, LI Hao-jie. Sketch Colorization Method with Drawing Prior [J]. Computer Science, 2022, 49(4): 195-202.
[2] ZHAO Qian, CHEN Shu-hui. LRBG-based Approach for IP Geolocation [J]. Computer Science, 2020, 47(11A): 291-295.
[3] LI Zong-min, LI Si-yuan, LIU Yu-jie, LI Hua. Sketch-based Image Retrieval Based on Attention Model [J]. Computer Science, 2020, 47(11): 199-204.
[4] YU Mei-yu, WU Hao, GUO Xiao-yan, JIA Qi GUO He. Sequential Feature Based Sketch Recognition [J]. Computer Science, 2018, 45(11A): 198-202.
[5] QIAO Yan, JIAO Jun and RAO Yuan. Traffic Estimation for Data Center Network Based on Traffic Characteristics [J]. Computer Science, 2017, 44(2): 171-175.
[6] JI Hai-feng and TIAN Huai-wen. Sketch Recognition Method of Combined Graphs for Conceptual Design [J]. Computer Science, 2016, 43(Z6): 134-138.
[7] JIA Jian-wei and CHEN Ling. Set Similarity Approximation Algorithm Based on Parity of Data Sketch [J]. Computer Science, 2016, 43(6): 254-256.
[8] CHEN Quan, SHI Da-peng, FENG Gui-huan, ZHAO Xiao-yan and LUO Bin. On-line Handwritten Flowchart Recognition Based on Grammar Description Language [J]. Computer Science, 2015, 42(Z11): 113-118.
[9] WANG Jing, WANG Bin-qiang and SHEN Juan. Measurement Component Transfer Model-based Conformance Testing Approach of Reconfigurable Measurement Component [J]. Computer Science, 2015, 42(9): 165-170.
[10] ZHANG Rong, JIN Yue-hui, YANG Tan and RONG Zi-zhan. Intelligent Selection Algorithm of Measurement Nodes in Distributed Network Measurement [J]. Computer Science, 2015, 42(9): 70-77.
[11] ZHANG Cheng-wei, CHENG Wen-qing and HEI Xiao-jun. Measurement Study of 3G Mobile Networks Using Android Platform [J]. Computer Science, 2015, 42(2): 24-28.
[12] WANG Guan-feng,WANG Shu-xia,YU Sui-huai and GAO Man-tun. Extraction and Correction of Feature Parameter for Online Freehand Conic Section [J]. Computer Science, 2014, 41(1): 297-299.
[13] WU Xiao-liang and TIAN Huai-wen. Method of 3D Reconstruction Based on Given Axonometric Sketching [J]. Computer Science, 2013, 40(9): 275-278.
[14] . Interpretation of Online Multistroke Sketching with Polylines Based on the Time-space Relationship [J]. Computer Science, 2012, 39(9): 269-274.
[15] TANG Jun , PEI Chang-xing ,SU B0. Research on Path Capacity Estimation for IPv6 Networks [J]. Computer Science, 2011, 38(Z10): 312-314.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!