> On March 17, 2014, 7:11 p.m., Ben Mahler wrote: > > src/slave/containerizer/containerizer.cpp, lines 105-112 > > <https://reviews.apache.org/r/19312/diff/1/?file=523002#file523002line105> > > > > Can you elaborate on why you think using 50% of the memory is a better > > approach than leaving 1GB free? I think most users are looking for the > > slave to offer the "right" amount of memory, leaving enough for the > > operating system and the slave itself. Given this, 50% seems too > > conservative. > > > > I'm not sure how beneficial a percentage-based approach is here, since > > it assumes that the amount of memory overhead of the OS/mesos-slave is > > relative to the total memory on the machine. > > > > It would be great to look at the cases where this logic leads to a poor > > choice of memory allocation: > > > > 1. If the machine has 1.1GB we will take 1GB and leave .1GB for > > OS/mesos-slave. > > > > 2. If the machine has 768MB, we will take 768MB and leave 0MB for the > > OS/mesos-slave. > > ASHUTOSH JAIN wrote: > I think you have explained the problem with the earlier code . > If a machine has less than 1GB mem then we take all of it, leaving none > for the OS. So I have provided some memory for OS as well. > > > > Ben Mahler wrote: > And what happens in your code when the machine has 32GB or memory? > > The old behavior was to offer 31GB and reserve 1GB for the OS/mesos-slave. > The new behavior you're proposing is to offer 16Gb and reserve 16GB for > the OS/mesos-slave.
If we have 32GB of memory then my code will return 31GB. Actually my code returns 50% when there is less than 2GB of memory else it returns mem - 1GB. - ASHUTOSH ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19312/#review37431 ----------------------------------------------------------- On March 17, 2014, 6:07 p.m., ASHUTOSH JAIN wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/19312/ > ----------------------------------------------------------- > > (Updated March 17, 2014, 6:07 p.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-1105 > https://issues.apache.org/jira/browse/MESOS-1105 > > > Repository: mesos-git > > > Description > ------- > > using 50% as criteria. > > > Diffs > ----- > > src/slave/containerizer/containerizer.cpp d0a1023 > > Diff: https://reviews.apache.org/r/19312/diff/ > > > Testing > ------- > > make check > > > Thanks, > > ASHUTOSH JAIN > >
