Re: PSA: New intel MDS vulnerability mitigations cause measurable slowdown - Mailing list pgsql-hackers
From | Thomas Munro |
---|---|
Subject | Re: PSA: New intel MDS vulnerability mitigations cause measurable slowdown |
Date | |
Msg-id | CA+hUKG+Z=zt+tHT2eQ4WzBp7C-7WX8R0H=DtLz25cOzc3EHzLw@mail.gmail.com Whole thread Raw |
In response to | Re: PSA: New intel MDS vulnerability mitigations cause measurableslowdown (Andres Freund <andres@anarazel.de>) |
Responses |
Re: PSA: New intel MDS vulnerability mitigations cause measurable slowdown
|
List | pgsql-hackers |
On Wed, May 15, 2019 at 1:13 PM Andres Freund <andres@anarazel.de> wrote: > > I've run a quick pgbench benchmark: > > > > *Without* disabling SMT, for readonly pgbench, I'm seeing regressions > > between 7-11%, depending on the size of shared_buffers (and some runtime > > variations). That's just on my laptop, with an i7-6820HQ / Haswell CPU. > > I'd be surprised if there weren't adversarial loads with bigger > > slowdowns - what gets more expensive with the mitigations is syscalls. This stuff landed in my FreeBSD 13.0-CURRENT kernel, so I was curious to measure it with and without the earlier mitigations. On my humble i7-8550U laptop with the new 1.22 microcode installed, with my usual settings of PTI=on and IBRS=off, so far MDS=VERW gives me ~1.5% loss of TPS with a single client, up to 4.3% loss of TPS for 16 clients, but it didn't go higher when I tried 32 clients. This was a tiny scale 10 database, though in a quick test it didn't look like it was worse with scale 100. With all three mitigations activated, my little dev machine has gone from being able to do ~11.8 million baseline syscalls per second to ~1.6 million, or ~1.4 million with the AVX variant of the mitigation. Raw getuid() syscalls per second: PTI IBRS MDS=off MDS=VERW MDS=AVX ===== ===== ======== ======== ======== off off 11798658 4764159 3274043 off on 2652564 1941606 1655356 on off 4973053 2932906 2339779 on on 1988527 1556922 1378798 pgbench read-only transactions per second, 1 client thread: PTI IBRS MDS=off MDS=VERW MDS=AVX ===== ===== ======== ======== ======== off off 19393 18949 18615 off on 17946 17586 17323 on off 19381 19015 18696 on on 18045 17709 17418 pgbench -M prepared read-only transactions per second, 1 client thread: PTI IBRS MDS=off MDS=VERW MDS=AVX ===== ===== ======== ======== ======== off off 35020 34049 33200 off on 31658 30902 30229 on off 35445 34353 33415 on on 32415 31599 30712 pgbench -M prepared read-only transactions per second, 4 client threads: PTI IBRS MDS=off MDS=VERW MDS=AVX ===== ===== ======== ======== ======== off off 79515 76898 76465 off on 63608 62220 61952 on off 77863 75431 74847 on on 62709 60790 60575 pgbench -M prepared read-only transactions per second, 16 client threads: PTI IBRS MDS=off MDS=VERW MDS=AVX ===== ===== ======== ======== ======== off off 125984 121164 120468 off on 112884 108346 107984 on off 121032 116156 115462 on on 108889 104636 104027 time gmake -s check: PTI IBRS MDS=off MDS=VERW MDS=AVX ===== ===== ======== ======== ======== off off 16.78 16.85 17.03 off on 18.19 18.81 19.08 on off 16.67 16.86 17.33 on on 18.58 18.83 18.99 -- Thomas Munro https://enterprisedb.com
pgsql-hackers by date: