Bug 799199

Summary: [FEAT] provide option to enable/disable memory accounting on the fly
Product: [Community] GlusterFS Reporter: Amar Tumballi <amarts>
Component: coreAssignee: Amar Tumballi <amarts>
Status: CLOSED CURRENTRELEASE QA Contact: Raghavendra Bhat <rabhat>
Severity: high Docs Contact:
Priority: high    
Version: mainlineCC: gluster-bugs, vraman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 17:21:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: glusterfs-3.3.0qa45 Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 817967    

Description Amar Tumballi 2012-03-02 06:07:02 UTC
Description of problem:
Currently memory accounting can be enabled by only '-DDEBUG' flag while compiling, which means we can't make use of rpm installed binary for some of the trouble shooting.

We should bring in an option through glusterd/CLI so that memory accounting can be enabled on an volume on the fly. It need not be a persistent behavior (ie, no need to modify 'store'), but can be a global option while starting the volume. It is ok to say to get it into action, volume needs to be restarted.

Version-Release number of selected component (if applicable): master

Comment 1 Anand Avati 2012-03-15 10:33:24 UTC
CHANGE: http://review.gluster.com/2856 (core: bring a cmdline option to set memory-accounting) merged in master by Vijay Bellur (vijay)

Comment 2 Raghavendra Bhat 2012-06-04 07:11:46 UTC
This is the ps aux | grep glusterfs o/p.

root@hyperspace:~# !ps
ps aux | grep gluster
root     30042  1.6  0.2 101460 11324 ?        Ssl  12:38   0:00 glusterd
root     30066 16.2  0.4 184636 16116 ?        Ssl  12:38   0:01 /usr/local/sbin/glusterfsd -s localhost --volfile-id mirror.hyperspace.mnt-sda7-export3 -p /var/lib/glusterd/vols/mirror/run/hyperspace-mnt-sda7-export3.pid -S /tmp/8302154ae88b2bc51812d28069f56ae4.socket --brick-name /mnt/sda7/export3 -l /usr/local/var/log/glusterfs/bricks/mnt-sda7-export3.log --xlator-option *-posix.glusterd-uuid=e57587a6-7e8a-41f5-86c3-6ebe7bf5a0b4 --brick-port 49152 --xlator-option mirror-server.listen-port=49152
root     30073 18.0  0.4 183612 17132 ?        Ssl  12:38   0:01 /usr/local/sbin/glusterfsd -s localhost --volfile-id mirror.hyperspace.mnt-sda8-export3 -p /var/lib/glusterd/vols/mirror/run/hyperspace-mnt-sda8-export3.pid -S /tmp/9fea890d87338d199aa95589f3e2c400.socket --brick-name /mnt/sda8/export3 -l /usr/local/var/log/glusterfs/bricks/mnt-sda8-export3.log --xlator-option *-posix.glusterd-uuid=e57587a6-7e8a-41f5-86c3-6ebe7bf5a0b4 --brick-port 49153 --xlator-option mirror-server.listen-port=49153
root     30079  0.1  0.4 118072 16080 ?        Ssl  12:38   0:00 /usr/local/sbin/glusterfsd -s localhost --volfile-id mirror.hyperspace.mnt-sda7-last34 -p /var/lib/glusterd/vols/mirror/run/hyperspace-mnt-sda7-last34.pid -S /tmp/b5daa0a74734ea07157b4b058be3e0a0.socket --brick-name /mnt/sda7/last34 -l /usr/local/var/log/glusterfs/bricks/mnt-sda7-last34.log --xlator-option *-posix.glusterd-uuid=e57587a6-7e8a-41f5-86c3-6ebe7bf5a0b4 --brick-port 49171 --xlator-option mirror-server.listen-port=49171
root     30085  0.1  0.3 118072 15828 ?        Ssl  12:38   0:00 /usr/local/sbin/glusterfsd -s localhost --volfile-id mirror.hyperspace.mnt-sda8-last34 -p /var/lib/glusterd/vols/mirror/run/hyperspace-mnt-sda8-last34.pid -S /tmp/10a91a0cee36003bbde17fba015c0a3a.socket --brick-name /mnt/sda8/last34 -l /usr/local/var/log/glusterfs/bricks/mnt-sda8-last34.log --xlator-option *-posix.glusterd-uuid=e57587a6-7e8a-41f5-86c3-6ebe7bf5a0b4 --brick-port 49172 --xlator-option mirror-server.listen-port=49172
root     30091  0.4  1.1 207988 44108 ?        Ssl  12:38   0:00 /usr/local/sbin/glusterfs -s localhost --volfile-id gluster/nfs -p /var/lib/glusterd/nfs/run/nfs.pid -l /usr/local/var/log/glusterfs/nfs.log -S /tmp/be460472993a690cfcc21671c65a8a9d.socket
root     30097 14.2  0.6 237668 26332 ?        Ssl  12:38   0:01 /usr/local/sbin/glusterfs -s localhost --volfile-id gluster/glustershd -p /var/lib/glusterd/glustershd/run/glustershd.pid -l /usr/local/var/log/glusterfs/glustershd.log -S /tmp/91060e13e0ceba9157f93684ce09e14d.socket --xlator-option *replicate*.node-uuid=e57587a6-7e8a-41f5-86c3-6ebe7bf5a0b4

