cGroups cgred守护进程并不总是将subprocess,父进程临时移到错误的组中

所以我正在几台服务器上设置CGroups,而且我正在使用相当多的文档来做到这一点。

我在Fedora 资源pipe理指南的第2.8.1节中遇到了这个问题(在这个redhat指南中也奇怪的是:

The entry now specifies that when the user named maria uses the ftp command, the process is automatically moved to the /usergroup/staff/ftp cgroup in the hierarchy that contains the devices subsystem. Note, however, that the daemon moves the process to the cgroup only after the appropriate condition is fulfilled. Therefore, the ftp process might run for a short time in the wrong group. Furthermore, if the process quickly spawns children while in the wrong group, these children might not be moved.

这被列为一个旁注,但这似乎是一个非常重要的问题,这种破坏了整个cGroups的重点。 所以在我进一步设置这些之前,有没有解决这个问题的方法呢? 或者我在思考过程中没有接近这个权利?

它build议像这样使用cgexec在cgroup中启动一个进程:

 cgexec -g cpu:group1 lynx http://www.redhat.com 

但似乎这将是一个很难实施系统范围,使每一个进程是这样​​发起的。

我在这里错过了什么,或者真的没有其他select吗? 它也似乎这可能是一个文档错误,因为Fedora指南使用的是一个redhat.com链接作为例子,这使得我认为文档已经过时了。

干杯!

在redhat上我使用libcgroup-pam将用户进程移动到cgroup, libcgroup-pam对我来说是工作的,因为它将用户会话进程设置为cgroup,然后所有其他进程都是subprocess,并默认在cgroup中