Aug 142009
 

In the last HowTo, I showed you how to setup GFS2 file system with Red Hat Clustering. I will now show you how to optimize the performance of your GFS2 mounts. The gfs_controld daemon manages the mounting, unmounting, and the recovery of the GFS2 mounts. gfs_controld also manages the posix lock.

By default  the plock_rate_limit option is set to 100. This will allow a maximum of 100 locks per second, which will decrease your GFS2 performance. See below…

 <dlm plock_ownership=”0″ plock_rate_limit=”100″/>
<gfs_controld plock_rate_limit=”100″/>

You can test the performance of you cluster by downloading the program ping_pong.c. This program was very helpful to me in debugging the poor performance in my GFS2 cluster.
The instructions on how to compile the program and run it is on the site http://wiki.samba.org/index.php/Ping_pong.When I initially ran ping_pong, I only got a max of 97 plocks per second. After removing the rate limit I was able to get about 3000 Plocks per second.

You should change the plock_rate_limit to 0 and the dlm plock_ownership to 1. See below..

 <dlm plock_ownership=”1″ plock_rate_limit=”0″/>
<gfs_controld plock_rate_limit=”0″/>

FYI.. The settings above are set in /etc/cluster/cluster.conf   Example below…
    <cman/>
<dlm plock_ownership=”1″ plock_rate_limit=”0″/>
<gfs_controld plock_rate_limit=”0″/>

</cluster>

My settings were added to the end of cluster.conf.
After adding the above settings, please reboot all the nodes for the settings to take affect.

The above will increase locking operations at the cost of an increase in network utilization. You also can increase the performance of your GFS2 mount by mounting it with these options ( noatime and nodiratime )… Example below..

mount -o noatime,nodiratime, /dev/mapper/mytest_gfs2-MyGFS2test /GFS/

Another way to tune GFS2 directly, is by decreasing how often GFS2 demotes its locks.  Demote_secs is the number of seconds that gfsd will wake up and demote locks and flush data to disk. The default is set to 300 seconds which is equal to 5 minutes. I currently have mine to demote every 20 seconds, and believe you me… I saw a big performance increase.

gfs2_tool settune /GFS demote_secs 20

I chose 20 seconds, but it does not mean that is what you need to chose. You can play with those numbers and see how performance either increases or decreases. The option needs to be set every time the file system is mounted. So you might want to add this option in rc.local or in the gfs2 startup script at the end.

 echo “gfs2_tool settune /GFS demote_secs 20″ >> /etc/rc.local

When all was said and done I was able to get over 3000 plocks per sec after the optimization was done and my file level operations drastically increased in performance. I Hope the above helps you the way it helped me.

Very Important…. Make sure that updatedb does not run on your GFS2 mounts.. This will kill your GFS2 mount!!!!

 

 

dynasty


Warning: fopen(/home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/lib/standard.txt) [function.fopen]: failed to open stream: No such file or directory in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 104

Warning: fread(): supplied argument is not a valid stream resource in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 105

Warning: fclose(): supplied argument is not a valid stream resource in /home/dynasty/linuxdynasty.org/wp-content/plugins/wp-google-plus-one/plusone.php on line 106
.