140 likes | 219 Views
A Fast Scalable Automaton-Matching Accelerator for Embedded Content Processors KUO-KUN TSENG, YUAN-CHENG LAI, YING-DAR LIN, and TSERN-HUEI LEE ACM Transactions on Embedded Computing Systems, April 2009. Also appeared in AINAW 2007, SYSARC 2007. FSAM. F ast s calable a utomaton- m atching
E N D
A Fast Scalable Automaton-Matching Accelerator for Embedded Content Processors KUO-KUN TSENG, YUAN-CHENG LAI, YING-DAR LIN, and TSERN-HUEI LEE ACM Transactions on Embedded Computing Systems, April 2009. Also appeared in AINAW 2007, SYSARC 2007.
FSAM Fast scalable automaton-matching Bitmap-AC (INFOCOM 2004) based DPI Goal: Faster matching speed with space tradeoff Two techniques: Root-Index matching: for root state Pre-hash matching: for non-root states
Aho-Corasick Given a states s, Depth(s): Depth(S4) = 2, Depth(S13) = 3 Label(s): Label(S4) = BD, Label(S13) = BCA Label(S12) = CDBCAB Forward Transitions (To Deeper states) Failure Transitions Failure Transitions to S0 are omitted
State Structure (1/3)Lookup Table Format Lookup Table format used in: (# of Forward transitions) more than 64.
State Structure(2/3)Linear Format S4 (S0) S5 (S7) D S6 S2 (S0) C S5 D S4 E S3
State Structure (3/3)Bitmap Format S5 (S7) 00010 S6 S2 (S0) 00111 S5 S4 S3
FSAM Algorithm Three Components: 1. Root-Index Matching 2. PreHash Matching 3. AC Matching (Bitmap-AC Matching)
PreHash (Idea) Using for non-root states. Quickly test multiple suffixes of the current state to avoid slow Bitmap AC matching (bitmap testing). Per-statevectors to keep the valid suffix information. Failure Transitions are included in valid suffix consideration. Testing result: Miss: Return to root state Hit: do Bitmap-AC matching
Root-Index (Idea) Using for root state (S0) only Goal: Process multiple characters Issue: Memory explosion 256*256*256 … Solution: RFC-like (SIGCOMM 1999) data structure
Parameter URL Patterns (SquidGuard) 194,096 states BitmapAC (SizeAC6.85 MB) Kroot = 4 (Sizeroot7.5 MB) Kprehash = 2 (Sizeprehash3.23 MB) Virus Patterns (ClamAV) 402,173 states BitmapAC (SizeAC14.19 MB) Kroot = 2 (Sizeroot0.25 MB) Kprehash = 2 (Sizeprehash4.97MB)