Meltdown fix impact on Redis performances in virtualized environments
gist.github.com
gist.github.com
~8% pipelined SET performance reduction after patch
~15% pipelined GET performance reduction after patch
~29% non-pipelined SET performance reduction after patch
~25% non-pipelines GET performance reduction after patch
It'd be fun to set up the hardware and do a full matrix benchmark of patched/unpatched host and patched/unpatched guest.
If you mean their results.. they actually show an increase in perf in later kernel versions.
Based on
https://github.com/phoronix-test-suite/test-profiles/tree/ma...
it looks like they just use the default configuration and run the benchmark with
-n 1000000 -P 32 -q -c 50 --csvMy expectation is we may see AWS apply some significant discounting to AWS services as a result, though that doesn't help all of us who utilize mostly prepaid reserved instances.
If, however, major customers make up the majority of revenue, then the answer seems less clear to me.
It'll happen once one of the 3 main clouds breaks ranks and discounts their rates to match.
I can understand how the attack works for JavaScript to read from the parent process / I.e. steal session cookies, but how could this attack work across VM boundaries?
>The branch history buffer state is leaked in steps of 2 bits by measuring misprediction rates of an indirect call with two targets.
That leaks out the physical address of the KVM driver, against which more code is speculative executed, with side channel being used to make these results deducible within the guest's memory area.
Technically speaking, the guest can't fully unsandbox (i.e., they can't run commands on the physical host OS) with Spectre/Meltdown alone, but they can read the memory content of the entire physical host in the case of Meltdown, or all of userspace in the case of a Meltdown-less Spectre.
This is being mitigated by retpoline + microcode update + new kernel parameters IBRS and IBPB, which will make it so that users can't mislead the CPU with speculative indirection (by killing the functionality in risky situations, another layer of slowdowns we will all have to confront soon; impact is not seen until major distros recompile everything with retpoline). PTI itself wouldn't mitigate that leakage, it just mitigates its exploitation to read back the host memory.
However, this is a hardware thing that affects the host OS. If the host already has these features enabled on the real kernel, what value do they provide within the guest itself? Is timing _within the guest kernel_ accurate enough for sandboxed exploitation, making this a universal sandbox-constrained privilege escalation? I don't know. It'd be nice to avoid the redundant overhead, of course.
[0] https://googleprojectzero.blogspot.com/2018/01/reading-privi...
EDIT: Actually, thinking about this some more ... if the host has retpoline and the microcode update, the indirect jump technique can't be used to deduce the state of the BHB, so the kernel addresses never leak. If KVM's _internal_ kernel space, which isn't actually protected by the CPU's ring 0 (I think, unless this is also provided by VT-x?), is guarded by whichever of IBRS/IBPB is relevant, then would those mitigations prevent guest exploitation as well regardless of timing semantics?
https://cloud.google.com/container-optimized-os/docs/release...
I believe the increase cost of I/O is going to hit Amazon and can not be passed to the customer as what you pay is contractual.
Then with computer instances the customer is paying more for ultimately the same amount of compute and that is a PR issue for Amazon and the other cloud providers.
Seems like Amazon would not be OK with that and will want to pass it to Intel somehow.
I think people are blowing this way out of proportion.
But computer instances the extra cost will be on the customer and it is hard to see Amazon taking the PR hit and not somehow trying to put it on Intel.
Also, theoretically, the KVM driver and/or QEMU could be updated to block speculative execution attacks specific to guest passthrough, though admittedly I haven't done any KVM or VT-x hacking so I don't know its intricacies; maybe this wouldn't work?
With a host that is using new vendor microcode to disable branch prediction within unsafe contexts (IBRS as a global alternative to retpoline, or IBPB), speculative execution attacks may be sufficiently mitigated at the host level without necessitating additional mitigation at the guest level.
I'm not sure if anyone who doesn't work at Intel knows that for sure yet, since it seems that some people are still trying to figure out how to get the new microcodes...
The host measures will not protect against another variant of Spectre or Meltdown within the VM even if the host performs context switches. The frequency of switches is just too low to disrupt a single cycle of the attack. So the attack will be just slowed down. In addition, as processes within VM have both access to high-resolution timer and CPU performance counters, the attack can detect context switches allowing for simpler recovery from them.
> Test performed with AOF enabled
AOF is a type of persistence: https://redis.io/topics/persistence
Most of the time, I've used Redis with (I think) RDB persistence, just in case. Usually we've used it as an in-memory cache.
Ok, that makes a lot of sense, thanks!
This is often used to reduce latency but only works with operations that don't depend on the preceding operation.
There is redis documentation for this, which is literally the first result for searching "pipelining redis":
https://redis.io/topics/pipelining
HN has a standard which at minimum is above LMGTFY.
In the old days of the internet, asking for anything searchable is the action of last resort, and generally considered quite rude unless truly unfindable or incomprehensible. Taking action on one's own intellectual curiosity is invaluable for education.