gluster volume set mirror memory-accounting on
Set volume successful

After mem-accounting on:
!ps
ps aux | grep gluster
root     30042  1.6  0.2 101460 11324 ?        Ssl  12:38   0:00 glusterd
root     30066 16.2  0.4 184636 16116 ?        Ssl  12:38   0:01 /usr/local/sbin/glusterfsd -s localhost --volfile-id mirror.hyperspace.mnt-sda7-export3 -p /var/lib/glusterd/vols/mirror/run/hyperspace-mnt-sda7-export3.pid -S /tmp/8302154ae88b2bc51812d28069f56ae4.socket --brick-name /mnt/sda7/export3 -l /usr/local/var/log/glusterfs/bricks/mnt-sda7-export3.log --xlator-option *-posix.glusterd-uuid=e57587a6-7e8a-41f5-86c3-6ebe7bf5a0b4 --brick-port 49152 --xlator-option mirror-server.listen-port=49152
root     30073 18.0  0.4 183612 17132 ?        Ssl  12:38   0:01 /usr/local/sbin/glusterfsd -s localhost --volfile-id mirror.hyperspace.mnt-sda8-export3 -p /var/lib/glusterd/vols/mirror/run/hyperspace-mnt-sda8-export3.pid -S /tmp/9fea890d87338d199aa95589f3e2c400.socket --brick-name /mnt/sda8/export3 -l /usr/local/var/log/glusterfs/bricks/mnt-sda8-export3.log --xlator-option *-posix.glusterd-uuid=e57587a6-7e8a-41f5-86c3-6ebe7bf5a0b4 --brick-port 49153 --xlator-option mirror-server.listen-port=49153
root     30079  0.1  0.4 118072 16080 ?        Ssl  12:38   0:00 /usr/local/sbin/glusterfsd -s localhost --volfile-id mirror.hyperspace.mnt-sda7-last34 -p /var/lib/glusterd/vols/mirror/run/hyperspace-mnt-sda7-last34.pid -S /tmp/b5daa0a74734ea07157b4b058be3e0a0.socket --brick-name /mnt/sda7/last34 -l /usr/local/var/log/glusterfs/bricks/mnt-sda7-last34.log --xlator-option *-posix.glusterd-uuid=e57587a6-7e8a-41f5-86c3-6ebe7bf5a0b4 --brick-port 49171 --xlator-option mirror-server.listen-port=49171
root     30085  0.1  0.3 118072 15828 ?        Ssl  12:38   0:00 /usr/local/sbin/glusterfsd -s localhost --volfile-id mirror.hyperspace.mnt-sda8-last34 -p /var/lib/glusterd/vols/mirror/run/hyperspace-mnt-sda8-last34.pid -S /tmp/10a91a0cee36003bbde17fba015c0a3a.socket --brick-name /mnt/sda8/last34 -l /usr/local/var/log/glusterfs/bricks/mnt-sda8-last34.log --xlator-option *-posix.glusterd-uuid=e57587a6-7e8a-41f5-86c3-6ebe7bf5a0b4 --brick-port 49172 --xlator-option mirror-server.listen-port=49172
root     30091  0.4  1.1 207988 44108 ?        Ssl  12:38   0:00 /usr/local/sbin/glusterfs -s localhost --volfile-id gluster/nfs -p /var/lib/glusterd/nfs/run/nfs.pid -l /usr/local/var/log/glusterfs/nfs.log -S /tmp/be460472993a690cfcc21671c65a8a9d.socket
root     30097 14.2  0.6 237668 26332 ?        Ssl  12:38   0:01 /usr/local/sbin/glusterfs -s localhost --volfile-id gluster/glustershd -p /var/lib/glusterd/glustershd/run/glustershd.pid -l /usr/local/var/log/glusterfs/glustershd.log -S /tmp/91060e13e0ceba9157f93684ce09e14d.socket --xlator-option *replicate*.node-uuid=e57587a6-7e8a-41f5-86c3-6ebe7bf5a0b4
root     30136  0.0  0.0  13128  1068 pts/2    S+   12:38   0:00 grep --color=auto gluster
root@hyperspace:~# gluster volume stop mirror