A Sam Altman parody offers an amusing lesson in memory management
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
Sam Altman’s recent comments on the Cheeky Pint podcast inspired developer Iain Kay to create a satirical script that allows users to email the OpenAI CEO once per day if more than 10 percent of their system RAM is reported as available.
山姆·奥特曼(Sam Altman)最近在《Cheeky Pint》播客上的言论启发了开发者伊恩·凯(Iain Kay),他编写了一个讽刺脚本,允许用户在系统内存(RAM)可用率超过 10% 时,每天向这位 OpenAI 首席执行官发送一封电子邮件。
Ram-Altman is described by its creator as a “parody project” launched in response to Altman’s viral remarks about RAM in your personal PC. As reported by The Verge, on the October 29 episode recorded with Stripe President John Collison, Altman said, “A lot of people want local inference. And somehow, they assume that the problem is solved now because we are going to have open source models, we’re going to be able to run them on our computers, and so we’re not going to need all the stuff in the data center. But from a global allocation perspective, actually, it’s quite terrible to have everybody have a bunch of the world’s limited supply of DRAM sitting in their own computer and being used 5 percent of the time.”
Ram-Altman 被其创建者描述为一个“恶搞项目”,旨在回应奥特曼关于个人电脑内存的病毒式言论。据《The Verge》报道,在 10 月 29 日与 Stripe 总裁约翰·科里森(John Collison)录制的节目中,奥特曼表示:“很多人想要本地推理。他们似乎认为问题现在已经解决了,因为我们将拥有开源模型,我们能够在自己的电脑上运行它们,因此我们不再需要数据中心里的那些东西。但从全球分配的角度来看,让每个人都把世界上有限的 DRAM 供应放在自己的电脑里,且只有 5% 的时间在使用,这实际上是非常糟糕的。”
Altman has since explained that his comments were taken out of context and briefly changed his display name to “RAM Altman” on X, which Kay calls on the project GitHub, “objectively excellent and where the project gets its name.”
奥特曼此后解释称他的言论被断章取义,并曾在 X(原推特)上短暂地将显示名称改为“RAM Altman”。凯在项目的 GitHub 页面上称此举“客观上非常出色,这也是项目名称的由来”。
In an email to Ars, Kay said, “Ram-Altman is a bash script that takes MemTotal minus MemAvailable from /proc/meminfo, so the figure includes page cache and reclaimable slab but leaves out tmpfs and shared memory.”
在给 Ars 的一封邮件中,凯表示:“Ram-Altman 是一个 bash 脚本,它通过从 /proc/meminfo 中获取 MemTotal 减去 MemAvailable 的值来计算,因此该数值包含了页面缓存和可回收的 slab,但排除了 tmpfs 和共享内存。”
If the script only showed what Linux reports as “free” RAM, it would paint an incomplete picture. Linux often reports a surprisingly small amount of “free” RAM, as it doesn’t count memory that is currently claimable for use. Linux will fill available RAM caches with file data for quick access, but the kernel can reclaim that usage at a moment’s notice when needed. The MemAvailable figure is the kernel’s own estimate of how much memory it could hand over without swapping.
如果脚本只显示 Linux 报告的“空闲”内存,那将是不完整的。Linux 经常报告出奇少的“空闲”内存,因为它没有计算当前可供使用的内存。Linux 会用文件数据填充可用的内存缓存以实现快速访问,但内核可以在需要时随时回收这些使用量。MemAvailable 数值是内核对在不进行交换(swapping)的情况下可以腾出多少内存的预估。
Users can schedule the script to ask the kernel for a status update every five minutes, and if more than 10 percent of RAM is available, it triggers a joke email from one of several joke templates. The script limits outgoing emails to one per day.
用户可以设置脚本每五分钟向内核请求一次状态更新,如果可用内存超过 10%,它就会触发一封来自多个笑话模板之一的恶搞邮件。该脚本将外发邮件限制为每天一封。
The GitHub page for the RAM-Altman project includes a dry-run option that any Linux user with a Bash terminal should be able to paste and run without the need for email trolling. When the threshold is exceeded, each dry run output features one generated joke email, so repeated runs produce different amusing examples.
RAM-Altman 项目的 GitHub 页面包含一个“空运行”(dry-run)选项,任何拥有 Bash 终端的 Linux 用户都可以直接粘贴并运行,而无需进行邮件骚扰。当超过阈值时,每次空运行的输出都会生成一封恶搞邮件,因此重复运行会产生不同的有趣示例。
The project concedes the nuance that Altman was referring to how much time memory spends being utilized, while the script measures how much capacity is free at the time of measurement. While the script might tell Altman that 33 percent of your system RAM is available, it doesn’t outline how often that’s the case. The concession steps on the joke slightly, but it keeps everyone honest.
该项目承认了一个细微差别:奥特曼指的是内存被利用的时间比例,而脚本测量的是测量时刻的空闲容量。虽然脚本可能会告诉奥特曼你的系统内存有 33% 是可用的,但它并没有说明这种情况发生的频率。这种让步稍微削弱了笑话的效果,但它保持了客观性。
Used irresponsibly, this cheeky joke could morph into a harassment tool, and Kay quickly points out that the script does not include anyone’s email, including Altman’s. Users who deploy their own operating version are encouraged to only use their own real email addresses and honor any requests to stop, as is outlined at the bottom of the script-generated output.
如果使用不当,这个恶搞玩笑可能会演变成骚扰工具,凯很快指出该脚本并未包含任何人的电子邮件地址,包括奥特曼的。鼓励部署自己运行版本的用户仅使用自己的真实电子邮件地址,并尊重任何停止发送的请求,正如脚本生成输出的底部所概述的那样。