Spectre V2 Userspace-Userspace Mitigation

Very preliminary Spectre V2 userspace-userspace patch benchmarks. tests for a future article on Phoronix.

HTML result view exported from: https://openbenchmarking.org/result/1809272-RA-SPECTREV276.

ProcessorMotherboardChipsetMemoryDiskGraphicsAudioMonitorNetworkOSKernelDesktopDisplay ServerDisplay DriverCompilerFile-SystemScreen ResolutionXeon E3 v52 x Xeon GoldEPYC 7601 Linux 4.19 Git spectre_v2_app2app Lite Linux 4.19 Git spectre_v2_app2app Lite Linux 4.19 Git spectre_v2_app2app LiteIntel Xeon E3-1280 v5 @ 4.00GHz (4 Cores / 8 Threads)MSI Z170A SLI PLUS (MS-7998) v1.0 (2.90 BIOS)Intel Xeon E3-1200 v5/E3-150016384MBSamsung SSD 970 EVO 250GBSapphire AMD Radeon RX 470/480/570/570X/580/580X 4096MBRealtek ALC1150VE228Intel ConnectionUbuntu 18.104.19.0-999-generic (x86_64) 20180925GNOME Shell 3.30.0X Server 1.20.1modesetting 1.20.1GCC 8.2.0ext41920x10804.19.0-rc2-spec2useruser-phx (x86_64) 201809262 x Intel Xeon Gold 6138 @ 3.70GHz (40 Cores / 80 Threads)TYAN S7106 (V1.01 BIOS)Intel Sky Lake-E DMI3 Registers96256MBASPEED ASPEED FamilyIntel I210 Gigabit Connection4.19.0-999-generic (x86_64) 201809254.19.0-rc2-spec2useruser-phx (x86_64) 20180926AMD EPYC 7601 32-Core @ 2.20GHz (32 Cores / 64 Threads)TYAN B8026T70AE24HR (V1.02.B10 BIOS)AMD Family 17h129024MBBroadcom and subsidiaries NetXtreme BCM5720 Gigabit PCIe4.19.0-999-generic (x86_64) 201809254.19.0-rc2-spec2useruser-phx (x86_64) 20180926OpenBenchmarking.orgCompiler Details- --build=x86_64-linux-gnu --disable-vtable-verify --disable-werror --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-gnu-unique-object --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --enable-libmpx --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-multiarch --enable-multilib --enable-nls --enable-objc-gc=auto --enable-offload-targets=nvptx-none --enable-plugin --enable-shared --enable-threads=posix --host=x86_64-linux-gnu --program-prefix=x86_64-linux-gnu- --target=x86_64-linux-gnu --with-abi=m64 --with-arch-32=i686 --with-default-libstdcxx-abi=new --with-gcc-major-version-only --with-multilib-list=m32,m64,mx32 --with-target-system-zlib --with-tune=generic --without-cuda-driver -v Disk Details- NONE / errors=remount-ro,relatime,rwProcessor Details- Xeon E3 v5: Linux 4.19 Git: Scaling Governor: intel_pstate powersave- Xeon E3 v5: spectre_v2_app2app Lite: Scaling Governor: intel_pstate powersave- 2 x Xeon Gold: Linux 4.19 Git: Scaling Governor: intel_pstate powersave- 2 x Xeon Gold: spectre_v2_app2app Lite: Scaling Governor: intel_pstate powersave- EPYC 7601: Linux 4.19 Git: Scaling Governor: acpi-cpufreq ondemand- EPYC 7601: spectre_v2_app2app Lite: Scaling Governor: acpi-cpufreq ondemandPython Details- Python 2.7.15+ + Python 3.6.6+Security Details- Xeon E3 v5: Linux 4.19 Git: KPTI + __user pointer sanitization + Full generic retpoline IBPB IBRS_FW + SSB disabled via prctl and seccomp + PTE Inversion; VMX: conditional cache flushes SMT vulnerable- Xeon E3 v5: spectre_v2_app2app Lite: KPTI + __user pointer sanitization + Full generic retpoline IBPB-lite IBRS_FW STIBP-lite RSB filling + SSB disabled via prctl and seccomp + PTE Inversion; VMX: conditional cache flushes SMT vulnerable- 2 x Xeon Gold: Linux 4.19 Git: KPTI + __user pointer sanitization + Full generic retpoline IBPB IBRS_FW + SSB disabled via prctl and seccomp + PTE Inversion; VMX: conditional cache flushes SMT vulnerable- 2 x Xeon Gold: spectre_v2_app2app Lite: KPTI + __user pointer sanitization + Full generic retpoline IBPB-lite IBRS_FW STIBP-lite RSB filling + SSB disabled via prctl and seccomp + PTE Inversion; VMX: conditional cache flushes SMT vulnerable- EPYC 7601: Linux 4.19 Git: __user pointer sanitization + Full AMD retpoline IBPB + SSB disabled via prctl and seccomp- EPYC 7601: spectre_v2_app2app Lite: __user pointer sanitization + Full AMD retpoline IBPB-lite STIBP-lite RSB filling + SSB disabled via prctl and seccomp

