United States (change)
Shortcuts: Downloads Fedora Red Hat Network
Account Links: Cart Your Account Logout
In some workloads or environments, the overhead associated with distributed locking on GFS may affect performance or cause certain commands to appear to hang. In Red Hat Enterprise Linux 4 Update 6 and later a GFS tunable called glock_purge has been added to reduce the total number of locks cached for a particular filesystem on a cluster node. The tunable accepts a parameter to define the percentage of unused glocks for that filesystem to clear every five seconds:
# gfs_tool settune /path/to/mount glock_purge X
Where X is an integer between 0 and 100 indicating the percentage to clear. A setting of 0 disables glock_purge. Commonly this is set somewhere between 30-60 to start and can be further tuned based on testing and performance benchmarks. This setting is not persistent so it must be reapplied every time the filesystem is mounted. Typically it is placed in /etc/rc.local or /etc/init.d/gfs in the start function on every node so it is applied at boot time after the filesystems are mounted. Note that this setting only applies to an individual filesystem so multiple commands must be used to apply it to more than one mountpoint.
The statfs_fast tunable can be used in Red Hat Enterprise Linux 4 Update 5 or later to speed up statfs calls on GFS. Again, this setting should be applied on all nodes, is not persistent, and only applies to a specific filesystem. To enable it:
# gfs_tool settune /path/to/mount statfs_fast 1
If possible, the mount options 'noquota,noatime,nodiratime' are recommended for GFS filesystems as they are known to improve performance in many cases. They can be added in /etc/fstab:
/dev/clustervg/lv1 /mnt/appdata gfs defaults,noquota,noatime,nodiratime 0 0
or when manually mounting:
# mount -t gfs -o noatime,noatime,nodiratime /dev/clustervg/lv1 /mnt/appdata
For more tuning settings and recommendations, see the Cluster FAQ: http://sourceware.org/cluster/wiki/FAQ/GFS#gfs_tuning