GPU-based NFA implementation for memory efficient high speed regular expression matching

  • Authors:
  • Yuan Zu;Ming Yang;Zhonghu Xu;Lin Wang;Xin Tian;Kunyang Peng;Qunfeng Dong

  • Affiliations:
  • University of Science and Technology of China, Hefei, Anhui, China;University of Science and Technology of China, Hefei, Anhui, China;University of Science and Technology of China, Hefei, Anhui, China;University of Science and Technology of China, Hefei, Anhui, China;University of Science and Technology of China, Hefei, Anhui, China;University of Science and Technology of China, Hefei, Anhui, China;University of Science and Technology of China, Hefei, Anhui, China

  • Venue:
  • Proceedings of the 17th ACM SIGPLAN symposium on Principles and Practice of Parallel Programming
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Regular expression pattern matching is the foundation and core engine of many network functions, such as network intrusion detection, worm detection, traffic analysis, web applications and so on. DFA-based solutions suffer exponentially exploding state space and cannot be remedied without sacrificing matching speed. Given this scalability problem of DFA-based methods, there has been increasing interest in NFA-based methods for memory efficient regular expression matching. To achieve high matching speed using NFA, it requires potentially massive parallel processing, and hence represents an ideal programming task on Graphic Processor Unit (GPU). Based on in-depth understanding of NFA properties as well as GPU architecture, we propose effective methods for fitting NFAs into GPU architecture through proper data structure and parallel programming design, so that GPU's parallel processing power can be better utilized to achieve high speed regular expression matching. Experiment results demonstrate that, compared with the existing GPU-based NFA implementation method [9], our proposed methods can boost matching speed by 29~46 times, consistently yielding above 10Gbps matching speed on NVIDIA GTX-460 GPU. Meanwhile, our design only needs a small amount of memory space, growing exponentially more slowly than DFA size. These results make our design an effective solution for memory efficient high speed regular expression matching, and clearly demonstrate the power and potential of GPU as a platform for memory efficient high speed regular expression matching.