Re:Replacing a $3000/mo Heroku bill with a $55/mo server
by TheDong on Wednesday October 22, 2025 @02:36AM
(#45665579)
systemd-oomd, oomd, and earlyoom all do poll for when to actually take action on OOM conditions.
What I was trying to say is that the actual information on when there's memory pressure is more accurate for systemd-oomd / oomd because they use PSI, which the kernel itself is updating over time, and they just poll that, while earlyoom is also internally making its own estimates at a lower granularity than the kernel does.
Re:Replacing a $3000/mo Heroku bill with a $55/mo server
by 100721 on Wednesday October 22, 2025 @12:48AM
(#45664986)
Unrelated to the topic, it seems awfully unintuitive to name a function ‘poll’ if the result is ‘not polling.’ I’m guessing there’s some history and maybe backwards-compatible rewrites?
Re:Replacing a $3000/mo Heroku bill with a $55/mo server
by CGamesPlay on Wednesday October 22, 2025 @02:10AM
(#45665401)
Specifically, earlyoom’s README says it repeatedly checks (“periodically polls”) the memory pressure, using CPU each time even when there is no change. The “poll” system call waits for the kernel to notify the process that the file has changed, using no CPU until the call resolves. It’s unclear what systemd-oomd does, because it uses the phrase “periodically polls”,
Re:Replacing a $3000/mo Heroku bill with a $55/mo server
by immibis on Wednesday October 22, 2025 @04:11AM
(#45666160)
The "poll" system call does not wait until a file changes.
Re:Replacing a $3000/mo Heroku bill with a $55/mo server
by CGamesPlay on Wednesday October 22, 2025 @05:20AM
(#45666622)
s/the file has changed/it has published new data to the file descriptor/
> systemd-oomd periodically polls PSI statistics for the system and those cgroups to decide when to take action.
It's unclear if the docs for systemd-oomd are incorrect or misleading; I do see from the kernel.org link that the recommended usage pattern is to use the `poll` system call, which in this context would mean "not polling", if I understand correctly.