
Analyzing Core I9-9900K performance with Spectre and Meltdown mitigations - pplonski86
https://www.anandtech.com/show/13659/analyzing-core-i9-9900k-performance-with-spectre-and-meltdown-hardware-mitigations
======
MR4D
Conclusion at the end is fairly brutal:

 _“The long and short of matters then is that based on the testing we 've done
thus far, it doesn't look like Coffee Lake Refresh recovers any of the
performance the original Coffee Lake loses from the Meltdown and Spectre
fixes. Coffee Lake was always less impacted than older architectures, but
whatever performance hit it took remains in the Refresh CPU design.”_

~~~
duxup
Forgive me as I'm nowhere near knowledgeable in CPUs or such so my terminology
will be way off.

For any CPU designed with the expectation of using the old method of memory
access prediction without any protections... can we expect they'll ever show a
significant performance recovery?

I guess I always assumed the answer was no.

~~~
ethbro
(Someone please correct me if I'm wrong) Without adding additional hardware,
likely not significant.

The way you avoid some of the impacted scenarios (at modest performance
impact) is with additional hardware or microarchitecture changes.

Basically, the task is 'Ensure processor state, as observed by another
process, never changes because of speculative execution branches.'

Which is a high bar to meet, especially if you want to simultaneously optimize
your execution unit utilization.

------
tedunangst
How did they confirm that the mitigations weren't still being used? If you're
still using separate page tables for the kernel, well of course it's going to
remain slow. The point of the fixed silicon is so you don't need the
mitigation, not that the mitigation gets faster.

~~~
opencl
The "fixed silicon" at least so far mostly seems to be hardware
implementations of the existing software mitigation techniques with very
similar performance characteristics.

~~~
tedunangst
Can we test this? Can we install an unpatched OS and observe the same
performance penalty?

In the case of meltdown, it seems unlikely the CPU is maintaining its own
shadow page table. How would it do that?

~~~
IntelMiner
You could compile a Linux kernel with the Spectre defenses disabled. I assume
userspace software that includes mitgations could also be patched out in the
same way for testing

------
__bjoernd
Performance is all nice and such. Did anyone validate that the new processors
actually mitigate Spectre and Meltdown?

~~~
fooker
They mitigate Spectre specifically but not speculative execution bugs in
general, which it seeems will be with us for the foreseeable future.

------
leeoniya
at least we'll regain some lost spectre-related perf hits once MS ships their
retpoline-patched kernel

[https://mspoweruser.com/windows-10-19h1-will-reduce-the-
impa...](https://mspoweruser.com/windows-10-19h1-will-reduce-the-impact-of-
spectre-mitigation-to-noise-level/)

~~~
greglindahl
Don't most machines with this kind of CPU in them not run Windows?

~~~
gji
If you’re talking about the i9-9900, it’s a very high clock frequency part
with “only” 8 cores and part of the consumer line (no ecc support). I’d
actually think most people who have it run Windows and use it for things like
gaming.

------
mbrumlow
I wonder how much Intel knew of this "bug" and went ahead and shipped with it
because of the speed increases.

~~~
wmf
This bug was designed around 1993 when security, multicore, and SMT didn't
really exist.

~~~
Fnoord
I suppose the question or insinuation would be whether it was discovered by
Intel (or someone else) in the meantime?

~~~
acct1771
The CIA and NSA called, they said "Yeah".

------
scottlocklin
They should make a "miss me yet?" meme for Itanium.

------
jammygit
What does this mean for developers buying laptops or workstations in the next
year - is amd or raptor looking like a better choice, or is Intel still
looking good even after the hit?

I'm reading that workstations might not need to worry for the most part for
example, unless a package gets compromised or some browser exploit makes it
through

~~~
syn_rst
I built a workstation with a Threadripper earlier this year, and I couldn't be
happier so far. The single-core performance advantage of Intel parts isn't
that big, and you get a ton of cores and PCIe lanes in exchange.

------
roadkillon101
How would you write a program to use these exploit? Unless I'm mistaken, I'm
under the impression you have to talk directly to the processor through the
kernel in order to do any of these exploit. You would have to write the code
in assembler or use a special library to do predictive branching?

~~~
__bjoernd
Yes, you'd write some assembly or C. Or your start from existing demos:
[https://samsclass.info/123/proj14/spectre.htm](https://samsclass.info/123/proj14/spectre.htm)

~~~
saagarjha
You don't need to write assembly or C; it is possible to perform an exploit by
utilizing any high-resolution clock, like the one JavaScript on most browsers
provided until recently.

------
billman
I would love to see a benchmark for VM performance before and after.

------
hu3
TLDR: hardware patch is as slow as the software one.

Except now it's a bit worse since I cannot disable the patch to recuperate
lost performance.

~~~
eganist
> I cannot disable the patch to recuperate lost performance.

Knowing the actual, demonstrated risks... why would you do this?

I'm not trying to devalue your position. I'm trying to understand your risk
calculation.

\---

Edit: Good catch, humans. The thought of running code in an unexposed,
isolated, largely trusted environment didn't cross my mind; I was moreso
focused on the environments I'm used to (where everything is connected and
nothing is trusted). That said, I'd argue that a database backend to any
typical webapp definitely qualifies as exposed.

~~~
e1ven
Not everyone is running any untrusted code. If you're running (for example) a
physics simulation, the mitigation doesn't gain you much.

~~~
w0utert
Fortunately the performance of these kinds of CPU-bound workloads are almost
completely unaffected by the mitigations, so you might as well enable them
anyway.

~~~
Filligree
One of them is "Disable hyperthreading," which absolutely has a severe
penalty.

~~~
germainelong
For some workloads it is better to have hyperthreading disabled.

------
AmVess
What a horrible test. They tested without hyperthreading turned on. Spectre
and Meltdown are risks BECAUSE of hyperthreading. It makes zero sense to test
the performance impact of the fixes with the major component of the problem
turned off.

~~~
BeeOnRope
Neither Spectre nor Meltdown are related to hyperthreading.

~~~
sigi45
I will look it up later but i thought hyperthreading increases it.

Perhaps i'm mixing something up but i thought that intel removed smt from the
newer generations (is removing it) because of it.

~~~
BeeOnRope
There have been other recent vulnerabilities, like the ax/ah thing described
in [1] or TLBleed that have relied on SMT, but not Meltdown or the original
Spectre variants.

[1] [http://gallium.inria.fr/blog/intel-skylake-
bug/](http://gallium.inria.fr/blog/intel-skylake-bug/)

