以上中继器默认全部开启,symlink-cache默认关闭。
NFS相关性能优化中继器
默认开启:
performance.nfs.write-behind
默认关闭:
performance.nfs.read-ahead
performance.nfs.io-cache
performance.nfs.quick-read
performance.nfs.stat-prefetch
performance.nfs.io-threads
performance.force-readdirp
在./vols/tank/tank-fuse.vol(客户端)文件中,默认会配置如下中继器:
dht和性能相关的write-behind, read-ahead, io-cache, quick-read, open-behind, stat-prefetch(md-cache).
在./vols/tank/tank.node1.data-disk3.vol同类(服务器端)文件中,默认会设置如下中继器参数:
posix、access-control、locks、io-threads、index、maker
cache-size
io-cahce:cache-size:默认32MB
Size of the read cache
quick-read:cache-size:默认128MB
Size of the read cache
gluster volume set tank cache-size 32MB
该命令导致的cache-size更新包含两个部分,一个是io-cache里对应的cache大小,一个是quick-read里的cache大小。
从源代码上看,这两个cache-size对应同一个key,所以会出现一改全改的现象,应该是一个bug。
read-ahead:page-count:默认值4
key为performance.read-ahead-page-count,可以通过该选项进行设置。
gluster volume set tank read-ahead-page-count 4
Number of pages that will be pre-fetched
write-behind:"cache-size"或者"window-size":默认值1MB
key为performance.write-behind-window-size,可以通过该选项进行设置。
gluster volume set tank write-behind-window-size 1MB
Size of the write-behind buffer for a single file (inode).
io-threads:thread-count:默认16
key:performance.io-thread-count
gluster volume set tank io-thread-count 16
Number of threads in IO threads translator which perform concurrent IO operations at a given time
该配置保存在/vols/tank/tank.node1.data-disk3.vol同类文件中。
md-cache:md-cache-timeout:默认值1(亦stat-prefetch)
gluster volume set tank md-cache-timeout 1
该操作会更改md-cache中继器md-cache-timeout选项的默认值
Time period after which cache has to be refreshed
io-cache:cache-timeout:默认值1
key:performance.cache-refresh-timeout
gluster volume set tank cache-refresh-timeout 1
cache-timeout:The cached data for a file will be retained till ‘cache-refresh-timeout‘ seconds, after which data re-validation is performed.
备注:默认参数基于GlusterFS 3.4.5
本文出自 “敏而好学” 博客,请务必保留此出处http://dangzhiqiang.blog.51cto.com/7961271/1837814
原文地址:http://dangzhiqiang.blog.51cto.com/7961271/1837814