Of course, after sending out the email I thought of a potential solution. It should be possible to specify memory available per role that is more than the total system memory. So as long as the role understands that a large swath of the available memory is intended to be page cache, all should be good... I think
On Tue, Aug 9, 2016 at 8:16 PM Charles Allen <charles.al...@metamarkets.com> wrote: > I have two services I want to make co-tenant on the same machines, where > one has much more relaxed SLAs than the other. > > I can easily make one pre-empt the other at a cgroup level by controlling > their cpu shares. > > And I can limit one by having memory limits assignable through its role > resources. > > The other higher priority service makes heavy use of disk page cache, and > therefore would like to use as much memory for disk page cache as possible, > but allow the lower-priority service to gobble up SOME of that page cache > (to a limit) > > This is achievable with cgroups alone by setting appropriate cpu shares > between the cgroups, and setting the memory limit of one cgroup to > unlimited, while bounding the memory limit of the lesser priority service. > > Can I achieve such a thing in Mesos role resource definitions? >