最近因為有大檔案同步的需求
所以找了二個解決方案 rsync bigsync
同時試了一下
樣本都是一個49G的檔案 來源目的都一樣
直接上數据
rsync
sent 49,088,096,429 bytes received 35 bytes 95,039,876.99 bytes/sec
total size is 49,076,114,830 speedup is 1.00
real 8m36.099s
user 3m35.524s
sys 1m17.008s
bigsync
Total read = 45.706 Gb
Total write = 45.706 Gb
Total blocks changed = 3121
Elapsed 10m13s
看起來rsync還是快一點
另外bigsync可以調整每次處理的block大小
順便貼一下數据
500M
Total read = 45.706 Gb
Total write = 45.706 Gb
Total blocks changed = 94
Elapsed 10m32s
1000M
Total read = 45.706 Gb
Total write = 45.706 Gb
Total blocks changed = 47
Elapsed 10m30s
看起來和default 15M並沒有什麼差別
再來看一下如果檔案有小變化時 二方的結果
這次測一個10G的檔
rsync
sent 10,876,360,204 bytes received 35 bytes 65,718,188.76 bytes/sec
total size is 10,873,705,357 speedup is 1.00
real 2m44.831s
user 0m48.460s
sys 0m18.184s
看來rsync並不會把檔案切割計算
bigsync
Total read = 10.127 Gb
Total write = 4 Mb
Total blocks changed = 1
Elapsed 1m33s
結論
如果需求是每次都要同步全新的檔 用 rsync比較快
如果目的檔案已存在 只要同步差異處 用bigsync 可以節省比較多時間
https://rsync.samba.org/
https://github.com/egorFiNE/bigsync
沒有留言:
張貼留言