Oxcart 下载
菜单

macOS 上 Docker 应用的内存与 CPU 占用实测

没有容器运行时,Oxcart 在我们的测试 Mac 上占用 776 MiB:与 OrbStack 的 792 MiB 相当,不到 Docker Desktop 的 1,745 MiB 的一半。监控容器的开销也更低:持续运行的 docker stats 数据流使 Oxcart 占用一个 CPU 核心的 1.3 %,OrbStack 为 3.8 %,Docker Desktop 为 5.5 %。

更新于

测量内容与方法

三个应用均运行在同一台 Mac 上:Apple M5 Max,36 GiB 内存,macOS 27.2。每个应用均配置为 8 个 CPU 和 12 GiB,使用各自的命令重新启动,且单独运行;其他应用已退出,并已确认没有残留进程。空闲数据来自等待 45 秒稳定后的一段 60 秒测量窗口,计入产品运行的所有进程:应用本身、辅助进程以及包含 Linux 系统的引擎。容器数据取预热后五次采样的中位数,差距在 10 % 以内视为持平。

Oxcart 0.1.2 于 2026-10-10 使用随附的 docker 29.9 客户端测量。OrbStack 2.2.3 和 Docker Desktop 4.94.0 于同一天较早时段,在同一台 Mac 上使用相同测量工具和 docker 29.4 测量。各产品运行各自的 Linux 内核。这是在一台机器上对每个产品进行的一轮测试,不是一项研究;所有产品采用相同方法。

无容器时的内存占用

没有容器运行时,应用、辅助进程与引擎的内存占用
应用空闲时内存占用
Oxcart 0.1.2776 MiB
OrbStack 2.2.3792 MiB
Docker Desktop 4.94.01,745 MiB

这是容器应用仅为随时待命而占用的内存:两次工作之间、开会期间,或在整天开着应用的笔记本电脑上。Oxcart 与 OrbStack 在这一项持平;Docker Desktop 保留的内存超过两倍。

监控容器的开销

仪表盘、终端监控工具和编程智能体会不断轮询容器统计数据,因此读取这些数据的开销比看起来更重要。

20 个容器的 docker stats 开销与延迟
指标OxcartOrbStackDocker Desktop
一个持续输出的 docker stats 客户端的 CPU 占用1.29%3.81%5.45%
docker stats --no-stream1,038 ms2,050 ms2,054 ms

CPU 占用以单个核心的百分比表示。Oxcart 0.1.2 于 2026-10-10 使用随附的 docker 29.9 客户端测量;OrbStack 2.2.3 和 Docker Desktop 4.94.0 于同一天较早时段,在同一台 Mac 上使用相同测量工具和 docker 29.4 测量。

运行 20 个容器时,Oxcart 自身的菜单栏项目占用一个核心的 0.0004%,每秒产生 0.033 次唤醒。该数据仅涵盖应用本身,不包含引擎。

负载运行时:持平

容器开始执行实际工作后,各应用的结果趋于一致,因为主要开销来自工作本身。以下为同一轮测试中的两项数据:

固定工作负载下的额外开销(越低越好;差距均在 10 % 以内)
指标OxcartOrbStackDocker Desktop
容器内每 CPU 秒对应的 Mac CPU 用量1.10×1.11×1.09×
每个访问 256 MiB 内存的容器对应的 Mac 内存占用235 MiB266 MiB236 MiB

实际意义是:受 CPU 限制的构建或测试在这三个应用中消耗的 Mac CPU 大致相同;一个使用 256 MiB 的容器,在 Mac 上也大约占用这么多内存。差别在于工作前后的操作:每次 docker run、stop 和清理需要多久,这正是 Oxcart 领先的地方(对比 Docker Desktop、对比 OrbStack)。

工作结束后:内存归还 macOS

从 Oxcart 0.1.3 起,在最后一个容器停止约 30 s 后,Oxcart 会重启 Linux 端,将内存归还给 macOS:最后一个容器停止 32 s 后,从 3,319 MiB 降至 570 MiB(第二轮:从 3,352 降至 579 MiB)。只有在没有容器运行时才会执行此操作。重启在后台进行;此时到来的 Docker 命令只需等待重启完成。

使用 Oxcart 0.1.3 测量。

