Determine memory load based on cgroup usage. (dotnet/coreclr#19518)
authorTom Deseyn <tom.deseyn@gmail.com>
Thu, 16 Aug 2018 18:47:20 +0000 (20:47 +0200)
committerJan Vorlicek <janvorli@microsoft.com>
Thu, 16 Aug 2018 18:47:20 +0000 (20:47 +0200)
commit6fd9b04685cff893e32a9556042939f5ec74fd72
treeaebebb1044f10466f65babf8c3b589f05993ab71
parentda49825dfdacb0db70951c2e53b7abaeb08413a1
Determine memory load based on cgroup usage. (dotnet/coreclr#19518)

cgroup usage is used to trigger oom kills. It includes rss and file cache
of the cgroup.

The implementation was only using the process rss to determine memory load.
This is less than the cgroup usage and leads to oom kills due to GC not
being triggered soon enough.

Commit migrated from https://github.com/dotnet/coreclr/commit/ca5b0d1caa47abdebac13233553c6e44db2e3168
src/coreclr/src/gc/unix/cgroup.cpp
src/coreclr/src/gc/unix/gcenv.unix.cpp
src/coreclr/src/pal/inc/pal.h
src/coreclr/src/pal/src/misc/cgroup.cpp
src/coreclr/src/vm/gcenv.os.cpp