gluster性能相關中繼器默認值說明

一、性能相關中繼器

write-behind, read-ahead, io-cache, quick-read, open-behind, stat-prefetch(md-cache), io-threads(默認server端)

以上中繼器默認全部開啟,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

二、默認配置及默認值

1、默認配置中繼

在./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

2、默認配置項值

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