I am trying to use cgroup to manage memory on a HPC cluster using torque queue manager on CentOS 6 machines. Just to test I login to a node running a job where I have:
pbs_mom(12184)─┬─sh(24312)───9809188.launchp(24339)───fcgene(24362)
├─{pbs_mom}(12190)
└─{pbs_mom}(12191)
I have cgconfig service started. I then do
# cd /cgroup/memory
# mkdir jobMOM
# cd jobMOM
# echo 12184 > tasks
# cat cgroup.procs
12184
# cat memory.usage_in_bytes
81920
I then add the other procs in the tree
# for f in 24312 12190 12191 24339 24362 ; do echo $f >> tasks ; done
But I see memory.usage actually go down
# cat memory.usage_in_bytes
49152
But the added processes are using over 18GB of memory combined
# ps -eLo pid,fname,vsize,rss | egrep '^(12184|12190|12191|24312|24339|24362)'
12184 pbs_mom 48076 27432
12184 pbs_mom 48076 27432
12184 pbs_mom 48076 27432
24312 sh 114532 1716
24339 9809188. 106132 1248
24362 fcgene 16815264 16809768
So it seems like the new tasks I added are just ignored. Anyone understand why?
When I deleted this cgroup and created a new one with just process 24339 and 24362 then I always just get 0 for memory.usage_in_bytes. Everything in memory.stat is also 0.