在自己的 Mac 上测量容器应用的内存

  1. 从空闲的 Mac 开始。 退出其他容器应用,停止容器,并在应用启动后等待一分钟,让启动工作完成。
  2. 找到应用运行的所有进程。 在“活动监视器”中打开“内存”标签页,搜索应用名称;运行 Linux 端的进程通常最大。在终端中,ps -axo pid,rss,comm | grep -i <app> 可列出这些进程。
  3. 读取 macOS 计入的内存。 使用“活动监视器”的“内存”列,或对每个进程运行 footprint <pid>,然后相加。仅看常驻内存大小(RSS)可能高估或低估共享内存和压缩内存。
  4. 在工作负载运行时测量。 启动平时使用的 Compose 服务栈,使用几分钟,然后再次读取相同数据。docker stats --no-stream 会显示 Linux 端每个容器的用量。
  5. 停止后再次测量。 停止所有工作,一分钟后再次读取数据。这就是应用在两次工作之间空闲时保留的内存。

值得关注的设置

  • 应用限制。 每个应用都会限制 Linux 端可使用的 CPU 和内存。在 Oxcart 中:Settings › Resources,或使用 oxcart config set cpus=6 和 oxcart config get;设置在下次启动时生效。把上限设得远高于服务栈需求没有额外收益。
  • 每容器限制。 docker run 的 --memory、--cpus 和 --pids-limit,或 Compose 的 mem_limit、cpus 和 pids_limit,可以防止一个失控服务占满所有资源。
  • 停止不用的服务。 之后还会使用的服务栈用 docker compose stop,不再需要的用 docker compose down。在 Oxcart 中,停止最后一个容器也会让内存得以归还给 macOS。
  • 降低监控开销。 在脚本中优先使用 docker stats --no-stream,并给编程智能体提供摘要工具,而非原始统计数据(面向 AI 编程智能体的 Docker)。

常见问题

Docker 在 Mac 上使用多少内存?

这取决于应用以及容器执行的工作。在一台配置为 12 GiB 的 Apple 芯片 Mac 上,没有容器运行时,计入各产品的所有进程后,我们测得 Oxcart 为 776 MiB,OrbStack 为 792 MiB,Docker Desktop 为 1,745 MiB。容器开始运行后,内存用量随工作负载而变化。

为什么 Docker Desktop 占用这么多内存?

Mac 上的每个容器应用都运行一个 Linux 系统,工作负载访问的内存会在 Mac 上显示为一个大进程。在我们的测量中,Docker Desktop 的空闲占用也是三个应用中最高的:没有容器时为 1,745 MiB。可以在设置中降低内存上限、停止不用的容器,并对比 Oxcart 等替代方案;它在同一台 Mac 上的空闲占用为 776 MiB。

Oxcart 会把内存归还给 macOS 吗?

会,只要没有容器运行。从 Oxcart 0.1.3 起,在最后一个容器停止约 30 s 后,Oxcart 会重启 Linux 端,将内存归还给 macOS:在发布前版本的一次测量中,最后一个容器停止 32 s 后,内存从 3,319 MiB 降至 570 MiB。只有在没有容器运行时才会执行此操作。

如何限制容器的内存和 CPU?

对单个容器使用 docker run --memory 512m --cpus 1.5 …,或在 Compose 服务中设置 mem_limit 和 cpus。Oxcart 通过 docker update 应用内存、CPU 和进程数量限制的更新,即使容器因重启而重新创建,这些设置也会保留。

如何设置 Oxcart 可使用的 CPU 数量和内存?

在 Settings › Resources 中设置,或在终端使用 oxcart config set cpus=4,并用 oxcart config get 查看实际生效值和 Mac 的上限。新设置在下次启动时生效。

docker stats 会拖慢 Mac 吗?

持续运行的 docker stats 数据流在每个应用中都会消耗 CPU。我们测得 Oxcart 占用一个核心的 1.3 %,OrbStack 为 3.8 %,Docker Desktop 为 5.5 %;Oxcart 是三者中最低的。对 20 个容器执行一次 docker stats --no-stream,Oxcart 用时 1.0 s,约为另外两个应用的一半。

来源与方法

  • Oxcart 0.1.2、OrbStack 2.2.3 和 Docker Desktop 4.94.0,于 2026-10-10 在同一台 Mac(Apple M5 Max、36 GiB、macOS 27.2)上测量,每个应用均配置为 8 个 CPU 和 12 GiB,每次只运行一个产品。
  • 最后一个容器停止后的内存归还:Oxcart 0.1.3。
  • 菜单栏开销:于 2026-10-09 使用 Oxcart 测量。

在你自己的项目中试用 Oxcart

免费试用 60 天。之后购买一个许可证,终身包含所有更新,无需订阅。

配备 Apple silicon 的 Mac · Windows 11 (x64)

继续阅读

版本更新说明

Oxcart 26.11.6

最新版本

Containers see the changes you make to files on your Mac as they happen.

  • Edit a file in a shared folder on your Mac, and tools that watch it in a container, such as Vite, webpack and nodemon, reload right away. Polling is not needed.
  • When no containers are running and you haven't used Docker for two minutes, Oxcart gives the memory it was using back to macOS. The next docker command starts it again in under a second. This doesn't happen while Kubernetes is turned on.
  • You can bring your images, volumes and networks over from another Docker app. Choose Import from Another Runtime… in the More (…) menu on the Containers page, or run oxcart import. Containers themselves aren't copied: start them again with docker compose up -d or docker run, and they use the imported volumes and networks.
  • Bug fixes and optimizations.
  • Updated Linux and system components, with the latest security fixes. A Windows virtual machine that is suspended when you update starts fresh afterwards.

需要 macOS 26.0 或更高版本

Oxcart 26.11.5

You can now turn on GPU acceleration for a Windows 11 virtual machine you already have.

  • Open the virtual machine's settings and turn on GPU acceleration under Display. Oxcart restarts Windows once, and the Windows desktop and Direct3D 10 and 11 apps then render on your Mac's GPU.
  • Turning GPU acceleration off puts back the standard display driver, and suspending works again.

需要 macOS 26.0 或更高版本

Oxcart 26.11.4

Bug fixes and optimizations.

  • Virtual machines start again after updating Oxcart while it is open.

需要 macOS 26.0 或更高版本

Oxcart 26.11.3

Windows virtual machines can now use your Mac's GPU.

  • Turn on GPU acceleration when you create a Windows 11 virtual machine, on the first step of New Virtual Machine. The Windows desktop and Direct3D 10 and 11 apps then render on your Mac's GPU instead of its processor.
  • A virtual machine with GPU acceleration can't be suspended or snapshotted while it runs. Shut it down instead. Existing virtual machines are not changed.
  • GPU acceleration is new. After a lot of opening and closing windows, the Windows screen can go black for about a second while Oxcart frees graphics memory.
  • Updated Linux and system components, with the latest security fixes.

需要 macOS 26.0 或更高版本

Oxcart 26.11.2

Oxcart can now run Kubernetes for you.

  • Turn on Kubernetes in Settings › Resources to get a local single-node cluster that kubectl can use right away.
  • Services in the cluster are reachable from your Mac at 127.0.0.1, and images you build with Docker run in the cluster without pushing them to a registry.
  • Updated Linux and system components, with the latest security fixes.

需要 macOS 26.0 或更高版本

Oxcart 26.11.1

Bug fixes and optimizations.

  • A simpler toolbar in the VM window.
  • Updated Linux and system components, with the latest security fixes.

需要 macOS 26.0 或更高版本

Oxcart 26.11.0

Clearer Windows audio, a network that comes back, and a VM toolbar that stays out of your way.

  • Clear Windows audio. Choppy, garbled sound in Windows VMs is fixed.
  • Networking that recovers. Turn a Windows VM's network off and on again, and it reconnects without a restart.
  • A toolbar that stays out of the way. It no longer covers the top of your VM. Move the pointer to the top center and click the small tab when you want it.
  • Simpler Oxcart Tools for Windows. One CD now holds everything, and the installer handles the drivers and any restart for you.
  • A more dependable clipboard in Windows VMs.
  • A license agreement to accept the first time you open Oxcart on your Mac.
  • Updated Linux, container and Docker components, with the latest security fixes.

需要 macOS 26.0 或更高版本

Oxcart 26.10.0

