<div><br></div><div><div>problem: &nbsp;when <span style="line-height: 1.5;">self-heal</span><span style="line-height: 1.5;">&nbsp; is running with &nbsp;many files, it &nbsp;make cpu high load and &nbsp;gluster client cannot write new file and &nbsp;read file.</span></div><div><br></div><div><div><span style="line-height: 1.5;">as described at: http://www.gluster.org/pipermail/gluster-users/2015-November/024228.html</span></div><div><span style="line-height: 1.5;"><br></span></div><div><div>from following tests, I realize that: when &nbsp;close &nbsp;tcp &nbsp;connections between glusterfs and &nbsp;glusterfsd &nbsp;in gluster server,it &nbsp;can reduce &nbsp;cpu load and not affect &nbsp;gluster &nbsp;client to write and read file.</div><div><br></div><div><br></div><div><br></div><div><br></div><div>========================= &nbsp;config begin ==================================</div><div>gluster &nbsp;3.5.1</div><div><br></div><div><div>#gluster volume status</div><div>Status of volume: tr5</div><div>Gluster process &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Port &nbsp; &nbsp;Online &nbsp;Pid</div><div>------------------------------------------------------------------------------</div><div>Brick 192.168.5.252:/home/gluster351/r15 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;49157 &nbsp; Y &nbsp; &nbsp; &nbsp; 11899</div><div>Brick 192.168.5.76:/home/gluster/r15 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 49152 &nbsp; Y &nbsp; &nbsp; &nbsp; 26692</div><div>NFS Server on localhost &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; N/A &nbsp; &nbsp; N &nbsp; &nbsp; &nbsp; N/A</div><div>Self-heal Daemon on localhost &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; N/A &nbsp; &nbsp; Y &nbsp; &nbsp; &nbsp; 11918</div><div>NFS Server on 192.168.5.76 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;N/A &nbsp; &nbsp; N &nbsp; &nbsp; &nbsp; N/A</div><div>Self-heal Daemon on 192.168.5.76 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;N/A &nbsp; &nbsp; Y &nbsp; &nbsp; &nbsp; 26705</div><div>&nbsp;</div><div>Task Status of Volume tr5</div><div>------------------------------------------------------------------------------</div><div>There are no active volume tasks</div></div><div><br></div><div><br></div><div>gluster client: &nbsp; 192.168.16.207:1019</div><div><div># mount</div><div>192.168.5.252:/tr5 on /home/mariadb/data/tr5 type fuse.glusterfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072)</div></div><div><br></div><div>========================= &nbsp;config end ==================================</div><div><br></div><div><br></div><div><div style="line-height: 21px;">========================= test 1 &nbsp;begin =================================</div></div><div style="line-height: 21px;">at 192.168.5.252,run:</div><div style="line-height: 21px;"><div style="line-height: 21px;">iptables -A INPUT -p tcp --dport 49157 &nbsp;-j DROP &nbsp;-s &nbsp;192.168.5.252</div><div style="line-height: 21px;">iptables -A INPUT -p tcp --dport 49157 &nbsp;-j DROP &nbsp;-s &nbsp;192.168.5.76</div><div style="line-height: 21px;"><br></div><div style="line-height: 21px;">at 192.168.5.76,run:</div><div style="line-height: 21px;"><div style="line-height: 21px;">iptables -A INPUT -p tcp --dport 49152 &nbsp;-j DROP &nbsp;-s &nbsp; 192.168.5.252</div><div style="line-height: 21px;">iptables -A INPUT -p tcp --dport 49152 &nbsp;-j DROP &nbsp;-s &nbsp; 192.168.5.76</div></div></div><div style="line-height: 21px;"><br></div><div style="line-height: 21px;">gluster client can write and read files as normal.</div><div><div style="line-height: 21px;">========================= test 1 &nbsp;end ==================================</div></div><div style="line-height: 21px;"><br></div><div style="line-height: 21px;"><br></div><div><div style="line-height: 21px;">========================= test 2 &nbsp;begin ==================================</div></div><div><div style="line-height: 21px;">1: &nbsp;at 192.168.5.76, shutdown process: glusterd, glusterfsd, glusterfs.</div><div style="line-height: 21px;">2: &nbsp;at gluster client, <span style="line-height: 1.5;">copy &nbsp;10k files to gluster server. &nbsp;</span></div><div><span style="line-height: 1.5;">3: </span><span style="line-height: 1.5;">&nbsp;at 192.168.5.252, &nbsp;there are &nbsp;10k+ link file under &nbsp;directory </span>/home/gluster351/r15/.glusterfs/indices/xattrop. </div><div>4: &nbsp;at <span style="line-height: 1.5;">192.168.5.76, start &nbsp;gluster service. &nbsp;then self-heal &nbsp;begins.</span></div><div><div style="line-height: 21px;"><span style="line-height: 1.5;">5: &nbsp;during self-heal, at </span><span style="line-height: 1.5;">192.168.5.252 , glusterfs %CPU 5.7 , glusterfsd &nbsp; </span><span style="line-height: 1.5;">&nbsp;</span><span style="line-height: 1.5;">%CPU 7.0</span><span style="line-height: 1.5;"></span></div></div><div style="line-height: 21px;"><span style="line-height: 1.5;"><br></span></div><div style="line-height: 21px;"><div style="line-height: 21px;">&nbsp; PID USER &nbsp; &nbsp; &nbsp;PR &nbsp;NI &nbsp;VIRT &nbsp;RES &nbsp;SHR S %CPU %MEM &nbsp; &nbsp;TIME+ &nbsp;COMMAND &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div style="line-height: 21px;">&nbsp;11918 root &nbsp; &nbsp; &nbsp;20 &nbsp; 0 &nbsp;321m &nbsp;36m 2816 S &nbsp;7.0 &nbsp;0.5 &nbsp; 1:28.07 glusterfs &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div style="line-height: 21px;">&nbsp; 11899 root &nbsp; &nbsp; &nbsp;20 &nbsp; 0 &nbsp;824m &nbsp;42m 3164 S &nbsp;5.7 &nbsp;0.5 &nbsp;20:43.39 glusterfsd &nbsp; &nbsp; &nbsp;</div><div style="line-height: 21px;"><br></div></div><div><div style="line-height: 21px;"><span style="line-height: 1.5;">6: &nbsp;during self-heal, at </span><span style="line-height: 1.5;">192.168.5.76 , glusterfs %CPU 0 , glusterfsd &nbsp; </span><span style="line-height: 1.5;">&nbsp;</span><span style="line-height: 1.5;">%CPU 6.0</span><span style="line-height: 1.5;"></span></div></div><span style="line-height: 1.5;">7: &nbsp;during self-heal, at </span><span style="line-height: 1.5;">192.168.5.76 , run:</span></div><div><span style="line-height: 1.5;"></span><div style="line-height: 21px;"><div style="line-height: 21px;"><div style="line-height: 21px;">&nbsp; &nbsp; &nbsp; iptables -A INPUT -p tcp --dport 49152 &nbsp;-j DROP &nbsp;-s &nbsp; 192.168.5.252</div><div style="line-height: 21px;">&nbsp; &nbsp; &nbsp; iptables -A INPUT -p tcp --dport 49152 &nbsp;-j DROP &nbsp;-s &nbsp; 192.168.5.76</div><div style="line-height: 21px;">&nbsp; &nbsp; &nbsp;</div><div style="line-height: 21px;">&nbsp; &nbsp; &nbsp;after run iptables, at 192.168.5.76 &nbsp;and 192.168.5.252, both <span style="line-height: 1.5;">glusterfs %CPU 0 , glusterfsd &nbsp; </span><span style="line-height: 1.5;">&nbsp;</span><span style="line-height: 1.5;">%CPU 0</span></div><div style="line-height: 21px;"><span style="line-height: 1.5;">8: &nbsp;</span><span style="line-height: 1.5;">&nbsp;at 192.168.5.252, &nbsp;there are &nbsp;7000+ link file under &nbsp;directory </span>/home/gluster351/r15/.glusterfs/indices/xattrop. </div><div style="line-height: 21px;">9: &nbsp; gluster client can write and read files as normal.</div></div></div><div style="line-height: 21px;">========================= test 2 &nbsp;begin ==================================</div></div><div><br></div></div></div></div>