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&rdt&grs.

ProcessorMotherboardChipsetMemoryDiskGraphicsMonitorNetworkAudioOSKernelDesktopDisplay ServerDisplay DriverCompilerFile-SystemScreen ResolutionEPYC 76012 x Xeon GoldXeon E3 v5 spectre_v2_app2app Lite Linux 4.19 Git Linux 4.19 Git spectre_v2_app2app Lite spectre_v2_app2app Lite Linux 4.19 GitAMD EPYC 7601 32-Core @ 2.20GHz (32 Cores / 64 Threads)TYAN B8026T70AE24HR (V1.02.B10 BIOS)AMD Family 17h129024MBSamsung SSD 970 EVO 250GBASPEED ASPEED FamilyVE228Broadcom and subsidiaries NetXtreme BCM5720 Gigabit PCIeUbuntu 18.104.19.0-rc2-spec2useruser-phx (x86_64) 20180926GNOME Shell 3.30.0X Server 1.20.1modesetting 1.20.1GCC 8.2.0ext41920x10804.19.0-999-generic (x86_64) 201809252 x Intel Xeon Gold 6138 @ 3.70GHz (40 Cores / 80 Threads)TYAN S7106 (V1.01 BIOS)Intel Sky Lake-E DMI3 Registers96256MBIntel I210 Gigabit Connection4.19.0-rc2-spec2useruser-phx (x86_64) 20180926Intel 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-150016384MBSapphire AMD Radeon RX 470/480/570/570X/580/580X 4096MBRealtek ALC1150Intel Connection4.19.0-999-generic (x86_64) 20180925OpenBenchmarking.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- EPYC 7601: spectre_v2_app2app Lite: Scaling Governor: acpi-cpufreq ondemand- EPYC 7601: Linux 4.19 Git: Scaling Governor: acpi-cpufreq ondemand- 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- Xeon E3 v5: spectre_v2_app2app Lite: Scaling Governor: intel_pstate powersave- Xeon E3 v5: Linux 4.19 Git: Scaling Governor: intel_pstate powersavePython Details- Python 2.7.15+ + Python 3.6.6+Security Details- EPYC 7601: spectre_v2_app2app Lite: __user pointer sanitization + Full AMD retpoline IBPB-lite STIBP-lite RSB filling + SSB disabled via prctl and seccomp- EPYC 7601: Linux 4.19 Git: __user pointer sanitization + Full AMD retpoline IBPB + SSB disabled via prctl and seccomp- 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- 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- 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

stockfish: Total Timeblender: Barbershop - CPU-Onlybuild-llvm: Time To Compilepgbench: Buffer Test - Normal Load - Read Onlyebizzy: go-benchmark: jsonbuild-linux-kernel: Time To Compilego-benchmark: garbageperl-benchmark: Interpretergo-benchmark: httpsunflow: Global Illumination + Image Synthesisrbenchmark: apache-siege: 250apache-siege: 100go-benchmark: buildperl-benchmark: Pod2htmlphpbench: PHP Benchmark Suiteredis: GETnginx: Static Web Page Servingoctave-benchmark: redis: SETpybench: Total For Average Test Timessqlite: Timed SQLite Insertionsredis: SADDcompress-zstd: Compressing ubuntu-16.04.3-server-i386.img, Compression Level 19pgbench: Buffer Test - Normal Load - Read Writeluajit: Compositejava-scimark2: Compositecompress-gzip: Linux Source Tree Archiving To .tar.gzscikit-learn: EPYC 76012 x Xeon GoldXeon E3 v5 spectre_v2_app2app Lite Linux 4.19 Git Linux 4.19 Git spectre_v2_app2app Lite spectre_v2_app2app Lite Linux 4.19 Git577143325022303993421128287323557242.898685660.00205963215721.030.46522319523041229098510960.1906162939788317223062360222.261324733152239.50157463316258721130198846.0427.28582957615032393988381170497318887942.898749180.00217786208941.030.46532322323529230719046510.1900147639750617009052361721.351347221152439.79160099216258141127199946.0628.2270618245373171575285984344257059033.998719390.0031333782871.050.42952940129949212327162970.1185659859281922935842977322.961674181112841.13187118812155041361204640.2019.7768514820375171581375953765257391734.078567760.0031206784341.030.42763000829197212860059280.1183829559011321104323012122.621666841113341.32188780112054331363206440.3919.3110996474228092611430623524712592754157.4326315630.0011101679732.440.20084393743178136058753320.1174308164099427377343701515.201937071104857.12215213213046551414242237.7615.6410932676228491711433324864112576412157.3426248690.0012124180522.470.20114145335829136990987380.1173796463844624860143737215.551878075104741.63217240912946131423243637.9315.79OpenBenchmarking.org