Virtual machines are here. Windows 11, Linux and macOS run on your Mac, built into Oxcart beside your containers and covered by the license you already have.

  • Windows 11 in about 5 minutes, hands off. Choose your Windows 11 ARM installer and walk away: Oxcart installs Windows, its drivers and Oxcart Tools by itself, on a VM with real TPM 2.0 and Secure Boot. You bring the installer and the license.
  • Linux in under a minute. Ubuntu, Debian and Fedora start with your Mac username, your SSH key and passwordless sudo already set up; Fedora is ready in about 30 seconds. Every further VM from the same image starts from an instant copy that takes only the space it changes. Ubuntu Desktop, Fedora Workstation and any arm64 Linux installer work too.
  • macOS on macOS. Oxcart restores the newest macOS your Mac supports and, with Automatic setup, creates your account and installs Oxcart Tools.
  • Every VM is a real Mac app. Each one has its own window, Dock icon and ⌘-Tab entry, and keeps running after you quit Oxcart. The Retina display follows the window as you resize it or go full screen, ⌘C and ⌘V work in Linux and Windows, and text, images and files move between your Mac and the guest by copy, paste and drag.
  • Snapshots that capture the moment. Snapshot a running VM with its open apps and return to that exact moment later. Snapshots and clones take almost no space until the guest changes, and a restore lands whole even if your Mac loses power halfway.
  • Your Mac's folders, network and USB. Share Mac folders with any guest, reach your Mac by name and publish ports from the VM. Hand a USB device to Windows for flashers, programmers and dongles; development boards' serial ports show up in Windows under their own IDs.
  • First-class for coding agents. VMs join containers in Oxcart's MCP server with 22 tools of their own, so an agent you connect can create, start, snapshot and clone VMs, run commands and copy files in the guest, forward ports, connect USB devices and disk images, and read the screen and type in any guest, even one without Oxcart Tools, all within the permission level you set for each agent. The oxcart vm command covers every operation, with JSON output for scripts and CI.
  • Encrypted VMs, when you want them. Keep a VM's disks and secrets behind a password of your own, with AES-256 encryption built into Oxcart, so an encrypted disk flushes as fast as a plain one.
  • Disk space you can see. Choose where a VM lives, on your Mac or an external drive, and see what it takes now and what it can grow to against the space you have. Reclaim Space hands back what a guest frees right away, and Disk Usage shows each downloaded system so you can remove the ones you no longer need.
  • VMs that move with you. Each VM is a single item in Finder you can keep on any drive. Export it as one .oxvm file to another Mac, and bring over Linux and macOS VMs from another Mac virtualization app.
  • Ready when you are. Chosen VMs start when you log in, run headless with no window at all, and suspend when you close them, so you pick up exactly where you left off.
  • Oxcart Help. Help › Oxcart Help (⌘?) explains every setting, what it does and what changing it affects, with a ? beside each one. Coding agents read the same help through MCP.
  • More reliable published ports. A container connection that a service closes mid-transfer now ends cleanly instead of waiting.
  • New version numbers. Releases are now numbered by year and month, so this one is 26.10.0.

需要 macOS 26.0 或更高版本

Oxcart 0.1.8

Oxcart 现已支持 Windows,购买后可终身享有所有更新。

  • Oxcart 也能在 Windows 上运行。一份许可证最多可用于 5 台设备,Mac 与 Windows 可任意组合。
  • 终身包含每次更新。
  • 截至 2026 年 12 月 31 日,Oxcart 售价为 $5。
  • 编程智能体可以检查容器、读取实时统计数据和资源压力、跟踪日志、追踪耗时较长的镜像拉取和构建,并按你设置的限制运行容器。
  • 重新创建容器时会保留其卷和网络别名。
  • Oxcart 的辅助程序在“登录项”中显示为 Oxcart。
  • 全面提升可靠性。

需要 macOS 26.0 或更高版本

Oxcart 0.1.7

