skip to main content
10.1145/3649411.3649416acmotherconferencesArticle/Chapter ViewAbstractPublication PagesgpgpuConference Proceedingsconference-collections
research-article

Regular Expressions on Modern GPGPUs

Published: 28 April 2024 Publication History

Abstract

Using GPUs is an effective way to accelerate regular expression (RE) matching, offering orders of magnitude faster processing than pure CPU approaches. Prior GPU-based RE acceleration methods, however, were developed on older GPU models and primarily aimed at expediting network packet inspection problems. In this work we conduct an updated study aiming to improve performance and enhance generality. We first incorporate prefiltering, verifying whether simpler parts of the RE can match before testing more complex RE components. We also observed that naive implementation of current designs on a modern GPU results in low thread occupancy, limiting performance, and improving the selection of GPU parameters is also crucial to optimizing performance. In combination our optimized design allows us to achieve 40x performance improvement over iNFAnt [5] and up to 1900x faster than ASyncAP [11]. Such an updated approach allows for faster, more general RE matching on modern GPUs.

References

[1]
Matteo Avalle, Fulvio Risso, and Riccardo Sisto. 2015. Scalable Algorithms for NFA Multi-Striding and NFA-Based Deep Packet Inspection on GPUs. IEEE/ACM Transactions on Networking 24 (06 2015), 1–1. https://doi.org/10.1109/TNET.2015.2429918
[2]
Michela Becchi, Mark Franklin, and Patrick Crowley. 2008. A workload for evaluating deep packet inspection architectures. In 2008 IEEE International Symposium on Workload Characterization. 79–89. https://doi.org/10.1109/IISWC.2008.4636093
[3]
Thorsten Blaß and Michael Philippsen. 2019. Which Graph Representation to Select for Static Graph-Algorithms on a CUDA-Capable GPU. In Proceedings of the 12th Workshop on General Purpose Processing Using GPUs (Providence, RI, USA) (GPGPU ’19). Association for Computing Machinery, New York, NY, USA, 22–31. https://doi.org/10.1145/3300053.3319416
[4]
Anat Bremler-Barr, Yotam Harchol, David Hay, and Yaron Koral. 2014. Deep Packet Inspection as a Service. In Proceedings of the 10th ACM International on Conference on Emerging Networking Experiments and Technologies (Sydney, Australia) (CoNEXT ’14). Association for Computing Machinery, New York, NY, USA, 271–282. https://doi.org/10.1145/2674005.2674984
[5]
Niccolò Cascarano, Pierluigi Rolando, Fulvio Risso, and Riccardo Sisto. 2010. INFAnt: NFA Pattern Matching on GPGPU Devices. SIGCOMM Comput. Commun. Rev. 40, 5 (oct 2010), 20–26. https://doi.org/10.1145/1880153.1880157
[6]
Intel. 2017. HyperScan. https://github.com/intel/hyperscan.
[7]
Aajna Karki, Chethan Palangotu Keshava, Spoorthi Mysore Shivakumar, Joshua Skow, Goutam Madhukeshwar Hegde, and Hyeran Jeon. 2019. Detailed Characterization of Deep Neural Networks on GPUs and FPGAs. In Proceedings of the 12th Workshop on General Purpose Processing Using GPUs (Providence, RI, USA) (GPGPU ’19). Association for Computing Machinery, New York, NY, USA, 12–21. https://doi.org/10.1145/3300053.3319418
[8]
[8] Cheng Li. 2023. https://github.com/cli117/thesis_work/blob/main/iNFAnt_Buffer/test_suite/midstr_7k.txt.
[9]
[9] Cheng Li. 2023. https://github.com/cli117/thesis_work/tree/main/iNFAnt_Buffer/test_suite/nfa_output.
[10]
Kuan-Ju Lin, Yi-Hsuan Huang, and Chun-Yuan Lin. 2013. Efficient Parallel Knuth-Morris-Pratt Algorithm for Multi-GPUs with CUDA. In Advances in Intelligent Systems and Applications - Volume 2, Jeng-Shyang Pan, Ching-Nung Yang, and Chia-Chen Lin (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 543–552.
[11]
Hongyuan Liu, Sreepathi Pai, and Adwait Jog. 2023. Asynchronous Automata Processing on GPUs. Proc. ACM Meas. Anal. Comput. Syst. 7, 1, Article 27 (mar 2023), 27 pages. https://doi.org/10.1145/3579453
[12]
Kun Qiu, Harry Chang, Yang Hong, Wenjun Zhu, Xiang Wang, and Baoqian Li. 2021. Teddy: An Efficient SIMD-Based Literal Matching Engine for Scalable Deep Packet Inspection. In Proceedings of the 50th International Conference on Parallel Processing (Lemont, IL, USA) (ICPP ’21). Association for Computing Machinery, New York, NY, USA, Article 62, 11 pages. https://doi.org/10.1145/3472456.3473512
[13]
R. Sidhu and V.K. Prasanna. 2001. Fast Regular Expression Matching Using FPGAs. In The 9th Annual IEEE Symposium on Field-Programmable Custom Computing Machines (FCCM’01). 227–238.
[14]
David Sidler, Zsolt István, Muhsen Owaida, and Gustavo Alonso. 2017. Accelerating Pattern Matching Queries in Hybrid CPU-FPGA Architectures. In Proceedings of the 2017 ACM International Conference on Management of Data (Chicago, Illinois, USA) (SIGMOD ’17). Association for Computing Machinery, New York, NY, USA, 403–415. https://doi.org/10.1145/3035918.3035954
[15]
[15] Jack Wadden. 2017. https://github.com/jackwadden/ANMLZoo/tree/master/Snort/inputs.
[16]
Jack Wadden. 2017. Snort Regex Patterns. https://github.com/jackwadden/ANMLZoo/blob/master/Snort/regex/snort.1chip.regex.
[17]
Hao Xu, Harry Chang, Wenjun Zhu, Yang Hong, Geoff Langdale, Kun Qiu, and Jin Zhao. 2023. Harry: A Scalable SIMD-based Multi-literal Pattern Matching Engine for Deep Packet Inspection. In IEEE INFOCOM 2023 - IEEE Conference on Computer Communications, New York City, NY, USA, May 17-20, 2023. IEEE, 1–10. https://doi.org/10.1109/INFOCOM53939.2023.10229022

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
GPGPU '24: Proceedings of the 16th Workshop on General Purpose Processing Using GPU
March 2024
37 pages
ISBN:9798400718175
DOI:10.1145/3649411
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 the author(s) 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: 28 April 2024

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Cuda
  2. GPU
  3. pattern-matching
  4. regular expressions

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Funding Sources

Conference

GPGPU '24

Acceptance Rates

Overall Acceptance Rate 57 of 129 submissions, 44%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 66
    Total Downloads
  • Downloads (Last 12 months)66
  • Downloads (Last 6 weeks)9
Reflects downloads up to 17 Jan 2025

Other Metrics

Citations

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media