sqlite: Timed SQLite Insertionsgo-benchmark: httpgo-benchmark: jsongo-benchmark: buildgo-benchmark: garbagejava-scimark2: Compositeluajit: Compositestockfish: Total Timeebizzy: build-linux-kernel: Time To Compilebuild-llvm: Time To Compilecompress-gzip: Linux Source Tree Archiving To .tar.gzcompress-zstd: Compressing ubuntu-16.04.3-server-i386.img, Compression Level 19perl-benchmark: Pod2htmlperl-benchmark: Interpreterrbenchmark: pgbench: Buffer Test - Normal Load - Read Onlypgbench: Buffer Test - Normal Load - Read Writeoctave-benchmark: redis: SADDredis: GETredis: SETblender: Barbershop - CPU-Onlypybench: Total For Average Test Timesnginx: Static Web Page Servingapache-siege: 100apache-siege: 250phpbench: PHP Benchmark Suitescikit-learn: sunflow: Global Illumination + Image SynthesisXeon E3 v52 x Xeon GoldEPYC 7601 Linux 4.19 Git spectre_v2_app2app Lite Linux 4.19 Git spectre_v2_app2app Lite Linux 4.19 Git spectre_v2_app2app Lite41.638052125764121369909873826248692436142310932676248641157.3491737.931290.117379640.001212410.2011114333461315.552172409248601418780752284104737372358294145363844615.792.4757.127973125927541360587533226315632422141410996474235247157.4392637.761300.117430810.001110160.2008114306465515.202152132273773419370712280104837015431784393764099415.642.4441.138287257059021232716297871939204613617061824598434433.9917140.201210.118565980.003133370.4295575285550422.96187118822935841674181373112829773299492940159281919.771.0541.328434257391721286005928856776206413636851482095376534.0717140.391200.118382950.003120670.4276581375543322.62188780121104321666841375113330121291973000859011319.311.0339.79208943188879230719046518749181999112758295761117049742.8923946.061620.190014760.002177860.4653398838581421.35160099217009051347221503152423617235292322339750628.221.0339.50215723235572229098510968685661988113057714332112828742.8923046.041620.190616290.002059630.4652399342587222.26157463317223061324733502152223602230412319539788327.281.03OpenBenchmarking.org

SQLite

Timed SQLite Insertions

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgSeconds, Fewer Is BetterSQLite 3.22Timed SQLite InsertionsLinux 4.19 Gitspectre_v2_app2app Lite1326395265SE +/- 0.12, N = 3SE +/- 4.84, N = 9SE +/- 0.12, N = 3SE +/- 0.13, N = 3SE +/- 0.03, N = 3SE +/- 0.03, N = 341.6357.1241.1341.3239.7939.501. (CC) gcc options: -O2 -lreadline -ltermcap -lz -ldl -lpthread

Go Benchmarks

Test: http

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgNanoseconds/Operation, Fewer Is BetterGo BenchmarksTest: httpLinux 4.19 Gitspectre_v2_app2app Lite5K10K15K20K25KSE +/- 14.67, N = 3SE +/- 6.89, N = 3SE +/- 14.25, N = 3SE +/- 40.18, N = 3SE +/- 115.30, N = 3SE +/- 47.05, N = 380527973828784342089421572

Go Benchmarks

Test: json

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgNanoseconds/Operation, Fewer Is BetterGo BenchmarksTest: jsonLinux 4.19 Gitspectre_v2_app2app Lite3M6M9M12M15MSE +/- 5211.35, N = 3SE +/- 9716.20, N = 3SE +/- 25965.56, N = 11SE +/- 26343.54, N = 3SE +/- 12462.39, N = 3SE +/- 55233.34, N = 312576412125927542570590257391731888793235572

Go Benchmarks

