ARM vs. Intel on Amazon’s Cloud: A URL Parsing Benchmark
lemire.me
lemire.me
Did it?
All combined the hype is quite real. Heck, even moving an intel based service to newer nitro based EC2 instances resulted in a drastic performance improvement. Moved from m5.24xlarge --> m6g.8xlarge with better service performance and improved latency characteristics. Intel is in trouble in my opinion.
I wonder if this is actually an Intel issue or if there are some other optimizations at play, such as in the virtualization layer.
Because at one point I wanted to try Jetbrains' new "gateway" product, which basically runs a remote IDE and only shows the GUI locally. I was curious on one hand, but I also wanted a machine with a bit more oomph for my occasional compilation needs (rust on Linux, fwiw). I was really unimpressed, the c6i was comparable to my local slim laptop running an 11th gen i7u part. My similar slim AMD 5650U laptop is actually faster. IIRC, the c6i.metal wasn't particularly faster on this kind of single threaded work.
On intel aws, you pay per HyperThread. On Graviton, you pay per core.
But on this kind of workload and with modern schedulers, HT bump is rather limited. So in practice you are paying twice the price for the same number of cores.
This is the biggest contributing factor to that difference and i keep being surprised noone mention it.
You can disable hyperthreading on the x64 instances at the cost of halving the number of cores you have available in the instance that you paid for.
Is it? The phone you use probably uses ARM. If you buy a mac now, it's probably gonna be ARM. It's very much different from the calxeda days!
All of this means that a lot can go wrong when running code on those instances, resulting in lower performance. It is either advised to run separate processes on each NUMA domain, or use NUMA aware code (which Java almost never is). In addition, the code (or the system) should be highly scalable to multiple CPU cores.
In addition, the cores are old enough to suffer from Spectre/Meltdown related patches/workarounds, decreasing especially syscall performance.
I did slightly misspeak on the instance move having seen your reply. We moved from m5.24xlarge to m6i.16xlarge. Sorry for the confusion.
That said, you shared some interesting information. I'd love to read up more on this, any specific place I can dig in a bit deeper regarding the finer specifics of these instance types and architecture?
As for getting information on AWS instances, the best way in my opinion is just to spin up the instance and look up which exact CPU model it uses. Then you can go for example to WikiChip (https://en.wikichip.org/wiki/WikiChip) to see more information about the CPU. Other good sources include Anandtech (for example https://www.anandtech.com/show/15578/cloud-clash-amazon-grav...) and Chips and Cheese (for example https://chipsandcheese.com/2022/05/29/graviton-3-first-impre...).
Things like NUMA configuration can be inspected with tools like numactl.
The 16xlarge version is also a 32 core single socket CPU, meaning there should be no issues with NUMA. I would expect it to be much better than m5.24xlarge in most applications when taking the much faster single-threaded performance into account. Of course, nothing beats benchmarking and measuring yourself though.
I have personally seen issues with NUMA systems and code that theoretically parallelizes very well. Any synchronized mutable state becomes an issue with these kinds of systems. For example, I have had an issue where third party code would use the C "rand" function for randomness. Even though this was not used in a hot code path, on m5.24xlarge >90% of the execution time would be spent on just on the lock guarding the internal random state. On a "normal" system with fewer cores this never showed up while profiling.
Did you replace 5m of EC2 with 3.3m of EC2 and save 1.7m (impressive) or did you replace 50m of EC2 with 48.3m of EC2 (not really so impressive)?
I'm failing to comprehend how that's not impressive. Bean counters would still love this type of savings.
On the other hand, if the larger organization hired an AWS specialist, as many do, the optimization might be "free" because the specialist wouldn't have been effective outside of their area.
Understanding you saved $1M/yr means you're closer to profitability (I understand in the VC world all you really care about is % growth, but that's up for debate if that's how everything should be) or able to hire more engineers.
https://github.com/newrelic/newrelic-php-agent/issues/323
I didn't bother taking the time to compile from scratch and figure out a way to inject it into my container image. It was a smaller client of mine. But it seems real simple to setup a second pipeline in their CI system and move on.
"Wow Intel's so much faster..!"
A hyperthread logical processor is a way of obtaining better efficiency by using surplus resources left on the table by the "real" logical processor that otherwise would remain idle (read: waste).
Considering hyperthreading as a way of obtaining an extra "real core" is a gross misunderstanding of what hyperthreading is meant to achieve.
It's as real as a Bulldozer CMT thread, and that was widely considered a "real core".
An integer ALU being pinned to a particular thread doesn't make it "real" especially when it comes at the expense of shared frontend resources like a decoder that has to alternate between servicing each thread on alternate cycles (which, as Agner Fog's Microarchitecture notes, massively bottlenecks both threads). And obviously if one thread has ILP that can be exploited, and the other "core" isn't using its ALU, it would be better to share that! And when you allow that, what you get is SMT.
At the end of the day that's all CMT is - SMT with inefficiently allocated (pinned) resources, and it had even less dedicated resources on the frontend as well. And people will absolutely die on the hill that bulldozer was a "real core". There are probably some scheduling advantages to doing CMT instead of SMT, but also performance costs as well.
So what is a "real core" anyway in this context? Is physical (unsharable, unchangeable) division of resources "inherently better" (or even inherently different) from logical/software-defined division of resources?
Then you've got this whole thing from IBM recently... and leaving aside the fact it's cache, the question IBM is fundamentally asking us is, why not just allocate more resources to "cores" that need them? Why not execution units as well, why wouldn't that be better? Why is hardware defined core better than software defined core? https://www.anandtech.com/show/16924/did-ibm-just-preview-th...
And when you look to how you would implement that for non-cache resources, isn't the simplistic answer something very similar to SMT? Not sure POWER9 is all that far off base with runtime-configurerd SMT4/SMT8 and a big fat core, maybe that's how Intel can make better use of some of the gigacores they've built. Sure it can run one thread really fast but why not 8 threads on the same resources? Or you can go the other way and have one thread issue onto multiple cores, as long as there's ILP to cover it and the performance impact of crossing cores is not large, does the difference really matter?
And yeah maybe that's still one core... but then so is a bulldozer CMT module too lol. The whole "what is a core exactly" is kind of trite, it doesn't really matter.
That’s cool but when a vcpu is a hyper thread (rather than a physical core with two hyper threads) that’s the reality of your cloud experience.
Yes, it's expensive, but the performance of your server is a simple question of how much money you're willing to part with.
Now, if you are hitting main memory often it makes sense to go wild with thread and use SMT-8 like IBM's POWER cores or Sun's SPARC cores did.
And if you mostly just care about maxing out single threaded performance for user responsiveness then you do indeed have lots of unused resources most of the time and you might as well add SMT for when you're more throughput bound.
But while the design and transistor costs of adding SMT to a design are very modest, everything I've heard about the test and verification of it seems pretty hairy.
TIL that there is a general name.
https://www.alibabacloud.com/product/ecs/g8m
"As the first instance family that uses ARM v9 architecture CPUs,"
and "Arm-based Alibaba Cloud T-Head Yitian 710 Crushes SPECrate2017_int_base"
https://www.servethehome.com/arm-based-alibaba-cloud-t-head-...
The gravaton3's are V1's (ARM v8.4), so yes AWS is ahead of the companies using the N1 cores from ampere. But, its a bit of a US centric view.
It this a negative aspect?
However, you're making a bold assumption there. You don't know their cost structure. Their CPU time could literally be just that cheap for Graviton.
Until AWS breaks out their margins between X86 and ARM (not going to happen) or total AWS margins start to go down, we don’t really publicly know if they are “dumping” or if they are just passing on the savings to the consumer.
I’d bet that it’s a little of both
So a certain percentage of the costs could be amortized through internal usage.
Edit:
> We know enough about Apple Silicon to know that high-performance ARM chips aren’t cheap to manufacture.
Oh, and for this :-)
We do know that Apple's per unit costs must be cheap, since the iPhone SE 2022 retails at $429 for an entire phone, and it comes with A15, which is quite competitive with Android flagship chipsets from 2023. Since they can squeeze in an entire phone + profits in $429, the chipset itself can't be that expensive.
Yes, R&D is probably very expensive but they can spread that around to millions of units, just like Amazon :-)
Of course, Apple could also be dumping chipsets, in which case, I don't know ¯\_(ツ)_/¯
Disclaimer: I work for AWS but I don't have any internal knowledge about Graviton pricing and non-public performance data.
We also know that Intel server CPUs aren't cheap to buy and include a significant profit margin for Intel.
More to the point lots about Graviton seems to be focused on keeping the total cost of ownership down - clock speed for example to limit power consumption.
Perhaps AWS is pricing aggressively to drive adoption. I'd be astonished if they are offering a service like this at scale at below their required return on capital.
Well, maybe not cheap, but certainly cheaper.
"Apple’s move to M1 chips will save $2.5B this year, estimates IBM exec"
https://9to5mac.com/2020/11/18/apples-move-to-m1/
Apple even passed some of those cost savings on to consumers, most of the comparable M1 models were ~ $100 cheaper than the much slower Intel models they replaced. And Apple being Apple, if they passed on that much, their total cost savings almost certainly were significantly higher.
If you have been able to convert your deployment from x64 to aarch64, you can do the same in the other direction, or choose another cloud provider that provides aarch64 stuff. It is really easy to build container images in multiple architectures nowadays.
Windows => time/url=364.626ns
WSL2 => time/url=234.915ns
Android => time/url=252.276ns
This benchmark feels flawed to me, but I'm not qualified to speculate why.To be clear I'm not questioning the benchmark's accuracy or author's bona fides, but that post was a little short for my taste.
Some migrations are easier than others.
The only issue I've had is actually getting enough on-demand instances in certain regions during peak times.
I can't wait for Graviton 3 to be available on EMR.
I am not an expert on the various instance types and/or bursting, but I assume that ARM hardware is not as underprovisioned just by lack of fellow users.