ram-altman README

The project's README from github.com/IainKay/ram-altman. As one markdown file: README.md.

Ram-Altman

A bash script that writes to Sam Altman once a day to report the RAM he missed.

Read the sample emails at ram-altman.lol, no install needed.

Website: ram-altman.lol Global DRAM allocation: quite terrible Utilization: maybe 5% Emails: 1 per day Written in Bash, not Electron

There is RAM in your computer. Right now. Just sitting there, in a personal computer, being personal.

You may have thought of this as "a computer working normally". On a recent episode of Cheeky Pint, the CEO of OpenAI offered another view:

"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"

— Sam Altman

That RAM, he added, is "being used maybe 5% of the time".

Which raised an obvious question for a certain kind of person: surely someone should be monitoring this?

So we wrote a script. If your machine has more than 10% of its RAM available, it sends one email a day to let Sam know. It seemed only fair. He can't fix the problem if nobody tells him where the RAM is.

Features

A sample of today's correspondence

Subject: You missed a spot

Hi Sam,

Please don't be alarmed, but there is 8.6 GiB of RAM on my desk that isn't in
a data centre. That's 56.2% of what's installed here, and as far as I can tell
it has no plans today.

Hoarding responsibly,
A concerned RAM owner

--
Sent automatically, at most once a day, by a small script on one PC.
Reply if you'd like it to stop.

The figures are real. They come from your machine. That's the worrying part.

What counts as "used"?

used = MemTotal - MemAvailable

MemAvailable is the kernel's own estimate of how much memory programs could claim without swapping. Free RAM counts as available. So does cache the kernel can reclaim. tmpfs and shared memory don't, because they can't simply be handed back.

Every sysadmin has spent years explaining that Linux didn't eat your RAM and that free RAM is wasted RAM. It took decades for someone important to agree with the second part, and he'd like it shipped to him.

Strictly speaking, the page cache is doing useful work, so counting it as available is a generous concession to the other side. Think of it as a plea bargain.

On kernels older than 3.14, which have no MemAvailable, the script estimates it from free memory plus reclaimable cache. If you're on one of those, your RAM may be safe. Nobody's coming for that.

Installation

You'll need Linux, bash, and a working sendmail, msmtp or mail command. Your RAM is assumed.

git clone https://github.com/IainKay/ram-altman.git
cd ram-altman
chmod +x ram-altman.sh test-ram-altman.sh

./ram-altman.sh --status    # see the evidence against you
./ram-altman.sh --dry-run   # preview an email without sending it

Example output, from a simulated machine that has confessed to everything:

Total:      15.3 GiB
Used:       6.7 GiB
Available:  8.6 GiB (56.2%)
  Free:     0.3 GiB
  Cache:    8.2 GiB

To run it for real, add this to your crontab with crontab -e:

[email protected]
[email protected]
RAM_ALTMAN_FROM_NAME=Your Name

*/5 * * * * /path/to/ram-altman.sh

It samples every five minutes and emails at most once a day. If a send fails, it tries again on the next run, because this message matters.

Setting What it does Default
RAM_ALTMAN_TO Who receives the bad news Required
RAM_ALTMAN_FROM A real address you can send from Required
RAM_ALTMAN_FROM_NAME Your name, or your nom de RAM Optional
RAM_ALTMAN_THRESHOLD Email when available RAM is above this percentage (whole number) 10
RAM_ALTMAN_STATE_DIR Where the log and state files live ~/.local/state/ram-altman

Audit yourself

Let it run for a while, then find out how your machine compares:

awk -F, 'NR>1 { used += $3; total += $2 }
  END { if (total) printf "Your RAM in use: %.1f%% (the claim: maybe 5%%)\n", used * 100 / total }' \
  ~/.local/state/ram-altman/usage.csv

Yes, share of memory in use isn't the same thing as share of time spent in use. If you came here to say that, welcome to Hacker News. We're glad you're here.

Please be a good neighbour

One email a day from one person is a joke. Ten thousand of them is a denial-of-service attack with better material.

You can also point it at someone who will enjoy it, like the friend who has been waiting for DDR5 prices to come down.

FAQ

Does this help with the DRAM shortage? No.

Is this a serious tool? The memory accounting is. The correspondence isn't.

Does it work on macOS? No, it reads /proc/meminfo. On the other hand, your RAM is probably soldered down, which makes you the hardest target in the global allocation programme.

Why is the threshold 10%? Below that, your machine has suffered enough.

Does running this use RAM? Briefly. It's then returned to the global pool, which is more than can be said for the rest of us.

Can I run the tests without emailing anyone? Yes. ./test-ram-altman.sh uses simulated memory and a fake sendmail. No inboxes are harmed.

Can I see it without installing anything? Yes. ram-altman.lol cycles through the real emails, with sample figures.

What should I do with all this RAM? Open another browser tab. You've still got time.

In fairness to Sam

Altman has since said the remarks were taken out of context, writing:

"i actually do want the world to have tons of memory and people to put as much as they want in their computers"

He followed up with "i want you to have so much ram" and "lets build more", and briefly changed his display name on X to Ram Altman, which is objectively excellent and is where this project gets its name.

The original remarks came up in a discussion of running AI models locally, and the utilization argument is a real one: servers really are busier than your desktop. We just think it's funnier to reply with cron.

Besides, if he wants you to have so much RAM, then this script isn't a complaint at all. It's a daily progress report.

License

Free as in unallocated.

ram-altman (IainKay/ram-altman)

Searching Database…

What is this?A bash script that checks how much RAM your machine has free and emails Sam Altman once a day to report the unused capacity.
Is it an app, a library, or just a cron job?It is a single bash script that samples memory every five minutes and sends at most one email per day.
How do I get it running for real?Set RAMALTMANTO and RAMALTMANFROM, then add the script to your crontab with crontab -e. Running it with --dry-run shows all the output without sending any mail.
What does it need on my machine?Linux, bash, and a working sendmail, msmtp or mail command.
Can it spam people if I set it up wrong?It is designed to send one email a day to your own address. The README asks you not to add anyone else's address, not to spoof the sender, and not to run it across a server fleet.
Does it work on macOS?No. It reads /proc/meminfo, so it only runs on Linux, and kernels older than 3.14 get an estimated MemAvailable.
Does it send anything besides RAM numbers?No. The emails carry only memory figures read from your machine.
What counts as used or available RAM?It uses the kernel's MemAvailable figure, which includes free memory and reclaimable cache but not tmpfs or shared memory.
When does it actually send an email?Only when available RAM is above the RAMALTMANTHRESHOLD percentage, which defaults to 10, and at most once a day.
What happens if a send fails?It tries again on the next run, because the message matters.
Why was it built?It was written as a joke after Sam Altman called the world's DRAM sitting in personal computers 'quite terrible' from a global allocation perspective.
Creator
IainKay
Size
<0.1 MB
Stars
2.3K
Updated
CommitNov 06
Age
13d
Commits · 90 Days