Let me add to what others have said. Answers inline. On Fri, Mar 27, 2015 at 9:34 AM, John Omernik <[email protected]> wrote:
> 1. Obviously the Ubuntu OS takes resources. How does that factor into > Mesos' available resource calculations? Where does these calculations > even come from (I can't see how 8.6 GB is my available disk on a > node). It obviously shows hyperthreaded cores, not physical cores, and > doesn't reserve any cores for OS use, but based on the memory total, > is it reserving memory or is that a GB math discrepancy? > > By default, Mesos offers all cpus (cpu threads to be precise), 2G less than all memory and 5G less than all disk. See the calculations here <https://github.com/apache/mesos/blob/master/src/slave/containerizer/containerizer.cpp#L60>. As Joerg mentioned, you can override the default behavior by setting the "--resources" flag. > 2. Does Mesos continually update available resources to take into > account resources that are not managed by Mesos? IE. If the node > registered with 30.4 GB available memory, and then an hour later some > process not managed by mesos take another GB of memory, is Mesos aware > of that? Or will Mesos try to give resources away that it may not > control and may not exist? What happens if that occurs? > > No, the slave doesn't continuously update total resources available based on out of band processes resource age. If there is memory pressure on the host, the kernel OOM killer will kick in and kill processes (based on its algorithm it might kill any process on the system, whether it is in mesos or not) to free up resources. > 3. Can you tell Mesos Slaves, when they start, to only take X > resources? I.e. let's say you were running HDFS or MapRFS outside of > Mesos on every node, you wanted to allocate 10% of memory always to > that, can you tell Mesos to not give away resources that are > statically assigned for something else? Obviously the idea here is to > allow Mesos to manage it all, but somethings like MapRFS really need > direct access to disks etc. Perhaps it's already doing that to take > into account the OS on the box? > > Yes. See "--resources" flag to explicitly set this. I would further suggest to put non-mesos processes into their own cgroups (e.g., system, hdfs etc) to control their resource usage and to ensure they don't interfere with Mesos processes. systemd might help you here. > 4. Has anyone thought of coming up with a smallish linux distro > designed to minimize non Mesos resource usage (OS usage). Basically > the minimum to allow Mesos and Docker to run on a node, with the idea > that all else should be in Mesos. (Not taking into account my > HDFS/MapRFS question). > > Maybe look into CoreOS? I am sure someone in the community must have figured out the additional packages needed to install on top of a CoreOS image to support Mesos.