Test: build

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgNanoseconds/Operation, Fewer Is BetterGo BenchmarksTest: buildLinux 4.19 Gitspectre_v2_app2app Lite5000M10000M15000M20000M25000MSE +/- 236214272.49, N = 4SE +/- 144822724.15, N = 3SE +/- 185119497.26, N = 3SE +/- 174915826.60, N = 3SE +/- 228626186.00, N = 3SE +/- 25722085.63, N = 3136990987381360587533221232716297212860059282307190465122909851096

Go Benchmarks

Test: garbage

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgNanoseconds/Operation, Fewer Is BetterGo BenchmarksTest: garbageLinux 4.19 Gitspectre_v2_app2app Lite600K1200K1800K2400K3000KSE +/- 546.45, N = 3SE +/- 4878.08, N = 3SE +/- 8593.50, N = 3SE +/- 2207.72, N = 3SE +/- 1895.55, N = 3SE +/- 482.15, N = 326248692631563871939856776874918868566

Java SciMark

Computational Test: Composite

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgMflops, More Is BetterJava SciMark 2.0Computational Test: CompositeLinux 4.19 Gitspectre_v2_app2app Lite5001000150020002500SE +/- 4.23, N = 4SE +/- 4.26, N = 4SE +/- 3.57, N = 4SE +/- 6.71, N = 4SE +/- 1.11, N = 4SE +/- 3.34, N = 4243624222046206419991988

LuaJIT

Test: Composite

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgMflops, More Is BetterLuaJIT 2.0.5Test: CompositeLinux 4.19 Gitspectre_v2_app2app Lite30060090012001500SE +/- 2.41, N = 3SE +/- 1.69, N = 3SE +/- 0.81, N = 3SE +/- 1.31, N = 3SE +/- 1.70, N = 3SE +/- 2.20, N = 31423141413611363112711301. (CC) gcc options: -lm -ldl -O2 -fomit-frame-pointer -U_FORTIFY_SOURCE -fno-stack-protector

Stockfish

Total Time

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgNodes Per Second, More Is BetterStockfish 9Total TimeLinux 4.19 Gitspectre_v2_app2app Lite15M30M45M60M75MSE +/- 60344.84, N = 3SE +/- 93785.82, N = 3SE +/- 636668.26, N = 3SE +/- 647874.55, N = 3SE +/- 451216.84, N = 3SE +/- 255373.92, N = 31093267610996474706182456851482058295761577143321. (CXX) g++ options: -m64 -lpthread -fno-exceptions -std=c++11 -pedantic -O3 -msse -msse3 -mpopcnt -flto

ebizzy

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgRecords/s, More Is Betterebizzy 0.3Linux 4.19 Gitspectre_v2_app2app Lite300K600K900K1200K1500KSE +/- 4628.95, N = 12SE +/- 3725.34, N = 4SE +/- 13961.01, N = 3SE +/- 19629.70, N = 12SE +/- 5397.73, N = 3SE +/- 8303.48, N = 3248641235247984344953765117049711282871. (CC) gcc options: -pthread -lpthread -O3 -march=native

Timed Linux Kernel Compilation

Time To Compile

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgSeconds, Fewer Is BetterTimed Linux Kernel Compilation 4.18Time To CompileLinux 4.19 Gitspectre_v2_app2app Lite306090120150SE +/- 1.12, N = 3SE +/- 0.84, N = 3SE +/- 0.41, N = 12SE +/- 0.38, N = 12SE +/- 0.49, N = 9SE +/- 0.48, N = 9157.34157.4333.9934.0742.8942.89

Timed LLVM Compilation

Time To Compile

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgSeconds, Fewer Is BetterTimed LLVM Compilation 6.0.1Time To CompileLinux 4.19 Gitspectre_v2_app2app Lite2004006008001000917926171171239230

Gzip Compression

Linux Source Tree Archiving To .tar.gz

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgSeconds, Fewer Is BetterGzip CompressionLinux Source Tree Archiving To .tar.gzLinux 4.19 Gitspectre_v2_app2app Lite1020304050SE +/- 0.49, N = 3SE +/- 0.20, N = 3SE +/- 0.08, N = 3SE +/- 0.07, N = 3SE +/- 0.15, N = 3SE +/- 0.19, N = 337.9337.7640.2040.3946.0646.04

Zstd Compression

