Mesos assumes that it is the only process managing resources of a box (cpu, mem, disk). So if you have out of band processes using up resources it won't be reflected in the resource offers and the box can be overcommitted. There is no runtime periodic check of available resources, it's only calculated once at startup.
Resource detection logic is here: https://github.com/apache/mesos/blob/master/src/slave/containerizer/containerizer.cpp#L65 On Thu, Apr 30, 2020 at 8:17 AM Charles-François Natali <cf.nat...@gmail.com> wrote: > Hi, > > Could someone point me to some code/documentation explaining how the > agent available memory is computed, and when it is refreshed? > > For example, if I have an agent started, with some outstanding offers, > and I then start a process - not as a task managed by Mesos, but as an > external process which just allocates a lot of memory - and touches > it, not just committed - I can see the machine available memory go > down (as reported by free, and MemAvailable in /proc/meminfo), but the > agent doesn't rescind any offer, and never seems to actually refresh > it - event after starting/stopping tasks. > > Cheers, > > Charles >