Hacker News new | ask | show | jobs
by markjdb 2264 days ago
If anyone is interested in their application to system software, the FreeBSD kernel uses a PID loop to regulate memory reclamation: https://svnweb.freebsd.org/base/head/sys/kern/subr_pidctrl.c... https://svnweb.freebsd.org/base/head/sys/vm/vm_pageout.c?vie...

It does a pretty good job of maintaining system responsiveness and latency when there's sustained memory pressure, at least much better than the simpler hysteresis loops that are commonly used for this sort of thing.

1 comments

I'll be the first to admit that I hastily presumed you were conflating the control theory PID acronym with "process ID", then I looked at the code and had a genuine WT-actual-glorious-F moment.