Compressing ubuntu-16.04.3-server-i386.img, Compression Level 19

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgSeconds, Fewer Is BetterZstd Compression 1.3.4Compressing ubuntu-16.04.3-server-i386.img, Compression Level 19Linux 4.19 Gitspectre_v2_app2app Lite4080120160200SE +/- 0.17, N = 3SE +/- 0.12, N = 3SE +/- 0.27, N = 3SE +/- 0.17, N = 3SE +/- 0.15, N = 3SE +/- 0.06, N = 31291301211201621621. (CC) gcc options: -O3 -pthread -lz -llzma

Perl Benchmarks

Test: Pod2html

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgSeconds, Fewer Is BetterPerl BenchmarksTest: Pod2htmlLinux 4.19 Gitspectre_v2_app2app Lite0.04290.08580.12870.17160.2145SE +/- 0.00017351, N = 3SE +/- 0.00016559, N = 3SE +/- 0.00022835, N = 3SE +/- 0.00013349, N = 3SE +/- 0.00059751, N = 3SE +/- 0.00104978, N = 30.117379640.117430810.118565980.118382950.190014760.19061629

Perl Benchmarks

Test: Interpreter

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgSeconds, Fewer Is BetterPerl BenchmarksTest: InterpreterLinux 4.19 Gitspectre_v2_app2app Lite0.00070.00140.00210.00280.0035SE +/- 0.00006973, N = 12SE +/- 0.00003250, N = 12SE +/- 0.00000376, N = 3SE +/- 0.00000369, N = 3SE +/- 0.00001210, N = 3SE +/- 0.00000943, N = 30.001212410.001110160.003133370.003120670.002177860.00205963

R Benchmark

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgSeconds, Fewer Is BetterR BenchmarkLinux 4.19 Gitspectre_v2_app2app Lite0.10470.20940.31410.41880.5235SE +/- 0.0012, N = 3SE +/- 0.0003, N = 3SE +/- 0.0033, N = 3SE +/- 0.0012, N = 3SE +/- 0.0013, N = 3SE +/- 0.0023, N = 30.20110.20080.42950.42760.46530.46521. R scripting front-end version 3.5.1 (2018-07-02)

PostgreSQL pgbench

Scaling: Buffer Test - Test: Normal Load - Mode: Read Only

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgTPS, More Is BetterPostgreSQL pgbench 10.3Scaling: Buffer Test - Test: Normal Load - Mode: Read OnlyLinux 4.19 Gitspectre_v2_app2app Lite120K240K360K480K600KSE +/- 58.67, N = 3SE +/- 203.79, N = 3SE +/- 783.02, N = 3SE +/- 1823.67, N = 3SE +/- 4006.81, N = 3SE +/- 1760.32, N = 31143331143065752855813753988383993421. (CC) gcc options: -fno-strict-aliasing -fwrapv -O2 -lpgcommon -lpgport -lpq -lpthread -lrt -lcrypt -ldl -lm

PostgreSQL pgbench

Scaling: Buffer Test - Test: Normal Load - Mode: Read Write

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgTPS, More Is BetterPostgreSQL pgbench 10.3Scaling: Buffer Test - Test: Normal Load - Mode: Read WriteLinux 4.19 Gitspectre_v2_app2app Lite13002600390052006500SE +/- 26.94, N = 3SE +/- 45.27, N = 12SE +/- 51.07, N = 3SE +/- 63.57, N = 3SE +/- 95.24, N = 3SE +/- 67.75, N = 34613465555045433581458721. (CC) gcc options: -fno-strict-aliasing -fwrapv -O2 -lpgcommon -lpgport -lpq -lpthread -lrt -lcrypt -ldl -lm

GNU Octave Benchmark

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgSeconds, Fewer Is BetterGNU Octave Benchmark 4.4.1Linux 4.19 Gitspectre_v2_app2app Lite612182430SE +/- 0.04, N = 3SE +/- 0.03, N = 3SE +/- 0.28, N = 12SE +/- 0.40, N = 3SE +/- 0.29, N = 3SE +/- 0.38, N = 415.5515.2022.9622.6221.3522.26

Redis

Test: SADD

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgRequests Per Second, More Is BetterRedis 4.0.8Test: SADDLinux 4.19 Gitspectre_v2_app2app Lite500K1000K1500K2000K2500KSE +/- 8727.08, N = 3SE +/- 41372.06, N = 3SE +/- 37389.96, N = 12SE +/- 34358.79, N = 12SE +/- 10531.09, N = 3SE +/- 22831.75, N = 32172409215213218711881887801160099215746331. (CC) gcc options: -ggdb -rdynamic -lm -ldl -pthread

Redis

