RCA: As per current code in script it moves the thread of any gluster process those have gluster keyword as a substring and as of now all gluster threads has glfs prefix so script is not able to move all gluster threads to new created cgroup and cgroup restriction are not working if ps -T -p ${daemon_pid} | grep gluster > /dev/null; then for thid in `ps -T -p ${daemon_pid} | grep gluster | awk -F " " '{print $2}'`; do echo ${thid} > ${LOC}/${cgroup_name}/tasks ; done if cat /proc/${daemon_pid}/cgroup | grep -w ${cgroup_name} > /dev/null; then echo "Tasks are attached successfully specific to ${daemon_pid} to ${cgroup_name}." else echo "Tasks are not attached successfully." fi fi To avoid the same need to change the script for loop condition like below if ps -T -p ${daemon_pid} | grep gluster > /dev/null; then for thid in `ps -T -p ${daemon_pid} | grep -v SPID | awk -F " " '{print $2}'`; do echo ${thid} > ${LOC}/${cgroup_name}/tasks ; done if cat /proc/${daemon_pid}/cgroup | grep -w ${cgroup_name} > /dev/null; then echo "Tasks are attached successfully specific to ${daemon_pid} to ${cgroup_name}." else echo "Tasks are not attached successfully." fi fi
REVIEW: https://review.gluster.org/23635 (extras: Cgroup(CPU/Mem) restriction are not working on gluster process) posted (#1) for review on release-6 by MOHIT AGRAWAL
REVIEW: https://review.gluster.org/23635 (extras: Cgroup(CPU/Mem) restriction are not working on gluster process) merged (#2) on release-6 by hari gowtham