summaryrefslogtreecommitdiffstats
path: root/extras/control-mem.sh
Commit message (Collapse)AuthorAgeFilesLines
* extras: Cgroup(CPU/Mem) restriction are not working on gluster processMohit Agrawal2019-10-271-1/+1
| | | | | | | | | | | | | | 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>
* extras: scripts to control CPU/MEMORY for any gluster daemon during runtimeMohit Agrawal2017-11-131-0/+128
Problem: Sometime gluster daemons like glustershd can consume a lot of cpu and/ or memory if there is a large amount of data/ entries to be healed. Solution: Until we have some form of throttling/ QoS mechanisms built into gluster, we can use control groups for regulating cpu and memory of any gluster daemon using control-cpu-load.sh and control-mem.sh scripts respectively. Test: To test the control-cpu-load.sh script follow below procedure: 1) Setup distribute replica environment 2) Selfheal daemon off 3) Down one node from replica nodes 4) Create millions of files from mount point 5) Start down node 6) Check cpu usage for shd process in top command 7) Run script after provide shd pid with CPU quota value 8) Check again cpu usage for shd process in top command Note: control-mem.sh script can cap the memory usage of the process to the set limit, beyond which the process gets blocked. It resumes either when the memory usage comes down or if the limit is increased. BUG: 1496335 Change-Id: Id73c36b73ca600fa9f7905d84053d1e8633c996f Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>