Test: GET

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgRequests Per Second, More Is BetterRedis 4.0.8Test: GETLinux 4.19 Gitspectre_v2_app2app Lite600K1200K1800K2400K3000KSE +/- 25191.81, N = 3SE +/- 26301.14, N = 3SE +/- 64219.35, N = 12SE +/- 36022.22, N = 4SE +/- 32034.96, N = 3SE +/- 25553.62, N = 42486014273773422935842110432170090517223061. (CC) gcc options: -ggdb -rdynamic -lm -ldl -pthread

Redis

Test: SET

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgRequests Per Second, More Is BetterRedis 4.0.8Test: SETLinux 4.19 Gitspectre_v2_app2app Lite400K800K1200K1600K2000KSE +/- 26223.93, N = 12SE +/- 17999.00, N = 3SE +/- 23976.62, N = 12SE +/- 35978.81, N = 12SE +/- 8861.06, N = 3SE +/- 12397.25, N = 31878075193707116741811666841134722113247331. (CC) gcc options: -ggdb -rdynamic -lm -ldl -pthread

Blender

Blend File: Barbershop - Compute: CPU-Only

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgSeconds, Fewer Is BetterBlender 2.79aBlend File: Barbershop - Compute: CPU-OnlyLinux 4.19 Gitspectre_v2_app2app Lite500100015002000250022842280373375503502

PyBench

Total For Average Test Times

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgMilliseconds, Fewer Is BetterPyBench 2018-02-16Total For Average Test TimesLinux 4.19 Gitspectre_v2_app2app Lite30060090012001500SE +/- 1.45, N = 3SE +/- 3.33, N = 3SE +/- 2.65, N = 3SE +/- 1.33, N = 3SE +/- 5.04, N = 3SE +/- 4.48, N = 3104710481128113315241522

NGINX Benchmark

Static Web Page Serving

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgRequests Per Second, More Is BetterNGINX Benchmark 1.9.9Static Web Page ServingLinux 4.19 Gitspectre_v2_app2app Lite8K16K24K32K40KSE +/- 207.42, N = 3SE +/- 82.41, N = 3SE +/- 57.80, N = 3SE +/- 181.76, N = 3SE +/- 67.47, N = 3SE +/- 33.58, N = 33737237015297733012123617236021. (CC) gcc options: -lpthread -lcrypt -lcrypto -lz -O3 -march=native

Apache Siege

Concurrent Users: 100

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgTransactions Per Second, More Is BetterApache Siege 2.4.29Concurrent Users: 100Linux 4.19 Gitspectre_v2_app2app Lite9K18K27K36K45K3582943178299492919723529230411. (CC) gcc options: -O2 -lpthread -ldl -lssl -lcrypto

Apache Siege

Concurrent Users: 250

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgTransactions Per Second, More Is BetterApache Siege 2.4.29Concurrent Users: 250Linux 4.19 Gitspectre_v2_app2app Lite9K18K27K36K45K4145343937294013000823223231951. (CC) gcc options: -O2 -lpthread -ldl -lssl -lcrypto

PHPBench

PHP Benchmark Suite

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgScore, More Is BetterPHPBench 0.8.1PHP Benchmark SuiteLinux 4.19 Gitspectre_v2_app2app Lite140K280K420K560K700KSE +/- 2261.90, N = 3SE +/- 1094.96, N = 3SE +/- 251.74, N = 3SE +/- 1129.59, N = 3SE +/- 2110.63, N = 3SE +/- 1066.97, N = 3638446640994592819590113397506397883

Scikit-Learn

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgSeconds, Fewer Is BetterScikit-Learn 0.17.1Linux 4.19 Gitspectre_v2_app2app Lite714212835SE +/- 0.03, N = 3SE +/- 0.01, N = 3SE +/- 0.46, N = 12SE +/- 0.53, N = 12SE +/- 1.04, N = 9SE +/- 0.83, N = 1215.7915.6419.7719.3128.2227.28

Sunflow Rendering System

Global Illumination + Image Synthesis

Xeon E3 v52 x Xeon GoldEPYC 7601OpenBenchmarking.orgSeconds, Fewer Is BetterSunflow Rendering System 0.07.2Global Illumination + Image SynthesisLinux 4.19 Gitspectre_v2_app2app Lite0.55581.11161.66742.22322.779SE +/- 0.03, N = 3SE +/- 0.01, N = 3SE +/- 0.02, N = 4SE +/- 0.02, N = 4SE +/- 0.01, N = 9SE +/- 0.02, N = 32.472.441.051.031.031.03


Phoronix Test Suite v10.8.4