summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawal@redhat.com>2019-10-22 18:52:25 +0530
committerAtin Mukherjee <amukherj@redhat.com>2019-10-27 13:02:04 +0000
commitf5811979935ce607391825ac6913a95f588818e3 (patch)
tree212fd15a8e8e059d6f93c8a5012c372c3f5ef478 /extras
parentbfebfa9f2ec9dfc5dbf4a68c3518f98364ebc461 (diff)
extras: Cgroup(CPU/Mem) restriction are not working on gluster process
Problem: After Configure the Cgroup(CPU/MEM) limit to a gluster processes resource(CPU/MEM) limits are not applicable to the gluster processes.Cgroup limits are not applicable because all threads are not moved into a newly created cgroup to apply restriction. Solution: To move a gluster thread to newly created cgroup change the condition in script Change-Id: I8ad81c69200e4ec43a74f6052481551cf835354c Fixes: bz#1764208 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
Diffstat (limited to 'extras')
-rwxr-xr-xextras/control-cpu-load.sh2
-rwxr-xr-xextras/control-mem.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/extras/control-cpu-load.sh b/extras/control-cpu-load.sh
index b739c821055..52dcf62fd9f 100755
--- a/extras/control-cpu-load.sh
+++ b/extras/control-cpu-load.sh
@@ -104,7 +104,7 @@ echo "Setting $quota_value to cpu.cfs_quota_us for gluster_cgroup."
echo ${quota_value} > ${LOC}/${cgroup_name}/cpu.cfs_quota_us
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}'`;
+ for thid in `ps -T -p ${daemon_pid} | grep -v SPID | awk -F " " '{print $2}'`;
do
echo ${thid} > ${LOC}/${cgroup_name}/tasks ;
done
diff --git a/extras/control-mem.sh b/extras/control-mem.sh
index 38aa2a08748..91b36f8107a 100755
--- a/extras/control-mem.sh
+++ b/extras/control-mem.sh
@@ -116,7 +116,7 @@ else
fi
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}'`;
+ for thid in `ps -T -p ${daemon_pid} | grep -v SPID | awk -F " " '{print $2}'`;
do
echo ${thid} > ${LOC}/${cgroup_name}/tasks ;
done