|
|
f338ef |
From 23091d24d34102c7938ae2890930b73c89c5a8e7 Mon Sep 17 00:00:00 2001
|
|
|
f338ef |
From: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
f338ef |
Date: Tue, 22 Oct 2019 18:52:25 +0530
|
|
|
f338ef |
Subject: [PATCH 313/313] extras: Cgroup(CPU/Mem) restriction are not working
|
|
|
f338ef |
on gluster process
|
|
|
f338ef |
|
|
|
f338ef |
Problem: After Configure the Cgroup(CPU/MEM) limit to a gluster processes
|
|
|
f338ef |
resource(CPU/MEM) limits are not applicable to the gluster
|
|
|
f338ef |
processes.Cgroup limits are not applicable because all threads are
|
|
|
f338ef |
not moved into a newly created cgroup to apply restriction.
|
|
|
f338ef |
|
|
|
f338ef |
Solution: To move a gluster thread to newly created cgroup change the
|
|
|
f338ef |
condition in script
|
|
|
f338ef |
|
|
|
f338ef |
> Change-Id: I8ad81c69200e4ec43a74f6052481551cf835354c
|
|
|
f338ef |
> Fixes: bz#1764208
|
|
|
f338ef |
> (Cherry pick from commit 38de02012948013a88597545cf49380ce97f6fa7)
|
|
|
f338ef |
> (Reviewed on upstream link https://review.gluster.org/#/c/glusterfs/+/23599/)
|
|
|
f338ef |
> Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
|
|
|
f338ef |
|
|
|
f338ef |
Change-Id: I8ad81c69200e4ec43a74f6052481551cf835354c
|
|
|
f338ef |
BUG: 1764202
|
|
|
f338ef |
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
|
|
|
f338ef |
Reviewed-on: https://code.engineering.redhat.com/gerrit/183730
|
|
|
f338ef |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
f338ef |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
f338ef |
---
|
|
|
f338ef |
extras/control-cpu-load.sh | 2 +-
|
|
|
f338ef |
extras/control-mem.sh | 2 +-
|
|
|
f338ef |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
f338ef |
|
|
|
f338ef |
diff --git a/extras/control-cpu-load.sh b/extras/control-cpu-load.sh
|
|
|
f338ef |
index b739c82..52dcf62 100755
|
|
|
f338ef |
--- a/extras/control-cpu-load.sh
|
|
|
f338ef |
+++ b/extras/control-cpu-load.sh
|
|
|
f338ef |
@@ -104,7 +104,7 @@ echo "Setting $quota_value to cpu.cfs_quota_us for gluster_cgroup."
|
|
|
f338ef |
echo ${quota_value} > ${LOC}/${cgroup_name}/cpu.cfs_quota_us
|
|
|
f338ef |
|
|
|
f338ef |
if ps -T -p ${daemon_pid} | grep gluster > /dev/null; then
|
|
|
f338ef |
- for thid in `ps -T -p ${daemon_pid} | grep gluster | awk -F " " '{print $2}'`;
|
|
|
f338ef |
+ for thid in `ps -T -p ${daemon_pid} | grep -v SPID | awk -F " " '{print $2}'`;
|
|
|
f338ef |
do
|
|
|
f338ef |
echo ${thid} > ${LOC}/${cgroup_name}/tasks ;
|
|
|
f338ef |
done
|
|
|
f338ef |
diff --git a/extras/control-mem.sh b/extras/control-mem.sh
|
|
|
f338ef |
index 38aa2a0..91b36f8 100755
|
|
|
f338ef |
--- a/extras/control-mem.sh
|
|
|
f338ef |
+++ b/extras/control-mem.sh
|
|
|
f338ef |
@@ -116,7 +116,7 @@ else
|
|
|
f338ef |
fi
|
|
|
f338ef |
|
|
|
f338ef |
if ps -T -p ${daemon_pid} | grep gluster > /dev/null; then
|
|
|
f338ef |
- for thid in `ps -T -p ${daemon_pid} | grep gluster | awk -F " " '{print $2}'`;
|
|
|
f338ef |
+ for thid in `ps -T -p ${daemon_pid} | grep -v SPID | awk -F " " '{print $2}'`;
|
|
|
f338ef |
do
|
|
|
f338ef |
echo ${thid} > ${LOC}/${cgroup_name}/tasks ;
|
|
|
f338ef |
done
|
|
|
f338ef |
--
|
|
|
f338ef |
1.8.3.1
|
|
|
f338ef |
|