Thinking about ARMageddon

Hello, Habr! My name is Sergey Minaev, I am the head of web services administration at Sportmaster.



And while the whole world is discussing how successful the Apple M1 processor turned out, and whether it is really possible to believe the benchmarks, my engineers and I plunged into thoughts about the future.



We sat and smoked, a new day began, but the thought of what had happened did not leave our heads. No, we didn’t discuss the possible crash of Intel, we didn’t think about what AMD would do with x86 next, we didn’t think about Vendekapets. We have tried and are still trying to understand how much Apple's new product will change web development.



Let's go back to “a long time ago, in a galaxy far away” and remember the different processor architectures and why they were left on the sidelines of history.



In the beginning was the word. Then a double word







When computers were as big as trees and x86 was as small as grass, most of the work was done on “big computers,” and nobody really took the IBM PC seriously. But then there was a revolution number of times - 80386 appeared. Protected mode appeared, it was possible to address 4GB of memory ... but all this does not really matter. Price and prevalence matter. At some point, x86, thanks to Microsoft, a very little-known company, began to conquer the market for personal computers that you could buy at home. And where there are many, there appears a handy, familiar and favorite instrument. This very tool was x86, for which a lot of software began to be written, and this software was written on x86 itself.



Yes, there was a market for large and heavy DEC Alpha, PowerPC, MIPS, SPARC. Apple computers based on Motorolla / PowerPC are bypassed for now. But the most important thing happened at the personal computer level: x86 was a familiar and widespread tool, performance increased with each generation, and availability was higher than that of other architectures. All this led to the fact that a critical mass of software was distributed specifically for x86, a good example of this is the gradual abandonment of the Alpha, MIPS and PowerPC architectures in Windows NT 4.0.



Gradually, x86 began to break into the server segment, where PowerPC, MIPS, IA64 reigned before. Over time, architects began to abandon custom architectures, x86 (already amd64) began to dominate the server market, and giants such as PowerPC and SPARC moved into a very niche market. MIPS went into routers, PA-RISC was abandoned for IA64, and IA64 found its iceberg.



But what can we say about the server segment, even if game consoles have gone from PowerPC / Cell to x86 and ... ARM.



Welcome to a brave new world. Or don't you come ...







Move mentally to mid-2000: dollar at 29, Apple announces the transition from IBM PowerPC to Intel x86. Faster, higher, stronger. The Rosetta translator appears to facilitate the transition from one architecture to another. At that time, no one thought much about development on the MacBook, so it turned out peace-friendship-chewing gum.



We are now moving into 2007 when Apple introduced its first iPhone on Samsung 32-bit RISC ARM. This is a landmark time for ARM. Processors of this architecture were previously used in PDAs, but devices of this format were the prerogative of engineers and geeks. If you remember the subway car of that time, then few people could see the PDA, and if it was striking, it aroused interest. Who can you surprise with a smartphone now? Mobile devices have completely entered our lives. Now the market for C / C ++ or Assembler is very narrow, but almost all doors are open for a mobile developer. Yes, Java is built for Android, Swift for iOS. But it all runs on ARM.



ARM has a lot of advantages, I don't think it is necessary to dwell on technical data, because the most important thing is prevalence and habit. A habit of both users and development.



Meanwhile, ARM is breaking into the world of consoles: Nintendo and nVidia are starting to use this architecture.



The past is forgotten, the future is closed, the present is granted



Now let's move on to our time. This year is very eventful, so I think that the change in architecture at Apple was, of course, noticeable, but we will get the echoes of the background a little later.



At some point, Apple laptops became not just a symbol of fashion, they became a working tool, moreover, most importantly, a familiar tool for a developer. We often hear from candidates “give me a MacBook or I'll program on mine”. The developer (web, mobile) and MacBook are practically indivisible.



And at this moment the most interesting thing begins: a company that does not have such a large market share, but which has a tool that they are used to and on which, according to various estimates, 90-95% of the code for the web is created, changes the processor architecture in its product ...

Let's go back to the past, somewhere in 1985-1995. What was the advantage of x86: price-availability, habit, growing number of software and software development. Now Apple M1 laptops are sold cheaper than Intel Core laptops. Developers are very accustomed to the Macbook, and if the ARM version is cheaper than the x86, then it will generally be bought. And they will buy it both because of the price, and because it is faster according to tests, and because it lives more from charging. And in general - this is a supernew Macbook!







And if with mobile development everything is more or less clear, little will change in it, then with the web, perhaps, the incomprehensible will begin.



Users of the new MacBooks will run on ARM and write code for x86. Yes, there is Rosetta 2, but Docker is not ready for M1 yet. But that's all for now. There will be optimized versions for M1, developers will most likely use ARM images. The same Java needs a JVM to work, which is compiled for a specific processor architecture. And someday there will be our beloved “Everything works for me locally, it's something with your server!”.



In conclusion







We are not sure what will happen as we expect. Perhaps Rosetta 2 will live permanently, perhaps they will come up with something else, perhaps Apple will abandon the M1 (or the Intel / AMD empire will strike back).



But for now, we've searched the boxes, found a Raspberry Pi 4, and started testing Docker on ARM. And at the same time, we went through all our base images in the corporate Registry and saw if they could be rebuilt for ARM.



VMware is starting to port ESXi to ARM, Kubernetes already exists in the ARM version, Amazon is improving ARM instances, and it is often written on the Internet that x86 hegemony is coming to an end.

Maybe this is all in vain, but we are already thinking about the possibility and expediency of using servers on the ARM architecture. It is better to think about it now, so as not to be caught up and on the sidelines of history.



All Articles