A Speculative Parallel DFA Membership Test for Multicore, SIMD and Cloud Computing Environments

  • Authors:
  • Yousun Ko;Minyoung Jung;Yo-Sub Han;Bernd Burgstaller

  • Affiliations:
  • Department of Computer Science, Yonsei University, Seoul, Korea;Department of Computer Science, Yonsei University, Seoul, Korea;Department of Computer Science, Yonsei University, Seoul, Korea;Department of Computer Science, Yonsei University, Seoul, Korea

  • Venue:
  • International Journal of Parallel Programming
  • Year:
  • 2014

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present techniques to parallelize membership tests for Deterministic Finite Automata (DFAs). Our method searches arbitrary regular expressions by matching multiple bytes in parallel using speculation. We partition the input string into chunks, match chunks in parallel, and combine the matching results. Our parallel matching algorithm exploits structural DFA properties to minimize the speculative overhead. Unlike previous approaches, our speculation is failure-free, i.e., (1) sequential semantics are maintained, and (2) speed-downs are avoided altogether. On architectures with a SIMD gather-operation for indexed memory loads, our matching operation is fully vectorized. The proposed load-balancing scheme uses an off-line profiling step to determine the matching capacity of each participating processor. Based on matching capacities, DFA matches are load-balanced on inhomogeneous parallel architectures such as cloud computing environments. We evaluated our speculative DFA membership test for a representative set of benchmarks from the Perl-compatible Regular Expression (PCRE) library and the PROSITE protein database. Evaluation was conducted on a 4 CPU (40 cores) shared-memory node of the Intel Academic Program Manycore Testing Lab (Intel MTL), on the Intel AVX2 SDE simulator for 8-way fully vectorized SIMD execution, and on a 20-node (288 cores) cluster on the Amazon EC2 computing cloud. Obtained speedups are on the order of $$\mathcal O \left( 1+\frac{|P|-1}{|Q|\cdot \gamma }\right) $$ O 1 + | P | - 1 | Q | · 驴 , where $$|P|$$ | P | denotes the number of processors or SIMD units, $$|Q|$$ | Q | denotes the number of DFA states, and $$0 0 驴 ≤ 1 represents a statically computed DFA property. For all observed cases, we found that $$0.02 0.02 驴 0.47 . Actual speedups range from 2.3 $$\times $$ 脳 to 38.8 $$\times $$ 脳 for up to 512 DFA states for PCRE, and between 1.3 $$\times $$ 脳 and 19.9 $$\times $$ 脳 for up to 1,288 DFA states for PROSITE on a 40-core MTL node. Speedups on the EC2 computing cloud range from 5.0 $$\times $$ 脳 to 65.8 $$\times $$ 脳 for PCRE, and from 5.0 $$\times $$ 脳 to 138.5 $$\times $$ 脳 for PROSITE. Speedups of our C-based DFA matcher over the Perl-based ScanProsite scan tool range from 559.3 $$\times $$ 脳 to 15079.7 $$\times $$ 脳 on a 40-core MTL node. We show the scalability of our approach for input-sizes of up to 10 GB.