561 points · by _jcwu · 8y ago · 282 comments
Our Node.js, MongoDB, Python servers all with significant network traffic didn't have any measurable impact after KPTI patches on Amazon Linux on T2.medium(burst), M4.large, T2.large(burst) respectively.
Our impact is lesser than the figures suggested by redhat's advisory - https://access.redhat.com/articles/3307751
A back-end MMO game infrastructure server I have some understanding of in terms of the kind of load it is handling.
Similarly, the CPU on our Azure cloud box holding a half dozen dockerized Java apps I can't really see went up at all. Hovering around 10% CPU usage before and after patch.
I have performance trending going back 1 year and honestly other than Postgres, the performance #s are like rounding errors. PostgreSQL is getting about a 7% hit on our databases that don't fit in memory.
We also run SAP and again we're not seeing anything. The SAP Database runs on POWER Servers, so obviously unaffected at least by Meltdown.
In our case, there was a major kernel version change, so we're just at the tail end of QC before I can release things to production to begin the rolling restarts tomorrow morning.
Fearing automatic update by AWS resulting in performance issue, we rushed to update all our serves and gladly there weren't any performance impact.
I don't think not every one has been fortunate, there's still lot of variables reg performance impact of KPTI. This user here using PHP server mentioning 50% performance - https://twitter.com/timgostony/status/948682862844248065 and of-course OP issue is being covered here.
That doesn't strike you as a little odd?
> Sounds like servers handling lots of small UDP packets would be hit pretty hard.
NAME
sendmmsg - send multiple messages on a socket
SYNOPSIS
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <sys/socket.h>
int sendmmsg(int sockfd, struct mmsghdr *msgvec, unsigned int vlen,
unsigned int flags);From userspace' perspective, even if the same data isn't being broadcast at every client, just building up a big array (perhaps while looping over the input from recvmmsg()!) and spitting it out once would have the same semantics as just calling sendmsg() immediately on each, etc
These aren’t stats of the gameplay servers, these are the backend servers that handle matchmaking, player stats, inventories and progression.
I've worked on a variety of engines which were either UE or Quake based. All of them use UDP for temporal game state updates to avoid head of line blocking[2][3].
[1] https://answers.unrealengine.com/questions/197713/is-replica...
[2] https://stackoverflow.com/questions/39323556/why-do-game-dev...
[3] https://www.gamasutra.com/view/feature/131781/the_internet_s...
For things like getting stats, probably from a HTTP endpoint, sure, but for gameplay? The lag would be very bad, no? Lose a packet and everything is slowed down
I see this, which indicates it uses UDP: https://imgur.com/al6KTwT
and according to wireshark it's used heavily when in a game, so I assume that's the gameplay protocol. Also when I left my game (but stayed in the lobby), immediately the port 61879 stopped listening.
I'm not sure about UE4, but previous versions of the unreal engine used UDP for replication and RPC.
I worked on a huge open world third-person shooter always-online AAA game and it uses TCP for everything.
It also uses HTTPs to load a lot of other data such as server data, friends list, chat etc.
Unreal Engine comes with a version of chromium built in which is used for many in game things like social tabs, news, and in game purchases these all work over HTTP/S.
Game data is sent over 5222 TCP.
As far as I know, in Linux there is no support for multi-packet UDP vectored I/O. I wonder if it would be possible to "simulate" that with a raw socket....
I think the frightening thing about meltdown/spectre is the ability for code to escape otherwise solid sandboxes - including VMs, as well as javascript runtimes. It's a change in the threat landscape for systems which expect to run remote code but believe they can do so safely.
If this isn't unnecessarily "snarky" itself, then what is it?
snarky: (of a person, words, or a mood) sharply critical; cutting; snide.
They're using a "monolithic" cloud provider and don't have a choice in their current deployment?
The most secure computer is powered off, enclosed in concrete 6 feet below the surface of the earth. It is not very useful though.
"100% secure" is unattainable, and to attempt to achieve it to the exclusion of all other concerns is probably a very bad idea.
If you’re not going to apply patches that close privilege escalation bugs, you might as well. You’re putting all your security eggs in one basket.
I also think that we need more information before we really see the long-term performance impact here. First, the patches will likely be optimized over time. Second, I am not sure that PTI needs to be run within guest kernels if the host already has the mitigation (effectively creating a double-hit from PTI in both the guest and host kernel), or that even if PTI is needed in both kernels now, that it will be needed long-term. We also need to figure out what type of Spectre mitigations need to be performed within the guest if the host system has the new microcode that selectively disables branch prediction.
The short answer is that it's going to take another 4-6 weeks before even the kernel devs have a firm grasp of what's useful/necessary to mitigate this and for things to settle into place, as Greg K-H blogged about earlier. At that point, we should have a more realistic perspective on the long-term performance impact.
Strongly disagree. No single defense measure is infallible and defense in depth has proven one of the most important topics in computer security.
Regardless of what some of my customers believe patches are rarely hand picked and then applied. All security patches are applied, always, kernel patches even more so. They are rolled out with the tools provided by the operating system, be it Windows, Redhat, Ubuntu, OpenBSD, Solaris or whatever, and they don't make assumptions about your use case, they just apply all security patches.
Have you ever heard of the term 'buffer overflow'?
https://en.wikipedia.org/wiki/Benchmark_(computing)#Types_of...
This depends on your intended purpose of the benchmark. If you want to evaluate performance of a whole system, sure. But one often does benchmarks to find parts of the system that are critical to performance so that you can do further optimizations or do change in the software architecture to avoid these critical performance hotsports. For this case other benchmarks that allow an easy fine-grained interpretation of the data are surely better.
All because Intel decided to “optimise” by checking for permissions after speculative retirement, instead of before like AMD.
AMD claims that they believe that the way their branch predictor works effectively makes the BTB poisoning unusable, but there is no actual proof, and their statement regarding it was much more wishy-washy than they were with meltdown. (Which they specifically state they are completely immune to.)
Seeing almost 40% increase in CPU load
So to summarize, from 25% to 65%, or 2.6× the original.
Note that this is all from eyeballing that graph and estimating what percentage a datapoint is at, since the scale has an interval of 20 percent points and no minor grid or anything.
Before giving figures, I want to run the same tests on a more recent CPU, but my current benchmarks are not great to say the least.
I'm wondering if there are classes of network drivers that are having a much larger effect in performance. Network cards these days can do many things to improve performance like TCP/UDP offloading and because of that their drivers are very complex and I'm going to assume that there well be Meltdown fallout because of this.
----------
Text of the forum post:
Attention Fortnite community,
We wanted to provide a bit more context for the most recent login issues and service instability. All of our cloud services are affected by updates required to mitigate the Meltdown vulnerability. We heavily rely on cloud services to run our back-end and we may experience further service issues due to ongoing updates.
Here is a link to an article[1] which describes the issue in depth.
The following chart shows the significant impact on CPU usage of one of our back-end services after a host was patched to address the Meltdown vulnerability.
[the image]
Unexpected issues may occur with our services over the next week as the cloud services we use are updated. We are working with our cloud service providers to prevent further issues and will do everything we can to mitigate and resolve any issues that arise as quickly as possible. Thank you all for understanding. Follow our twitter @FortniteGame for any future updates regarding this issue.
Epic suggests following security best practices by always staying up to date with latest patches. General Recommendations for Computer Security[2]
We will continue to update this thread with similar information as it comes to us.
[1]: https://spectreattack.com/
[2]: https://www.howtogeek.com/173478/10-important-computer-secur...
Unfortunately, Epic Games don't provide any details about their CPUs AFAICT.
Both the hardware and kernel have to support PCID
I smell a class action lawsuit coming.
[0] https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-a...
The other percentages we've been offered have been in terms of performance reduction. We were told to expect a range of 5-30%; this is about 60%.
Somewhere a sysadmin's hair has started smoldering.
It really only affects workloads where high performance is important. The average user might not see an impact but if you need fast IO God help you. The solution is to 'make less syscalls' but the problem is that syscalls have always been slow and the people making a lot of them are only doing so because they absolutely have to
If anything, for big shops like this one, I wouldn't be surprised if we saw a move away from hosted providers (the "cloud" .. god I still hate it when people use that word), and return to co-located setups.
At least for people who need immediately performance needs, AMD might make a lot of short term sales right now.
You're right. Most people who just surf the Netflix and download the YouTubes will not notice. But it's still a form of fraud, even to those who never max out CPU. I think fraud is a strong word knowing that this wasn't intentional. But they sold a lesser product than they advertised and need to make customers whole. Otherwise it pretty much is fraud.
We write a lot of code that needs to run as fast as possible (processing, post-processing, generating real-time weather/satellite data) and I’m concerned about time windows and whether we’ll be able to meet requirements.
You'll probably see a wide variety of benchmark results anything from no impact to things like above. So just make sure you measure carefully with your own workload.
It's not just the cost of the processors, but everything that contains them. Truly 'fixing' all the affected products would bankrupt a county but we should get a refund for the CPU's at the least
No one saw this coming. Things happen. It's impossible to predict every contingency.
They acted in good faith.
Also, heh, users are funny: "all other games i have work fin by the way so there must be a problem whit fortnite."
Normally I'd agree but not in this case. Notice that besides latest ARM it seems no other architecture is susceptible to Meltdown - s390x, SPARC, POWER, AMD etc.
Speculatively loading and executing code across protection boundary is something someone should have thought twice about. Doesn't mean other vendors knew or had PoC examples, but they could have had an instinctive hunch.
I've given this example before, say I have some sensitive data on a server. I could install a bunch of services and API endpoints on it, to access it faster, inspect it, extract it various formats etc. Or I could decide to lock it down and just install only the minimum number of needed things, locked everything down. Doesn't mean I knew all those additional APIs or services had vulnerabilities, but it's just a good practice.
If the server gets hacked and someone looks back, I think they would be justified asking "What the hell were you thinking installing all that crap you didn't need on it".
Of course you can't predict every contingency, but some of them you pay for.
That's new for a company, and it's not indicated by their PR spin right now.
What I think happened : a company produced a product with a problem. Probably not out of malice, but ignorance.
One of two things happened after, which can kill the 'good faith' argument ; the problem was found internally and hushed, or the problem was found externally and minimized to reduce financial burden arising from fixing the problem and the PR related.
We have no way of knowing how well it was known about internally, but we can all see the PR going on from Intel right now, and I hope i'm not the only one who reads into those press releases to establish intent.
Modern processors are insanely complex systems. Branch prediction, out of order execution, hardware virtual memory management, hardware virtualization, etc. Not to mention that these are side-channel attacks. It's not a direct vulnerability, it requires executing some code and measuring timing very precisely; similar to and oscilloscope and a very expensive safe.
Of course Intel is going to be spinning this however they can for damage control. That's what PR departments do. I still doubt engineers at Intel really thought this attack was plausible, or else they wouldn't have been engineering chips this way for the past decade.
Right now, I think the problem started out of ignorance - but they have abused Google's policy of responsible disclosure to hide the flaw as long as they could and take advantage of their market position while the unknowing public kept buying their products. Now they are pulling the four D's of propaganda in their PR statements all while we are seeing huge performance deltas in graphs from Epic and more?
This is straight up deceptive, I'm glad I switched back to AMD with my new gaming rig and I already have plans in the works to purchase multiple EPYC servers with our datacenter move starting next month.
I'm not sure about this. At any large company like Intel, the cost of potential - even predicted - lawsuits are already factored into their budgets.
I remember reading something about how rich people can get 'everything else's insurance that's basically applicable to anything bad that could happen to them. Maybe its the same with companies?
They were aware of the problem for a couple of years: https://twitter.com/TheSimha/status/949361495468642304
The PR spin and misdirection games isn't in good faith which completely demolishes this line of defense.
I don't see how a class action could apply here, by IANAL
To this date I can still buy broken Intel CPUs....
They knew about the flaw in June. Yet they still kept selling Coffee Lake CPUs.
If my 8700k wouldn't still be significantly faster than Amd Ryzen (or I wouldn't have to also return the MB), I would have switched to an Amd in a heart beat.
With this they need to add even more tests before they can start on attacking the issues with the design.
Moreover it would be hard to say "everyone is doing it" because it seems so far besides the latest ARM processors, most of the other CPU architectures don't do it.
Not really: http://www.daemonology.net/hyperthreading-considered-harmful...
That was in 2005. It might be an over-generalization, but one could say that Intel made that same mistake (at least) twice.
IIRC almost nobody took them up on the offer. But today there is far more cloud computing, so datacenters might.
But since the USA have the highest lawyer-per-citizen ratio in the world, it would be very interesting to see what happened if, say, Google sued Intel because from one day to the next, Google's electricity bills rise steeply, their servers crash, because the AC cannot handle the extra heat, ... , and Google demanded Intel pay for their damages.
We live in very interesting times, indeed.
In principle you don't need to protect against spectre and meltdown if you can ensure that no untrusted code runs on a particular machine. How do you ensure that though? There are many many routes for that to happen, and it only has to happen once for it to completely invalidate your security model if you have no other levels of protection.
On a server you can run untrusted code by exploiting other vulnerabilities in server software such as buffer overruns. It's unrealistic to expect that all servers will have no such vulnerabilities in any of their software at any time. That's why operating systems implement many layers of protections to prevent those exploits from being elevated into even worse breaches that could leak sensitive data, provide local root access, and so on. One of the more significant protections that exists today is address space layout randomization, which makes it much more difficult for a buffer overflow exploit to result in immediate privilege escalation.
Meltdown/spectre make these sorts of issues much, much worse. They mean that absolute any vulnerability in any service could be exploited to read the entire contents of memory and deliver that to an attacker, including encryption keys, including passwords, and so forth. That's bad. You can essentially 100% guarantee that there will be some vulnerability in some service which enables a minor exploit, and you want to avoid having that minor issue become catastrophic through meltdown/spectre based attacks.
They are running on the cloud, and Meltdown / spectre means that exploits can escape a VM. This means you don't just need to trust your VM, but also any VMs you are sharing the hardware with.
Even then, you don't need to trust your co-tenants. Updating the host (which your provider has already done, or which is anyway out of your control) is both necessary and sufficient to protect from VM escapes.
Although this restriction on how the cloud provider is allowed to schedule your VMs probably would somewhat defeat the point of cloud hosting in the first place.
Out of curiosity, how many VM/container instances usually run on a physical host at any given time (for your typical cloud computing provider)?
For spectre, the consequences of not applying those patches are not as bad but it wouldn’t surprise me if you could still do a lot of harm. PHP is somewhat sandboxes these days (by using chroot and what not) and meltdown/spectre could be used to escape the sandbox.
Of course on shared servers this is going to be a nightmare.
there have been ~4600 privledge escalation bugs found since 1999. 250 a year. Almost one every day.
https://www.cvedetails.com/vulnerabilities-by-types.php
At this point we still won't have security and now we won't have performance either.
It's putting the cart before the horse.
Assuming bare metal. In shared hosting / cloud / VMs it is different.
The one most interested in is Google versus Amazon.
Edit: It looks like the answer to the first is a definite yes.
You can only verify properties you've thought of, and no-one conceived of this particular 'feature' causing issues like this until now. So I don't think formal verification would have helped: if anyone was in a position to realise the issue was worth verifying, they'd have been able to raise it without formal verification too.
I've read for years about supposed insecurities with branch prediction -- it just wasn't shown practically. To say that it wasn't conceived of is a little off.
Spectre is a different problem in that the very design of speculative execution contains the seeds of its flaws so there really is no way to implement it in such a way as to avoid the intra-process snooping although the inter-process exploit may be avoidable via implementation.
It could be still a problem though, considering many console games use all kinds of hacks to barely run at the target resolution/framerate.
If you had to slow down any of the consoles by 10% there would be tons of problems in the games. As you said, those games are highly tweaked to just barely run on those CPUs/GPUs.
None of these is vulnerable to Meltdown. That is an Intel/Apple/ARM Cortex A75 only thing.
And in any case the Meltdown patch is not too bad for games.
The Switch appears to be based on ARM cores that are vulnerable.
Second, saying everyone should have dedicated hardware is just nonsense. It's like saying everyone should run their own datacenter. For most people neither of those makes financial sense.
(of course that does not apply to clients where code can run in jit (javascript), software that communicates with the internet, etc and runs on a remote machine). most servers probably should only run trusted code (of course that is mostly never the case because no company evaluates every process they running) but chances are high that if some uses linux and gnu stuff that most shady stuff gets catched. (I mean if not, some people could do a lot of bad stuff, consider a misbehaving systemd, nginx/apache, databases, which could basically do a lot of harm.)
(Because making NUMA aware C++ code is hard, and AMD Epyc is a single socket on a server with 4 very closely knit NUMA zones so non-NUMA code will run better on that vs Intel)
But unfortunately there's no comoddity server from HP/Dell available yet. But I hear one is on the way on the Dell side.
So they are saying "you can't log in because we're too cheap to rent more servers now that this patch has increased CPU usage"
I've seen some crazy game server designs before in the quest to have fast response times. But UE4 is pretty professional so even if they are tied to a single machine, they probably are not tied to a single core for some of their critical algorithms I would hope.
Sometimes people assume that you can use local shared memory or something between threads in order to synchronize state. You figure out how many individuals can be on a server at once and then ensure that you can handle that load on a specific machine.
I've seen this type of stuff for game state before because they need to keep everyone in a specific game domain (level or city depending on the type of game) synchronized and be nearly real-time. It can be hard to pull this across different machines without introducing significantly latency, redis or DBs is slow for a FPS shootter.
Not saying this is the case but I can see it could be something like that.
It’s servers perhaps that are most at risk.
Also I don’t do much on my Windows, mostly gaming, I run an iMac and boot into it only for certain tasks, so it’s extremely unlikely I will ever have an issue.
Any performance hit, even if small is just not worth updating for to me.