On Fri, Oct 26, 2012 at 5:21 AM, Roberto Polli <rpo...@babel.it> wrote: > On Thursday 25 October 2012 18:37:25 Dhaval Giani wrote: > >> On Thu, Oct 25, 2012 at 2:32 PM, jbd <j...@jbdenis.net> wrote: > >> >>.. I need to defined a different hierarchy for > >> >> each process to apply the memory limit the way I want > > it's the same for me ;) > > > >> ...I don't think it > >> should be too complicated to create cgroups with cgrules dynamically. > > If the task is created in the default cgroup, it could exceed its quota > before being migrated to the given cgroup. >
Please see cgexec for how it ensures tht task is created in the right cgroup. > > >> The hard questions are policy related. Let's take just the memory > >> subsystem for example, > >> 1. When do you know the memory limit? > > Usually the memory limit is known before starting the process, so it could > be a candidate for cgrules. > > > > > >> I don't think either of the methods are harder than the > >> other, but it really is a question of knowing what interface to > >> provide. > >> 2. What if memory is co-mounted with (say) cpusets? cpusets bring > >> about interesting complications, since you cannot move a process into > >> them till the cpus and memory is set. How do you figure out what to do > >> for cpuset when all your program cares about is memory? > > Can you please provide a simple use-case that would be broken while setting > a per-process memory limit? > This exact same set of steps. Comount mem and cpusets together. create a group and set the memory limits for it. attach a process and see what happens. Dhaval ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel