Overview
Request 1077591 accepted
- Created by gregfreemyer
- In state accepted
Request History
gregfreemyer created request
factory-auto added opensuse-review-team as a reviewer
Please review sources
factory-auto accepted review
Check script succeeded
licensedigger accepted review
ok
dimstar_suse added as a reviewer
Being evaluated by staging project "openSUSE:Factory:Staging:adi:62"
dimstar_suse accepted review
Picked "openSUSE:Factory:Staging:adi:62"
gregfreemyer added amanzini as a reviewer
Question about AVX2 benchmarking for you
dimstar accepted review
amanzini accepted review
did some rough benchmarks comparison on my Tumbleweed laptop; even with a simple rule, the execution speed on a large dataset improves on average by 7.5% (best case by 15%), nothing huge but on my opinion it's worth it to enable AVX2
## before upgrade
❯ yara -v
4.2.3
❯ ldd /usr/bin/yara
linux-vdso.so.1 (0x00007ffdea310000)
libyara.so.9 => /lib64/libyara.so.9 (0x00007fc96bca9000)
libc.so.6 => /lib64/libc.so.6 (0x00007fc96baae000)
libmagic.so.1 => /lib64/libmagic.so.1 (0x00007fc96ba84000)
libjansson.so.4 => /lib64/libjansson.so.4 (0x00007fc96ba71000)
libm.so.6 => /lib64/libm.so.6 (0x00007fc96b98b000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc96bd28000)
libzstd.so.1 => /lib64/glibc-hwcaps/x86-64-v3/libzstd.so.1.5.4 (0x00007fc96b8e1000)
liblzma.so.5 => /lib64/glibc-hwcaps/x86-64-v3/liblzma.so.5.4.2 (0x00007fc96b8a8000)
libbz2.so.1 => /lib64/glibc-hwcaps/x86-64-v3/libbz2.so.1.0.6 (0x00007fc96b88e000)
libz.so.1 => /lib64/glibc-hwcaps/x86-64-v3/libz.so.1.2.13 (0x00007fc96b874000)
❯ hyperfine -i 'yara sample.rules /usr/bin'
Benchmark 1: yara sample.rules /usr/bin
Time (mean ± σ): 455.2 ms ± 12.6 ms [User: 4200.5 ms, System: 276.9 ms]
Range (min … max): 441.1 ms … 480.8 ms 10 runs
## after upgrade
❯ yara -v
4.3.0
❯ ldd /usr/bin/yara
linux-vdso.so.1 (0x00007fff8acc8000)
libyara.so.10 => /lib64/glibc-hwcaps/x86-64-v3/libyara.so.10.0.0 (0x00007ff0df406000)
libc.so.6 => /lib64/libc.so.6 (0x00007ff0df20b000)
libmagic.so.1 => /lib64/libmagic.so.1 (0x00007ff0df1e1000)
libjansson.so.4 => /lib64/libjansson.so.4 (0x00007ff0df1ce000)
libm.so.6 => /lib64/libm.so.6 (0x00007ff0df0e8000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff0df48e000)
libzstd.so.1 => /lib64/glibc-hwcaps/x86-64-v3/libzstd.so.1.5.4 (0x00007ff0df03e000)
liblzma.so.5 => /lib64/glibc-hwcaps/x86-64-v3/liblzma.so.5.4.2 (0x00007ff0df005000)
libbz2.so.1 => /lib64/glibc-hwcaps/x86-64-v3/libbz2.so.1.0.6 (0x00007ff0defeb000)
libz.so.1 => /lib64/glibc-hwcaps/x86-64-v3/libz.so.1.2.13 (0x00007ff0defd1000)
❯ hyperfine -i 'yara sample.rules /usr/bin'
Benchmark 1: yara sample.rules /usr/bin
Time (mean ± σ): 419.0 ms ± 10.9 ms [User: 3958.3 ms, System: 225.6 ms]
Range (min … max): 404.5 ms … 435.3 ms 10 runs
dimstar_suse accepted review
Staging Project openSUSE:Factory:Staging:adi:62 got accepted.
dimstar_suse approved review
Staging Project openSUSE:Factory:Staging:adi:62 got accepted.
dimstar_suse accepted request
Staging Project openSUSE:Factory:Staging:adi:62 got accepted.
+- Build AVX2 enabled hwcaps library for x86_64-v3
was this benchmarked? What's the gain, if any? We don't want to enable this on everything just because we can, but actually where it makes sense
Given yara is a malware binary pattern matching engine, I assumed that would benefit from AVX2 extensions. You're right it should be benchmarked to make an informed decision, so feel free to deny this request while we work on proper performance comparison.