[Feature Request] limits.same_cgroup Project Configuration and --cgroup-parent= for Instances

I would really love to be able to set resource limits on a higher level and be able to put several containers into the same cgroups.

Now:
Project limits just count individual limits of containers and enforce a limit to be set so it can be counted.

Containers are restricted with cgroups in /sys/fs/cgroup/<controller>/lxc.monitor.<instancename> and /sys/fs/cgroup/<controller>/lxc.payload.<instancename> (Why are there two?).

What would be nice:
Limiting a project to for example 2 CPUs and 4GB RAM and putting several containers “below” that cgroup, so all containers can see the 2 CPUs and 4GB only.

Projects are restricted with cgroups in /sys/fs/cgroup/<controller>/lxc.monitor.project.<projectname> where the individual PIDs of the containers in the project get written to the cgroup.procs file, therefore combining them under those limits.

The option setting on the Project configuration could be:
limits.same_cgroup bool - false
If set to true containers cannot have individual limits anymore but share the one control group.

Docker
I think I read in the Docker docs about somthing like a cgroup-parent.
I’d love to be able to limit container 1 and create container 2 with --cgroup-parent=1 putting the same limits of container 1 on container 2, or rather giving the same resources to both containers at the same time. This could be the same implementation without setting up Projects.

@stgraber