Stockfish

Total Time

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgNodes Per Second, More Is BetterStockfish 9Total Timespectre_v2_app2app LiteLinux 4.19 Git15M30M45M60M75MSE +/- 255373.92, N = 3SE +/- 451216.84, N = 3SE +/- 636668.26, N = 3SE +/- 647874.55, N = 3SE +/- 93785.82, N = 3SE +/- 60344.84, N = 35771433258295761706182456851482010996474109326761. (CXX) g++ options: -m64 -lpthread -fno-exceptions -std=c++11 -pedantic -O3 -msse -msse3 -mpopcnt -flto

Blender

Blend File: Barbershop - Compute: CPU-Only

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgSeconds, Fewer Is BetterBlender 2.79aBlend File: Barbershop - Compute: CPU-Onlyspectre_v2_app2app LiteLinux 4.19 Git500100015002000250050250337337522802284

Timed LLVM Compilation

Time To Compile

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgSeconds, Fewer Is BetterTimed LLVM Compilation 6.0.1Time To Compilespectre_v2_app2app LiteLinux 4.19 Git2004006008001000230239171171926917

PostgreSQL pgbench

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

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgTPS, More Is BetterPostgreSQL pgbench 10.3Scaling: Buffer Test - Test: Normal Load - Mode: Read Onlyspectre_v2_app2app LiteLinux 4.19 Git120K240K360K480K600KSE +/- 1760.32, N = 3SE +/- 4006.81, N = 3SE +/- 783.02, N = 3SE +/- 1823.67, N = 3SE +/- 203.79, N = 3SE +/- 58.67, N = 33993423988385752855813751143061143331. (CC) gcc options: -fno-strict-aliasing -fwrapv -O2 -lpgcommon -lpgport -lpq -lpthread -lrt -lcrypt -ldl -lm

ebizzy

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgRecords/s, More Is Betterebizzy 0.3spectre_v2_app2app LiteLinux 4.19 Git300K600K900K1200K1500KSE +/- 8303.48, N = 3SE +/- 5397.73, N = 3SE +/- 13961.01, N = 3SE +/- 19629.70, N = 12SE +/- 3725.34, N = 4SE +/- 4628.95, N = 12112828711704979843449537652352472486411. (CC) gcc options: -pthread -lpthread -O3 -march=native

Go Benchmarks

Test: json

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgNanoseconds/Operation, Fewer Is BetterGo BenchmarksTest: jsonspectre_v2_app2app LiteLinux 4.19 Git3M6M9M12M15MSE +/- 55233.34, N = 3SE +/- 12462.39, N = 3SE +/- 25965.56, N = 11SE +/- 26343.54, N = 3SE +/- 9716.20, N = 3SE +/- 5211.35, N = 332355723188879257059025739171259275412576412

Timed Linux Kernel Compilation

Time To Compile

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgSeconds, Fewer Is BetterTimed Linux Kernel Compilation 4.18Time To Compilespectre_v2_app2app LiteLinux 4.19 Git306090120150SE +/- 0.48, N = 9SE +/- 0.49, N = 9SE +/- 0.41, N = 12SE +/- 0.38, N = 12SE +/- 0.84, N = 3SE +/- 1.12, N = 342.8942.8933.9934.07157.43157.34

Go Benchmarks

Test: garbage

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgNanoseconds/Operation, Fewer Is BetterGo BenchmarksTest: garbagespectre_v2_app2app LiteLinux 4.19 Git600K1200K1800K2400K3000KSE +/- 482.15, N = 3SE +/- 1895.55, N = 3SE +/- 8593.50, N = 3SE +/- 2207.72, N = 3SE +/- 4878.08, N = 3SE +/- 546.45, N = 386856687491887193985677626315632624869

Perl Benchmarks

Test: Interpreter

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgSeconds, Fewer Is BetterPerl BenchmarksTest: Interpreterspectre_v2_app2app LiteLinux 4.19 Git0.00070.00140.00210.00280.0035SE +/- 0.00000943, N = 3SE +/- 0.00001210, N = 3SE +/- 0.00000376, N = 3SE +/- 0.00000369, N = 3SE +/- 0.00003250, N = 12SE +/- 0.00006973, N = 120.002059630.002177860.003133370.003120670.001110160.00121241

Go Benchmarks

Test: http

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgNanoseconds/Operation, Fewer Is BetterGo BenchmarksTest: httpspectre_v2_app2app LiteLinux 4.19 Git5K10K15K20K25KSE +/- 47.05, N = 3SE +/- 115.30, N = 3SE +/- 14.25, N = 3SE +/- 40.18, N = 3SE +/- 6.89, N = 3SE +/- 14.67, N = 321572208948287843479738052

Sunflow Rendering System

Global Illumination + Image Synthesis

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgSeconds, Fewer Is BetterSunflow Rendering System 0.07.2Global Illumination + Image Synthesisspectre_v2_app2app LiteLinux 4.19 Git0.55581.11161.66742.22322.779SE +/- 0.02, N = 3SE +/- 0.01, N = 9SE +/- 0.02, N = 4SE +/- 0.02, N = 4SE +/- 0.01, N = 3SE +/- 0.03, N = 31.031.031.051.032.442.47

R Benchmark

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgSeconds, Fewer Is BetterR Benchmarkspectre_v2_app2app LiteLinux 4.19 Git0.10470.20940.31410.41880.5235SE +/- 0.0023, N = 3SE +/- 0.0013, N = 3SE +/- 0.0033, N = 3SE +/- 0.0012, N = 3SE +/- 0.0003, N = 3SE +/- 0.0012, N = 30.46520.46530.42950.42760.20080.20111. R scripting front-end version 3.5.1 (2018-07-02)

Apache Siege

Concurrent Users: 250

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgTransactions Per Second, More Is BetterApache Siege 2.4.29Concurrent Users: 250spectre_v2_app2app LiteLinux 4.19 Git9K18K27K36K45K2319523223294013000843937414531. (CC) gcc options: -O2 -lpthread -ldl -lssl -lcrypto

Apache Siege

Concurrent Users: 100

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgTransactions Per Second, More Is BetterApache Siege 2.4.29Concurrent Users: 100spectre_v2_app2app LiteLinux 4.19 Git9K18K27K36K45K2304123529299492919743178358291. (CC) gcc options: -O2 -lpthread -ldl -lssl -lcrypto

Go Benchmarks

Test: build

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgNanoseconds/Operation, Fewer Is BetterGo BenchmarksTest: buildspectre_v2_app2app LiteLinux 4.19 Git5000M10000M15000M20000M25000MSE +/- 25722085.63, N = 3SE +/- 228626186.00, N = 3SE +/- 185119497.26, N = 3SE +/- 174915826.60, N = 3SE +/- 144822724.15, N = 3SE +/- 236214272.49, N = 4229098510962307190465121232716297212860059281360587533213699098738

Perl Benchmarks

