skip to main content
10.1145/2145816.2145833acmconferencesArticle/Chapter ViewAbstractPublication PagesppoppConference Proceedingsconference-collections
research-article

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

Authors Info & Claims
Published:25 February 2012Publication History

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.

References

  1. PCRE - Perl Compatible Regular Expressions. http://www.pcre.org/.Google ScholarGoogle Scholar
  2. Snort intrusion detection system. http://www.snort.org/.Google ScholarGoogle Scholar
  3. S. S. Baghsorkhi, M. Delahaye, S. J. Patel, W. D. Gropp, and W. mei W. Hwu. An adaptive performance modeling tool for GPU architectures. In Proceedings of ACM PPoPP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Becchi and P. Crowley. A hybrid finite automaton for practical deep packet inspection. In Proceedings of CoNext, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Becchi and P. Crowley. An improved algorithm to accelerate regular expression evaluation. In Proceedings of ANCS, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. M. Becchi and P. Crowley. Efficient regular expression evaluation: Theory to practice. In Proceedings of ANCS, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Becchi and P. Crowley. Extending finite automata to efficient match perl-compatible regular expressions. In Proceedings of CoNext, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. Becchi, M. Franklin, and P. Crowley. A workload for evaluating deep packet inspection architectures. In Proceedings of IISWC, 2008.Google ScholarGoogle ScholarCross RefCross Ref
  9. N. Cascarano, P. Rolando, F. Risso, and R. Sisto. iNFAnt: NFA pattern matching on GPGPU devices. SIGCOMM CCR, 40 (5): 21--26, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Chen. TCAM-based high speed regular expression matching. Bachelor thesis, Institute of Networked Systems (IONS), University of Science and Technology of China, June 2010.Google ScholarGoogle Scholar
  11. M. Chen, Q. Dong, and K. Peng. TCAM-based DFA implementation: A novel approach to efficient regular expression matching. Technical report, Institute of Networked Systems (IONS), University of Science and Technology of China.Google ScholarGoogle Scholar
  12. J. W. Choi, A. Singh, and R. W. Vuduc. Model-driven autotuning of sparse matrix-vector multiply on GPUs. In Proceedings of ACM PPoPP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Y. Dotsenko, S. S. Baghsorkhi, B. Lloyd, and N. K. Govindaraju. Auto-tuning of fast fourier transform on graphics processors. In Proceedings of PPOPP, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. Hong, S. K. Kim, T. Oguntebi, and K. Olukotun. Accelerating CUDA graph algorithms at maximum warp. In Proceedings of ACM PPoPP, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. J. Kim, H. Kim, J. H. Lee, and J. Lee. Achieving a single compute device image in OpenCL for multiple GPUs. In Proceedings of ACM PPoPP, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. S. Kumar, B. Chandrasekaran, J. Turner, and G. Varghese. Curing regular expressions matching algorithms from insomnia, amnesia, and acalculia. In Proceedings of ANCS, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. Kumar, S. Dharmapurikar, F. Yu, P. Crowley, and J. Turner. Algorithms to accelerate multiple regular expressions matching for deep packet inspection. In Proceedings of ACM SIGCOMM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. S. Lee, S.-J. Min, and R. Eigenmann. OpenMP to GPGPU: a compiler framework for automatic translation and optimization. In Proceedings of ACM PPoPP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. C. R. Meiners, J. Patel, E. Norige, E. Torng, and A. X. Liu. Fast regular expression matching using small TCAMs for network intrusion detection and prevention systems. In Proceedings of USENIX Security, August 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Peng, Dong, and Chen}peng2011iwqosK. Peng, Q. Dong, and M. Chen. TCAM-based DFA deflation: A novel approach to fast and scalable regular expression matching. In Proceedings of ACM/IEEE IWQoS, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. K. Peng, S. Tang, Q. Dong, and M. Chen. Chain-based DFA deflation for fast and scalable regular expression matching using TCAM. In Proceedings of ANCS, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. E. F. O. Sandes and A. C. M. de Melo. CUDAlign: using GPU to accelerate the comparison of megabase genomic sequences. In Proceedings of ACM PPoPP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. R. Smith, C. Estan, and S. Jha. XFA: Faster signature matching with extended automata. In Proceedings of IEEE Symposium on Security and Privacy, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. Smith, C. Estan, S. Jha, and S. Kong. Deflating the big bang: fast and scalable deep packet inspection with extended finite automata. In Proceedings of ACM SIGCOMM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. R. Smith, N. Goyal, J. Ormont, K. Sankaralingam, and C. Estan. Evaluating GPUs for network packet signature matching. In Proceedings of ISPASS, 2009.Google ScholarGoogle ScholarCross RefCross Ref
  26. G. Vasiliadis, S. Antonatos, M. Polychronakis, E. P. Markatos, and S. Ioannidis. Gnort: High performance network intrusion detection using graphics processors. In Proceedings of RAID, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. G. Vasiliadis, M. Polychronakis, S. Antonatos, E. P. Markatos, and S. Ioannidis. Regular expression matching on graphics hardware for intrusion detection. In Proceedings of RAID, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. F. Yu, Z. Chen, Y. Diao, T. V. Lakshman, and R. H. Katz. Fast and memory-efficient regular expression matching for deep packet inspection. In Proceedings of ANCS, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Y. Zhang, J. Cohen, and J. D. Owens. Fast tridiagonal solvers on the GPU. In Proceedings of ACM PPoPP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. M. Zheng, V. T. Ravi, F. Qin, and G. Agrawal. GRace: a low-overhead mechanism for detecting data races in GPU programs. In Proceedings of ACM PPoPP, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

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

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          PPoPP '12: Proceedings of the 17th ACM SIGPLAN symposium on Principles and Practice of Parallel Programming
          February 2012
          352 pages
          ISBN:9781450311601
          DOI:10.1145/2145816
          • cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 47, Issue 8
            PPOPP '12
            August 2012
            334 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/2370036
            Issue’s Table of Contents

          Copyright © 2012 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 25 February 2012

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          Overall Acceptance Rate230of1,014submissions,23%

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader