Linux 7.2 xfs和ext4效能測試
一、說明
紅帽官方版本已經升級到7.2,該版本的標準檔案系統已經由EXT4升級到XFS。從作業系統角度來講,為了獲取更好的支援和服務,此次測試EXT4和XFS的效能區別。
Ext4的檔案系統容量達到1EB,而檔案容量則達到16TB,這是一個非常大的數字了。對一般的桌上型電腦和伺服器而言,這可能並不重要,但對於大型磁碟陣列的使用者而言,這就非常重要了。
XFS是一個64位檔案系統,最大支援8EB減1位元組的單個檔案系統,實際部署時取決於宿主作業系統的最大塊限制。對於一個32位Linux系統,檔案和檔案系統的大小會被限制在16TB。
二、測試模型
我們對檔案系統的消耗主要是在MySQL這一塊,MySQL資料庫對磁碟的讀寫壓力大,因此不同的檔案系統和檔案系統掛載引數對MySQL的效能會有一定的影響。
本次測試主要測試使用sysbench測試同樣主機磁碟情況下的IOPS。
2.1 XFS磁碟掛載引數
/dev/mapper/datavg-mysqldata on /mysqldatatype xfs (rw,noatime,nodiratime,seclabel,attr2,nobarrier,inode64,noquota)
2.2 EXT4磁碟掛載引數
/dev/mapper/datavg-mysqldata on /mysqldatatype ext4 (rw,noatime,nodiratime,seclabel,nobarrier,data=ordered)
三、測試步驟
3.1 生成測試檔案
sysbench --test=fileio --file-num=16--file-block-size=16384 --file-total-size=2G prepare
3.2 測試順序寫
sysbench --test=fileio --file-num=16--file-block-size=16384 --file-total-size=2G --num-threads=4--max-requests=100000000 --max-time=180 --file-test-mode=seqwr--file-extra-flags=direct run
3.2.1 XFS順序寫
sysbench 0.5: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 4
Random number generator seed is 0 and willbe ignored
Extra file open flags: 3
16 files, 128Mb each
2Gb total file size
Block size 16Kb
Periodic FSYNC enabled, calling fsync()each 100 requests.
Calling fsync() at the end of test,Enabled.
Using synchronous I/O mode
Doing sequential write (creation) test
Initializing worker threads...
Threads started!
Operations performed: 0 reads, 9710025 writes, 1553600 Other =11263625 Total
Read 0b Written 148.16Gb Totaltransferred 148.16Gb (842.88Mb/sec)
53944.57 Requests/sec executed
General statistics:
total time: 180.0000s
total number of events: 9710025
total time taken by event execution: 678.2973s
response time:
min: 0.04ms
avg: 0.07ms
max: 90.93ms
approx. 95 percentile: 0.10ms
Threads fairness:
events (avg/stddev): 2427506.2500/6365.48
execution time (avg/stddev): 169.5743/0.22
3.2.2 EXT4順序寫
[[email protected] mysqldata]# sysbench--test=fileio --file-num=16 --file-block-size=16384 --file-total-size=2G--num-threads=4 --max-requests=100000000 --max-time=180 --file-test-mode=seqwr--file-extra-flags=direct run
sysbench 0.5: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 4
Random number generator seed is 0 and willbe ignored
Extra file open flags: 3
16 files, 128Mb each
2Gb total file size
Block size 16Kb
Periodic FSYNC enabled, calling fsync()each 100 requests.
Calling fsync() at the end of test,Enabled.
Using synchronous I/O mode
Doing sequential write (creation) test
Initializing worker threads...
Threads started!
Operations performed: 0 reads, 4014480 writes, 642304 Other =4656784 Total
Read 0b Written 61.256Gb Totaltransferred 61.256Gb (348.48Mb/sec)
22302.64 Requests/sec executed
General statistics:
total time: 180.0002s
total number of events: 4014480
total time taken by event execution: 712.0619s
response time:
min: 0.04ms
avg: 0.18ms
max: 123.86ms
approx. 95 percentile: 0.23ms
Threads fairness:
events (avg/stddev): 1003620.0000/19916.58
execution time(avg/stddev): 178.0155/0.07
結果:XFS的順序寫比EXT4快一倍。
3.3測試順序讀
sysbench--test=fileio --file-num=16 --file-block-size=16384 --file-total-size=2G--num-threads=4 --max-requests=100000000 --max-time=180 --file-test-mode=seqrd--file-extra-flags=direct run
3.3.1 XFS順序讀
[[email protected] mysqldata]# sysbench--test=fileio --file-num=16 --file-block-size=16384 --file-total-size=2G--num-threads=4 --max-requests=100000000 --max-time=180 --file-test-mode=seqrd--file-extra-flags=direct run
sysbench0.5: multi-threaded system evaluationbenchmark
Running the testwith following options:
Number ofthreads: 4
Random numbergenerator seed is 0 and will be ignored
Extra file openflags: 3
16 files, 128Mbeach
2Gb total filesize
Block size 16Kb
Periodic FSYNCenabled, calling fsync() each 100 requests.
Calling fsync()at the end of test, Enabled.
Usingsynchronous I/O mode
Doing sequentialread test
Initializingworker threads...
Threads started!
Operationsperformed: 10222146 reads, 0 writes, 0Other = 10222146 Total
Read155.98Gb Written 0b Total transferred 155.98Gb (887.34Mb/sec)
56789.67Requests/sec executed
Generalstatistics:
total time: 180.0001s
total number of events: 10222146
total time taken by event execution:714.2186s
response time:
min: 0.04ms
avg: 0.07ms
max: 144.94ms
approx. 95 percentile: 0.10ms
Threadsfairness:
events (avg/stddev): 2555536.5000/124.69
execution time (avg/stddev): 178.5547/0.05
3.3.2 EXT4順序讀
[[email protected] mysqldata]# sysbench--test=fileio --file-num=16 --file-block-size=16384 --file-total-size=2G--num-threads=4 --max-requests=100000000 --max-time=180 --file-test-mode=seqrd--file-extra-flags=direct run
sysbench 0.5: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 4
Random number generator seed is 0 and willbe ignored
Extra file open flags: 3
16 files, 128Mb each
2Gb total file size
Block size 16Kb
Periodic FSYNC enabled, calling fsync()each 100 requests.
Calling fsync() at the end of test,Enabled.
Using synchronous I/O mode
Doing sequential read test
Initializing worker threads...
Threads started!
Operations performed: 9961497 reads, 0 writes, 0 Other = 9961497Total
Read 152Gb Written 0b Total transferred152Gb (864.7Mb/sec)
55341.00 Requests/sec executed
General statistics:
total time: 180.0021s
total number of events: 9961497
total time taken by event execution: 713.3962s
response time:
min: 0.04ms
avg: 0.07ms
max: 143.99ms
approx. 95 percentile: 0.10ms
Threads fairness:
events (avg/stddev): 2490374.2500/436.98
execution time(avg/stddev): 178.3491/0.18
結果:XFS的順序讀比EXT4快20M/S
3.4 測試隨機寫
sysbench --test=fileio --file-num=16--file-block-size=16384 --file-total-size=2G --num-threads=4--max-requests=100000000 --max-time=180 --file-test-mode=rndwr--file-extra-flags=direct run
3.4.1 XFS隨機寫
[[email protected] mysqldata]# sysbench--test=fileio --file-num=16 --file-block-size=16384 --file-total-size=2G--num-threads=4 --max-requests=100000000 --max-time=180 --file-test-mode=rndwr--file-extra-flags=direct run
sysbench 0.5: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 4
Random number generator seed is 0 and willbe ignored
Extra file open flags: 3
16 files, 128Mb each
2Gb total file size
Block size 16Kb
Number of IO requests: 100000000
Read/Write ratio for combined random IOtest: 1.50
Periodic FSYNC enabled, calling fsync()each 100 requests.
Calling fsync() at the end of test,Enabled.
Using synchronous I/O mode
Doing random write test
Initializing worker threads...
Threads started!
Operationsperformed: 0 reads, 186364 writes, 29808Other = 216172 Total
Read 0b Written 2.8437Gb Total transferred 2.8437Gb (16.171Mb/sec)
1034.95 Requests/sec executed
General statistics:
total time: 180.0709s
total number of events: 186364
total time taken by event execution: 523.4992s
response time:
min: 0.04ms
avg: 2.81ms
max: 772.01ms
approx. 95 percentile: 0.12ms
Threads fairness:
events (avg/stddev): 46591.0000/26773.96
execution time(avg/stddev): 130.8748/75.55
3.4.2 EXT4隨機寫
[[email protected] mysqldata]# sysbench--test=fileio --file-num=16 --file-block-size=16384 --file-total-size=2G--num-threads=4 --max-requests=100000000 --max-time=180 --file-test-mode=rndwr--file-extra-flags=direct run
sysbench 0.5: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 4
Random number generator seed is 0 and willbe ignored
Extra file open flags: 3
16 files, 128Mb each
2Gb total file size
Block size 16Kb
Number of IO requests: 100000000
Read/Write ratio for combined random IOtest: 1.50
Periodic FSYNC enabled, calling fsync()each 100 requests.
Calling fsync() at the end of test,Enabled.
Using synchronous I/O mode
Doing random write test
Initializing worker threads...
Threads started!
Operationsperformed: 0 reads, 194208 writes, 31072Other = 225280 Total
Read 0b Written 2.9634Gb Total transferred 2.9634Gb (16.855Mb/sec)
1078.70 Requests/sec executed
General statistics:
total time: 180.0396s
total number of events: 194208
total time taken by event execution: 694.4098s
response time:
min: 0.04ms
avg: 3.58ms
max: 349.96ms
approx. 95 percentile: 1.74ms
Threads fairness:
events (avg/stddev): 48552.0000/559.95
execution time(avg/stddev): 173.6025/0.45
結論: EXT4的隨機寫比XFS快0.7M/S
3.5 測試隨機讀
sysbench --test=fileio --file-num=16--file-block-size=16384 --file-total-size=2G --num-threads=4--max-requests=100000000 --max-time=180 --file-test-mode=rndrd--file-extra-flags=direct run
3.5.1 XFS隨機讀
[[email protected] mysqldata]# sysbench--test=fileio --file-num=16 --file-block-size=16384 --file-total-size=2G--num-threads=4 --max-requests=100000000 --max-time=180 --file-test-mode=rndrd--file-extra-flags=direct run
sysbench 0.5: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 4
Random number generator seed is 0 and willbe ignored
Extra file open flags: 3
16 files, 128Mb each
2Gb total file size
Block size 16Kb
Number of IO requests: 100000000
Read/Write ratio for combined random IOtest: 1.50
Periodic FSYNC enabled, calling fsync()each 100 requests.
Calling fsync() at the end of test,Enabled.
Using synchronous I/O mode
Doing random read test
Initializing worker threads...
Threads started!
Operations performed: 164839 reads, 0 writes, 0 Other = 164839Total
Read 2.5152Gb Written 0b Total transferred 2.5152Gb (14.308Mb/sec)
915.73 Requests/sec executed
General statistics:
total time: 180.0092s
total number of events: 164839
total time taken by event execution: 719.9114s
response time:
min: 0.04ms
avg: 4.37ms
max: 48.49ms
approx. 95 percentile: 10.48ms
Threads fairness:
events (avg/stddev): 41209.7500/51.29
execution time(avg/stddev): 179.9779/0.00
3.5.2 EXT4隨機讀
[[email protected] mysqldata]# sysbench--test=fileio --file-num=16 --file-block-size=16384 --file-total-size=2G--num-threads=4 --max-requests=100000000 --max-time=180 --file-test-mode=rndrd--file-extra-flags=direct run
sysbench 0.5: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 4
Random number generator seed is 0 and willbe ignored
Extra file open flags: 3
16 files, 128Mb each
2Gb total file size
Block size 16Kb
Number of IO requests: 100000000
Read/Write ratio for combined random IOtest: 1.50
Periodic FSYNC enabled, calling fsync()each 100 requests.
Calling fsync() at the end of test,Enabled.
Using synchronous I/O mode
Doing random read test
Initializing worker threads...
Threads started!
Operations performed: 208723 reads, 0 writes, 0 Other = 208723Total
Read 3.1849Gb Written 0b Total transferred 3.1849Gb (18.118Mb/sec)
1159.54 Requests/sec executed
General statistics:
total time: 180.0045s
total number of events: 208723
total time taken by event execution: 719.8451s
response time:
min: 0.04ms
avg: 3.45ms
max: 37.33ms
approx. 95 percentile: 8.16ms
Threads fairness:
events (avg/stddev): 52180.7500/160.49
execution time(avg/stddev): 179.9613/0.00
結論:EXT4的隨機讀比XFS的隨機讀快4M/S
相關推薦
Linux 7.2 xfs和ext4效能測試
一、說明 紅帽官方版本已經升級到7.2,該版本的標準檔案系統已經由EXT4升級到XFS。從作業系統角度來講,為了獲取更好的支援和服務,此次測試EXT4和XFS的效能區別。 Ext4的檔案系統容量達到1EB,而檔案容量則達到16TB,這是一個非常大的數字了。對一般的桌上型電
Linux下對lvm邏輯卷分區大小的調整(針對xfs和ext4不同文件系統)
volume group dev 減少 占用 ash oca host 不能 當我們在安裝系統的時候,由於沒有合理分配分區空間,在後續維護過程中,發現有些分區空間不夠使用,而有的分區空間卻有很多剩余空間。如果這些分區在裝系統的時候使用了lvm(前提是這些分區要是lvm邏輯卷
Linux下對lvm邏輯卷分割槽大小的調整(針對xfs和ext4不同檔案系統)
當我們在安裝系統的時候,由於沒有合理分配分割槽空間,在後續維護過程中,發現有些分割槽空間不夠使用,而有的分割槽空間卻有很多剩餘空間。如果這些分割槽在裝系統的時候使用了lvm(前提是這些分割槽要是lvm邏輯卷分割槽),那麼就可以輕鬆進行擴容或縮容!不同檔案系統型別所對應的建立、檢查、調整命令不同,下面就針對xf
linux xfs和ext4的區別
centos7.0開始預設檔案系統是xfs,centos6是ext4,centos5是ext3 ext3和ext4的最大區別在於,ext3在fsck時需要耗費大量時間(檔案越多,時間越長),而ext
四個O(n^2)級別的排序效能測試
測試環境為DEV-C++,並且選擇排序,插入排序,氣泡排序,均為優化後的,若想了解具體優化過程,請參照:https://blog.csdn.net/qq_40164152 測試用例: #ifndef OPTIONAL_02_SHELL_SORT_SORTTESTHELPER_H #define OP
linux 7.2安裝擴充套件redis
unzip phpredis-php7.zip cd phpredis-php7 /usr/local/php7.2/bin/phpize ./configure --with-php-config=/usr/local/php7.2/bin/php-config make make insta
linux 7.2安裝擴展redis
all linux phpize config 擴展redis ext 正常 擴展 onf unzip phpredis-php7.zip cd phpredis-php7 /usr/local/php7.2/bin/phpize ./configure --wit
Avocado使用手冊(1) --環境安裝部分 (For Big Cloud Enterprise Linux 7.2)
1. avocado安裝 可以從Avocado專案RPM儲存庫獲得Enterprise Linux的Avocado軟體包。此外,EPEL倉庫中的一些包是必需的,因此您需要先啟用它。對於EL7,執行以下命令應該這樣做: yum install https://dl.fedorapr
我國祖沖之密碼演算法ZUC128和ZUC256效能測試
摘要:本文件對序列密碼演算法ZUC128和ZUC256在32位平臺下進行軟體實現和評估,包括加密效能和計算MAC的效能,文件最後一章給出ZUC128和ZUC256的效能對比評估結果。 關鍵詞:ZUC128,ZUC256,序列密碼,軟體實現。 目錄 1. 效能測試說明... 1 1.1
Ecs linux 7.2 搭建lamp
寫在前面 作業系統:CentOS 7.2 64位 Apache:2.4.23 MySQL:5.7.17 PHP:7.0.12 準備工作 設定防火牆 執行命令關閉防火牆。 systemctl stop firewalld.service 執行命
[From 7.1~7.2] 常量和欄位
/----------------------------7.1常量------------------------------------------/ 常量是值從不變化的符號。定義常量符號時,它的值必須能在 編譯時確定。確定後, 編譯器將常量值儲存到程式元資料中。這意味著 只能定義編譯器
Mono 3.2.3 TCP吞吐效能測試報告
在前幾天簡單地測試了一下Mono 3.2.3 TCP處理的穩定性,有同學問Mono 3.2.3的TCP處理性有怎樣,以下是針對Mono 3.2.3TCP在吞吐方面的效能測試.主要測試分兩種場分別是連線互動密集度高和低的兩種情況的處理效能指標. 測試環境描述 服務端: cpu:e4300 1.7g
Linux-7.2 下 Solr4.10.4 單機模式的安裝與部署圖文詳解
《 Linux下Solr4.10.4搜尋引擎的安裝與部署 》 瞭解Solr: Solr是來自Apache Lucene專案的流行的,快速的,開源的NoSQL搜尋平臺。它的主要功能包括強大
【MongoDb】一次關於Oracle和MongoDb的插入和查詢效能測試
本次實驗是在筆者上學期期末一次課程實習中的一部分,現在整理出來以供參考。 本次資料用的是不同數量級別上的資料分別在Oracle和MongoDb中進行實驗的。 其中兩者的表結構一樣,都是如下欄位:
Java和Groovy效能測試
一直使用Java呼叫Groovy指令碼完成一些隨時可能調整修改的任務。今天測試了以下效能,還不錯。測試程式碼如下: Java程式碼: public class TestC { static long fib(long n) { if (n &
Lua、Luajit、Python、Node.js和Java效能測試對比
這個Github專案提供了Lua、Luajit、Python、Node.js和Java等動態語言的效能測試,具體語言版本包括: Lua 5.3.3 Luajit 2.0.4 Python 3.5.1 Pypy 2.4.0 HipHop VM 3.13.
XCode 7.2,7.2.1和7.3的360雲盤連結
XCode 版本更非常快速,每次重新下載XCode的安裝檔案,幾個GB的龐然大物,都要令人痛苦萬分。 網路上有很多XCode6及以前版本的雲盤連結,但是最新的XCode7.2及以上卻幾乎都是指向Apple官網下載 的連結。直連蘋果官網,網速太慢的話連結很容
kiss rpc flatbuffer,capnp版本和grpc效能測試對比
kiss rpc flatbuffer比之前的capnp在效能上快4倍左右,類比grpc快5倍左右。 記憶體資源,cpu資源,網路資源佔用更低。 測試環境 環境:ubuntu 16.04 l
Linux核心2.4和2.6編譯模組的方法
2.6下的模組,副檔名為.ko,而不是2.4下的.o。很多初學者寫完模組之後,會使用2.4的方法來編譯模組。 /*filename: test.c*/#include <linux/init.h>#include <linux/kernel.h>#include <linux/
Redis和Memcache效能測試對比
Redis和Memcache,測試伺服器是一個個人PC:配置一般(2CPU\2G記憶體),作業系統安裝的CentOS。 1、redis memcache都是空的時候 redis設定10000