Test: Pod2html

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgSeconds, Fewer Is BetterPerl BenchmarksTest: Pod2htmlspectre_v2_app2app LiteLinux 4.19 Git0.04290.08580.12870.17160.2145SE +/- 0.00104978, N = 3SE +/- 0.00059751, N = 3SE +/- 0.00022835, N = 3SE +/- 0.00013349, N = 3SE +/- 0.00016559, N = 3SE +/- 0.00017351, N = 30.190616290.190014760.118565980.118382950.117430810.11737964

PHPBench

PHP Benchmark Suite

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgScore, More Is BetterPHPBench 0.8.1PHP Benchmark Suitespectre_v2_app2app LiteLinux 4.19 Git140K280K420K560K700KSE +/- 1066.97, N = 3SE +/- 2110.63, N = 3SE +/- 251.74, N = 3SE +/- 1129.59, N = 3SE +/- 1094.96, N = 3SE +/- 2261.90, N = 3397883397506592819590113640994638446

Redis

Test: GET

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgRequests Per Second, More Is BetterRedis 4.0.8Test: GETspectre_v2_app2app LiteLinux 4.19 Git600K1200K1800K2400K3000KSE +/- 25553.62, N = 4SE +/- 32034.96, N = 3SE +/- 64219.35, N = 12SE +/- 36022.22, N = 4SE +/- 26301.14, N = 3SE +/- 25191.81, N = 31722306170090522935842110432273773424860141. (CC) gcc options: -ggdb -rdynamic -lm -ldl -pthread

NGINX Benchmark

Static Web Page Serving

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgRequests Per Second, More Is BetterNGINX Benchmark 1.9.9Static Web Page Servingspectre_v2_app2app LiteLinux 4.19 Git8K16K24K32K40KSE +/- 33.58, N = 3SE +/- 67.47, N = 3SE +/- 57.80, N = 3SE +/- 181.76, N = 3SE +/- 82.41, N = 3SE +/- 207.42, N = 32360223617297733012137015373721. (CC) gcc options: -lpthread -lcrypt -lcrypto -lz -O3 -march=native

GNU Octave Benchmark

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgSeconds, Fewer Is BetterGNU Octave Benchmark 4.4.1spectre_v2_app2app LiteLinux 4.19 Git612182430SE +/- 0.38, N = 4SE +/- 0.29, N = 3SE +/- 0.28, N = 12SE +/- 0.40, N = 3SE +/- 0.03, N = 3SE +/- 0.04, N = 322.2621.3522.9622.6215.2015.55

Redis

Test: SET

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgRequests Per Second, More Is BetterRedis 4.0.8Test: SETspectre_v2_app2app LiteLinux 4.19 Git400K800K1200K1600K2000KSE +/- 12397.25, N = 3SE +/- 8861.06, N = 3SE +/- 23976.62, N = 12SE +/- 35978.81, N = 12SE +/- 17999.00, N = 3SE +/- 26223.93, N = 121324733134722116741811666841193707118780751. (CC) gcc options: -ggdb -rdynamic -lm -ldl -pthread

PyBench

Total For Average Test Times

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgMilliseconds, Fewer Is BetterPyBench 2018-02-16Total For Average Test Timesspectre_v2_app2app LiteLinux 4.19 Git30060090012001500SE +/- 4.48, N = 3SE +/- 5.04, N = 3SE +/- 2.65, N = 3SE +/- 1.33, N = 3SE +/- 3.33, N = 3SE +/- 1.45, N = 3152215241128113310481047

SQLite

Timed SQLite Insertions

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgSeconds, Fewer Is BetterSQLite 3.22Timed SQLite Insertionsspectre_v2_app2app LiteLinux 4.19 Git1326395265SE +/- 0.03, N = 3SE +/- 0.03, N = 3SE +/- 0.12, N = 3SE +/- 0.13, N = 3SE +/- 4.84, N = 9SE +/- 0.12, N = 339.5039.7941.1341.3257.1241.631. (CC) gcc options: -O2 -lreadline -ltermcap -lz -ldl -lpthread

