Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 661876 - oomd a user space memory manager by Facebook.
Summary: oomd a user space memory manager by Facebook.
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-23 13:01 UTC by Michael Lawrence
Modified: 2018-07-23 15:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Lawrence 2018-07-23 13:01:39 UTC
https://github.com/facebookincubator/oomd

License
oomd is GPL 2 licensed.

oomd
oomd is userspace Out-Of-Memory (OOM) killer for linux systems.

Background
Out of memory killing has historically happened inside kernel space. On a memory overcommitted linux system, malloc(2) and friends will never fail. However, if an application dereferences the returned pointer and the system has run out of physical memory, the linux kernel is forced take extreme measures, up to and including killing processes. This is typically a slow and painful process because the kernel spends an unbounded amount of time swapping in and out pages and evicting the page cache. Furthermore, configuring policy is not very flexible while being somewhat complicated.

oomd aims to solve this problem in userspace. oomd leverages PSI and cgroupsv2 to monitor a system holistically. oomd then takes corrective action in userspace before an OOM occurs in kernel space. Corrective action is configured via a flexible plugin system, in which custom code can be written. By default, this involves killing offending processes. This enables an unparalleled level of flexibility where each workload can have custom protection rules. Furthermore, time spent churning pages in kernelspace is minimized. In practice at Facebook, we've regularly seen 30 minute host lockups go away entirely.

Building and installing
Note that oomd requires PSI to function. This kernel feature has not yet been upstreamed (as of 7/18/18).

oomd currently depends on meson, libfolly, and jsoncpp. The dependency on folly will soon be removed (as of 7/18/18).

$ git clone https://github.com/facebook/oomd
$ cd oomd
$ meson build && ninja -C build
$ cd build && sudo ninja install
Comment 2 Brian Evans (RETIRED) gentoo-dev 2018-07-23 13:14:50 UTC
Too early, come back when this is actually usable.
Comment 3 Michael Lawrence 2018-07-23 15:38:22 UTC
np i just figured it might be worth at least **watch listing**  , 

since i've been on arm64 spaces of late , if a compile overloads sbc's...
renting instances gets $pen$ive.., but not having the SBC on total lockup ... 

worth watching..