intel / intel/hyperscan

Using hsbench to test avx512 performance is even lower

Open
#213 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.5k
Forks
816
Avg merge
4d 21h
Merged PRs (30d)
2

Description

My CPU is Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz;
I built avx512 and sse3 instruction set hyperscan on my machine, and then used hsbench and officially downloaded data to test performance.

The commands I used are as follows:

for avx512:
```
cmake -DBUILD_AVX512=on -DCMAKE_C_FLAGS="-march=native" -DCMAKE_CXX_FLAGS="-march=native" -DFAT_RUNTIME=0 ..
make -j80
#run commond
taskset 1 hsbench -e pcre/snort_literals -c corpora/alexa200.db -V
```
for sse3 (On the same cpu):
```
cmake -DCMAKE_C_FLAGS="-march=core2" -DCMAKE_CXX_FLAGS="-march=core2" -DFAT_RUNTIME=0 ..
make -j80
#run commond
taskset 1 hsbench -e pcre/snort_literals -c corpora/alexa200.db -V
```
The gcc version i have is 7.3.0, and the operating system is ubuntu18.04.

sse3 runs nearly 10% faster than avx512. I don't know if this data is reasonable?

This is the result of my operation:

```
*** Snort literals against HTTP traffic, block mode.

Signatures: pcre/snort_literals
Hyperscan info: Version: 5.2.1 Features: AVX512 Mode: VECTORED
Expression count: 3,116
Bytecode size: 695,608 bytes
Database CRC: 0xe4f2719
Scratch size: 5,479 bytes
Compile time: 0.083 seconds
Peak heap usage: 192,765,952 bytes

Time spent scanning: 7.906 seconds
Corpus size: 177,087,567 bytes (130,957 blocks in 5,400 vectors)
Matches per iteration: 81,963 (0.474 matches/kilobyte)
Overall block rate: 331,268.29 blocks/sec
Mean throughput (overall): 3,583.68 Mbit/sec
Max throughput (per core): 3,767.96 Mbit/sec

```
```
*** Snort literals against HTTP traffic, block mode.

Signatures: pcre/snort_literals
Hyperscan info: Version: 5.2.1 Features: Mode: VECTORED
Expression count: 3,116
Bytecode size: 695,608 bytes
Database CRC: 0xe4f2719
Scratch size: 5,479 bytes
Compile time: 0.085 seconds
Peak heap usage: 193,003,520 bytes

Time spent scanning: 6.730 seconds
Corpus size: 177,087,567 bytes (130,957 blocks in 5,400 vectors)
Matches per iteration: 81,963 (0.474 matches/kilobyte)
Overall block rate: 389,196.47 blocks/sec
Mean throughput (overall): 4,210.35 Mbit/sec
Max throughput (per core): 4,438.81 Mbit/sec

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.