Glusterfs tuning
Tuning is done on a per-volume basis. This allows for different usage patterns for each volume.
General tuning
Startup time is not very lang but if you don't use NFS you could just as well switch the support off.
gluster volume set <volume> nfs.disable <value> (default: on)
Make sure gluster does not use 100% of the allocated storage
gluster volume set <volume> cluster.min-free-disk <value> (default: 10%)
gluster volume set <volume> performance.write-behind-window-size <value> (default: 1MB)
gluster volume set <volume> performance.cache-refresh-timeout <value> (default: 1)
gluster volume set <volume> performance.read-ahead <value> (default: on)
Many small files
The ratio between the time needed for handling the metadata of a file and the time needed for the actual data can be used to identify a small-files pattern.
Enable read cache
gluster volume set performance.cache-size <value> (default: 32MB)
gluster volume set performance.cache-max-file-size <value> (default: 0)
Allow multiple threads for each client
gluster volume set <volume> client.event-threads <value> (default: 2)
Allow the server to use multiple threads for a volume
gluster volume set <volume> server.event-threads <value> (default: 1)
Gluster is able to answer with “wuhu I did a flush() successful and all your data is save”. You can configure if it should really do a flush() or do that later in the background. To increase the performance with small files you should choose the latter one. But keep in mind that this maybe isn’t consistent!
gluster volume set <volume> performance.flush-behind on (default: on)
md-cache
md-cache allows client-site caching and invalidates the cache by receiving events from the server.
gluster volume set <volname> features.cache-invalidation on (default: off)
gluster volume set <volname> features.cache-invalidation-timeout 600 (default: 60)
gluster volume set <volname> performance.stat-prefetch on (default: on)
gluster volume set <volname> performance.cache-invalidation on (default: false)
gluster volume set <volname> performance.md-cache-timeout 600 (default: 1)