与Zig一起在arm64上启动Uber的基础设施

In November 2021 we decided to evaluate arm64 for Uber. Most of our services are written in either Go or Java, but our build systems only supported compiling to x86_64. Today, thanks to Open Source collaboration, Uber has a system-independent (hermetic) build toolchain that seamlessly powers multiple architectures. We used this toolchain to bootstrap our arm64 hosts. This post is a story with how we went about it, our early thinking, problems, some achievements, and next steps.

2021年11月,我们决定为Uber评估arm64。我们的大部分服务是用Go或Java编写的,但我们的构建系统只支持编译到x86_64。今天,由于开源合作,Uber拥有一个独立于系统的(密封的)构建工具链,可以无缝地支持多种架构。我们使用这个工具链来启动我们的arm64主机。这篇文章是一个故事,包括我们如何去做,我们的早期思考,问题,一些成就,以及下一步。

TL;DR

TL;DR

We started in November 2021 with an infrastructure that was exclusively Linux/x86_64. In January of 2023 we have:

我们在2021年11月开始,基础设施完全是Linux/x86_64。在2023年1月,我们有:

  • A C++ toolchain for both server architectures (x86_64 and arm64) that we use for production code, powered by zig cc
  • 一个适用于两种服务器架构(x86_64和arm64)的C++工具链,我们用于生产代码,由zig cc提供支持。
  • Several Core Infrastructure services running on arm64 hardware, enabling its viability for future expansion
  • 在arm64硬件上运行的几个核心基础设施服务,使其在未来的扩展中具有可行性。

Let’s get into how we achieved this.

让我们来了解一下我们是如何实现这一目标的。

Before we dive in, let’s make acknowledgements first: bazel-zig-cc, which we cloned and was the foundation for the cross-compiler tooling, was originally created by Adam Bouhenguel. So, our special thanks to Adam for creating and publishing bazel-zig-cc–his idea and work helped make the concept of using Zig with Bazel a reality.

在我们深入研究之前,让我们先致谢:bazel-zig-cc,我们克隆了它,它是跨编译器工具的基础,最初是由Adam Bouhenguel创建的。因此,我们特别感谢Adam创建并发布了bazel-zig-cc--他的想法和工作帮助实现了使用Zig和Bazel的概念。

Why arm64?

为什么是arm64?

All major cloud providers are investing heavily in arm64. This, combined with anecdata of plausible platform benefits (power consumption, price, compute performance) compared to the venerable x86_64, makes it feel worthwhile to seriously consider making arm64 a part of our fleet.

所有主要的云供应商都在大力投资arm64。这一点,再加上与古老的x86_64相比,可信的平台优势(功耗、价格、计算性能)的轶事,使我们觉得...

开通本站会员,查看完整译文。

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.123.1. UTC+08:00, 2024-03-29 17:59
浙ICP备14020137号-1 $访客地图$