Redis

Test: SADD

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgRequests Per Second, More Is BetterRedis 4.0.8Test: SADDspectre_v2_app2app LiteLinux 4.19 Git500K1000K1500K2000K2500KSE +/- 22831.75, N = 3SE +/- 10531.09, N = 3SE +/- 37389.96, N = 12SE +/- 34358.79, N = 12SE +/- 41372.06, N = 3SE +/- 8727.08, N = 31574633160099218711881887801215213221724091. (CC) gcc options: -ggdb -rdynamic -lm -ldl -pthread

Zstd Compression

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

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgSeconds, Fewer Is BetterZstd Compression 1.3.4Compressing ubuntu-16.04.3-server-i386.img, Compression Level 19spectre_v2_app2app LiteLinux 4.19 Git4080120160200SE +/- 0.06, N = 3SE +/- 0.15, N = 3SE +/- 0.27, N = 3SE +/- 0.17, N = 3SE +/- 0.12, N = 3SE +/- 0.17, N = 31621621211201301291. (CC) gcc options: -O3 -pthread -lz -llzma

PostgreSQL pgbench

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

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgTPS, More Is BetterPostgreSQL pgbench 10.3Scaling: Buffer Test - Test: Normal Load - Mode: Read Writespectre_v2_app2app LiteLinux 4.19 Git13002600390052006500SE +/- 67.75, N = 3SE +/- 95.24, N = 3SE +/- 51.07, N = 3SE +/- 63.57, N = 3SE +/- 45.27, N = 12SE +/- 26.94, N = 35872581455045433465546131. (CC) gcc options: -fno-strict-aliasing -fwrapv -O2 -lpgcommon -lpgport -lpq -lpthread -lrt -lcrypt -ldl -lm

LuaJIT

Test: Composite

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgMflops, More Is BetterLuaJIT 2.0.5Test: Compositespectre_v2_app2app LiteLinux 4.19 Git30060090012001500SE +/- 2.20, N = 3SE +/- 1.70, N = 3SE +/- 0.81, N = 3SE +/- 1.31, N = 3SE +/- 1.69, N = 3SE +/- 2.41, N = 31130112713611363141414231. (CC) gcc options: -lm -ldl -O2 -fomit-frame-pointer -U_FORTIFY_SOURCE -fno-stack-protector

Java SciMark

Computational Test: Composite

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgMflops, More Is BetterJava SciMark 2.0Computational Test: Compositespectre_v2_app2app LiteLinux 4.19 Git5001000150020002500SE +/- 3.34, N = 4SE +/- 1.11, N = 4SE +/- 3.57, N = 4SE +/- 6.71, N = 4SE +/- 4.26, N = 4SE +/- 4.23, N = 4198819992046206424222436

Gzip Compression

Linux Source Tree Archiving To .tar.gz

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgSeconds, Fewer Is BetterGzip CompressionLinux Source Tree Archiving To .tar.gzspectre_v2_app2app LiteLinux 4.19 Git1020304050SE +/- 0.19, N = 3SE +/- 0.15, N = 3SE +/- 0.08, N = 3SE +/- 0.07, N = 3SE +/- 0.20, N = 3SE +/- 0.49, N = 346.0446.0640.2040.3937.7637.93

Scikit-Learn

EPYC 76012 x Xeon GoldXeon E3 v5OpenBenchmarking.orgSeconds, Fewer Is BetterScikit-Learn 0.17.1spectre_v2_app2app LiteLinux 4.19 Git714212835SE +/- 0.83, N = 12SE +/- 1.04, N = 9SE +/- 0.46, N = 12SE +/- 0.53, N = 12SE +/- 0.01, N = 3SE +/- 0.03, N = 327.2828.2219.7719.3115.6415.79


Phoronix Test Suite v10.8.5