云基础设施公司 Namespace 近日公布了其将 MacBook Pro 大规模部署于数据中心以支持 iOS 开发与测试的工程实践 1。由于苹果 Mac Mini 出现严重的供货延迟及型号更新滞后,该公司不得不采用非传统的机架方案来构建基础设施 1。具体而言,苹果在1月接受订单的 Mac Mini 直至7月才完成交付,且搭载 M5 芯片的新型号推迟了10个月发布,这一供应链瓶颈迫使 Namespace 转向使用 MacBook 1。
为维持运行,每台 MacBook 必须连接 IP KVM、外部 10G Ethernet 网卡以及电源,导致每层货架需要布设约60根线缆 1。在软件层面,团队面临 HDMI 线缆易脱落的问题 1;重启后需通过物理按键或执行 fdesetup authrestart 命令解锁 FileVault 1;USB 网卡故障需通过删除并重建“网络服务”进行修复 1。此外,受限于苹果的政策,每台物理 Mac 最多仅允许运行两个 macOS 虚拟机实例 1。
在虚拟化架构优化方面,尽管 Guest OS 的上行带宽可达 4 Gbps,但性能仍受制于虚拟机监控程序(VMM)进程与主机进程间的 IPC 开销 1。针对高达 500 GB 的单个 macOS VM 镜像分发难题,Namespace 采用了类似 BitTorrent 的 P2P 机制在节点间进行传输,以减轻中心注册表的压力 1。同时,公司利用 APFS 文件系统的稀疏文件和克隆功能(clonefile syscall)来有效节省磁盘空间并处理共享数据块 1。
Cloud infrastructure provider Namespace has disclosed the engineering details behind its unconventional decision to deploy MacBook Pro laptops in data centers to support iOS development and testing 1. The company resorted to this rack-mounted solution due to significant supply constraints with Apple’s dedicated Mac Mini servers, where orders placed in January were not delivered until July, while the newer M5-chip models faced a ten-month delay in release 1. To operate these consumer-grade laptops in a server environment, each unit required connections to an IP KVM, an external 10 Gigabit Ethernet network interface card, and power, resulting in approximately 60 cables per shelf layer 1.
The transition presented unique software and hardware challenges, including HDMI cable disconnections, FileVault requiring physical button presses or specific fdesetup authrestart commands after reboots, and USB NIC failures that necessitated deleting and rebuilding "network services" for resolution 1. On the virtualization front, Apple restricts each physical Mac to running a maximum of two macOS virtual machine instances, with guest OS upload bandwidth capped at 4 Gbps due to inter-process communication overhead between the Virtual Machine Monitor and host processes 1. To manage the massive scale of operations, Namespace implemented a peer-to-peer distribution mechanism similar to BitTorrent for propagating 500 GB macOS VM images across nodes, thereby reducing pressure on central registries, while optimizing storage efficiency through APFS sparse files and clonefile system calls 1.
评论
还没有评论,欢迎留下第一条。