更快的共享文件夹、更快的网络,以及可编辑的容器环境。

  • 共享文件夹大幅提速。在共享文件夹中克隆仓库、安装软件包和构建,速度最高可达原来的 3×。
  • 网络更快。发布端口和容器连接可传输近两倍的数据,同时减少 CPU 占用。
  • 按需启用加密。Mac 与容器之间的流量加密是可选的:可在 Settings › Resources › Encrypt container connections 中开启。
  • 环境变量更易查看和修改。在容器的 Overview 中查看变量,通过 Edit and Recreate 修改变量,还能一次粘贴整个 .env 文件。
  • Run Container 面板操作更顺畅。按 Return 会移至下一行,不会启动容器。
  • 故障排查更清晰。当 VPN 或防火墙拖慢连接时,Oxcart 会告知你。
  • 共享文件夹更可靠,能正确报告权限错误,并在 Mac 上的文件发生变更后及时更新内容。

需要 macOS 26.0 或更高版本

Oxcart 0.1.6

编程智能体可以修复所发现的问题,另有全面的问题修复与安全加固。

  • 新添加的智能体可以使用 Mac 上已有的镜像来启动、停止和重启容器,在容器内运行命令,以及启动 Compose 项目。拉取、构建和删除需要 Full 权限,可在 MCP Integrations 中为每个智能体分别设置。
  • 设置时会为每个智能体提供可直接使用的配置条目,运行 oxcart mcp check 可确认其是否正常工作。
  • 回答更准确:智能体能识别服务是否因其依赖的服务停机而停机、网页是否确实能加载,以及故障的原因和修复方法。
  • Start at login 会在登录时将 Oxcart 启动到菜单栏,随时可用。
  • Oxcart 启动时会检查更新,并向 oxcart.cc 发送一条简短的联络请求。Settings › Privacy 中会完整显示其中包含的内容。
  • 容器从启动之初就能发现所在网络中的其他服务。
  • 修复了特权容器、Rosetta 检查和设置过程中的安全防护问题。
  • Oxcart 应用会在执行任何删除数据或停止正在运行的任务的操作前征求确认。
  • 全面加强安全防护并提升可靠性。

需要 macOS 26.0 或更高版本

Oxcart 0.1.5

Oxcart 支持运行本地 Kubernetes 和特权容器,并提供十种语言。

  • 在 Settings › Resources › Kubernetes and networking 中开启特权容器,即可运行 kind、k3d、minikube(Docker 驱动)和 Docker-in-Docker,并使用 docker run --privileged 和 --device。此功能默认关闭。Oxcart 的防护机制会阻止每个容器访问 Oxcart 的磁盘、内核、其他容器的数据,以及 Oxcart 与 Mac 之间的通信通道。
  • 支持 IPv6 容器网络,此功能也默认关闭,适用于使用 IPv6 创建的网络,例如 kind 的双栈网络。
  • Oxcart 已翻译为简体中文、日语、德语、法语、西班牙语、巴西葡萄牙语、韩语、俄语和土耳其语。Settings › General › Language 中的语言设置仅对 Oxcart 生效。

需要 macOS 26.0 或更高版本

Oxcart 0.1.4

许可证功能与细节改进。

  • 通过安全邮件链接激活许可证。
  • 在 Settings 中管理许可证和 Mac。
  • 离线验证许可证。
  • 性能提升、界面优化与问题修复。

需要 macOS 26.0 或更高版本

Oxcart 0.1.3

空闲时回收内存。

  • 没有容器运行时回收 VM 内存。
  • 保留容器、镜像、卷和网络。

需要 macOS 26.0 或更高版本

Oxcart 0.1.2

命令行工具集成。

  • 在 Oxcart 自带的 Docker 工具与已安装的 Docker 工具之间切换。
  • 界面优化。

需要 macOS 26.0 或更高版本

Oxcart 0.1.1

内置 Docker 工具与智能体控制。

  • 自带 Docker CLI 29.9、Compose 5.6 和 Buildx 0.38。
  • Docker 上下文集成与安全的钥匙串凭据存储。
  • MCP 智能体连接,支持为各智能体设置权限或阻止访问。

需要 macOS 26.0 或更高版本

Oxcart 0.1.0

适用于 Apple 芯片的 Docker 兼容容器。

  • 兼容 Docker CLI、Compose 和 Buildx。
  • 自带运行时组件,可离线设置。
  • 按项目和 Git 分支整理端口。
  • MCP 集成,默认仅允许只读访问。
  • 经过验证的自动更新。

需要 macOS 26.0 或更高版本