2.5.3. VFS Tuning Options: Research and Experiment
Like all Linux file systems, GFS2 sits on top of a layer called the virtual file system (VFS). You can tune the VFS layer to improve underlying GFS2 performance by using the
sysctl
(8) command. For example, the values for dirty_background_ratio
and vfs_cache_pressure
may be adjusted depending on your situation. To fetch the current values, use the following commands:
sysctl -n vm.dirty_background_ratio sysctl -n vm.vfs_cache_pressure
The following commands adjust the values:
sysctl -w vm.dirty_background_ratio=20 sysctl -w vm.vfs_cache_pressure=500
You can permanently change the values of these parameters by editing the
/etc/sysctl.conf
file.
To find the optimal values for your use cases, research the various VFS options and experiment on a test cluster before deploying into full production.