Senpai - Automatic memory sizing for containers
2019-09-21, 17:15–17:40 (Europe/Berlin), Cage

Senpai is a userspace tool to auto-tune cgroup memory limits.


Due to virtual memory and optimistic caching strategies, true memory consumption of an application, and true utilization of a system's RAM, are mostly unknowns on modern operating systems. This has always made memory provisioning a tough and error-prone trial-and-error task, but it's aggravated with containerization, where the stated goal is thinner margins and higher resource efficiency.

Senpai is a userspace tool that harnesses recently developed Linux kernel features to automatically shrink cgroups to their smallest possible memory size without notably affecting the performance of the contained applications.

This talk goes over the motivation to develop senpai, how it works, and success stories from the Facebook fleet.

Johannes has been working on Linux memory management since 2008, and cgroups since 2011. He is currently on the Facebook kernel team where he focuses on memory efficiency and containerization.