日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > linux >内容正文

linux

Linux文件系统选择

發(fā)布時(shí)間:2025/3/15 linux 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Linux文件系统选择 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

自己想做的,劉愛貴在2010年就做完了(⊙ω⊙)

http://blog.csdn.net/liuaigui/article/details/5521024

通過綜合使用多種標(biāo)準(zhǔn)文件系統(tǒng)Benchmarks對(duì)Ext3, Ext4, Reiserfs, XFS, JFS, Reiser4的性能測試對(duì)比,對(duì)不同應(yīng)用選擇合適的文件系統(tǒng)給出以下方案,供大家參考。文件系統(tǒng)性能測試數(shù)據(jù)見附表。 1、大量小文件(LOSF, Lost of small files)I/O應(yīng)用(如小圖片) Reiserfs(首選), Ext4文件系統(tǒng)適合這類負(fù)載特征,IO調(diào)度算法選擇deadline,block size = 4096, ext4關(guān)閉日志功能。 reiserfs mount參數(shù):-o defaults, async, noatime, nodiratime, notail, data=writeback ext4 mount參數(shù):-o defaults, async, noatime, nodiratime, data=writeback, barrier=0 關(guān)閉ext4日志:tune2fs -O^has_journal /dev/sdXX 2、大文件I/O應(yīng)用(如視頻下載、流媒體) EXT4文件系統(tǒng)適合此類負(fù)載特征,IO調(diào)度算法選擇anticipatory, block size = 4096, 關(guān)閉日志功能,啟用extent(default)。 mount參數(shù):-o defaults, async, noatime, nodiratime, data=writeback, barrier=0 關(guān)閉ext4日志:tune2fs -O^has_journal /dev/sdXX 3、SSD文件系統(tǒng)選擇 EXT4/Reiserfs可以作為SSD文件系統(tǒng),但未對(duì)SSD做優(yōu)化,不能充分發(fā)揮SSD性能,并影響SSD使用時(shí)間。 Btrfs對(duì)SSD作了優(yōu)化,mount通過參數(shù)啟用。但Btrfs仍處于實(shí)驗(yàn)階段,生產(chǎn)環(huán)境謹(jǐn)慎使用。 JFFS2/Nilfs2/YAFFS是常用的flash file system,在嵌入式環(huán)境廣泛應(yīng)用,建議使用。性能目前還未作測試評(píng)估。 簡單分析一下選擇Reiserfs和ext4文件系統(tǒng)的原因: 1、Reiserfs 大量小文件訪問,衡量指標(biāo)是IOPS,文件系統(tǒng)性能瓶頸在于文件元數(shù)據(jù)操作、目錄操作、數(shù)據(jù)尋址。reiserfs對(duì)小文件作了優(yōu)化,并使用B+ tree組織數(shù)據(jù),加速了數(shù)據(jù)尋址,大大降低了open/create/delete/close等系統(tǒng)調(diào)用開銷。mount時(shí)指定noatime, nodiratime, notail,減少不必要的inode操作,notail關(guān)閉tail package功能,以空間換取更高性能。因此,對(duì)于隨機(jī)的小I/O讀寫,reiserfs是很好的選擇。 2、Ext4 大文件順序訪問,衡量指標(biāo)是IO吞吐量,文件系統(tǒng)性能瓶頸在于數(shù)據(jù)塊布局(layout)、數(shù)據(jù)尋址。Ext4對(duì)ext3主要作了兩方面的優(yōu)化: 一是inode預(yù)分配。這使得inode具有很好的局部性特征,同一目錄文件inode盡量放在一起,加速了目錄尋址與操作性能。因此在小文件應(yīng)用方面也具有很好的性能表現(xiàn)。 二是extent/delay/multi的數(shù)據(jù)塊分配策略。這些策略使得大文件的數(shù)據(jù)塊保持連續(xù)存儲(chǔ)在磁盤上,數(shù)據(jù)尋址次數(shù)大大減少,顯著提高I/O吞吐量。 因此,對(duì)于順序大I/O讀寫,EXT4是很好的選擇。另外,XFS性能在大文件方面也相當(dāng)不錯(cuò)。 附表:文件系統(tǒng)性能測試數(shù)據(jù)
Testing Host:???????
CPUGenuine Intel(R) 2.13GHz 4 cores???????
MEM4GB???????
DISKSAS 146.8GB * 4???????
?/dev/sdbExt3disable journaldefaults,async,noatime,nodiratime??
?/dev/sdcExt4disable journaldefaults,async,noatime,nodiratime,data=writeback,barrier=0
?/dev/sddXFShas_journaldefaults,async,noatime,nodiratime,barrier=0?
?/dev/sdeReiser4has_journaldefaults,async,noatime,nodiratime??
?/dev/sdereiserfshas_journaldefaults,async,noatime,nodiratime,notail,data=writeback
?/dev/sdeJFShas_journaldefaults,async,noatime,nodiratime??
?/dev/sdebtrfshas_journaldefaults.async.noatime,nodiratime,data=writeback?
?????????
NO.Test PointsExt3Ext4ReiserfsXFSJFSReiser4Btrfs
1filesystem creation s37.38122.3333.7441.7861.8582.758?
2filesystem mounting s0.0240.0390.2990.0790.0683.524?
3filesystem unmounting s0.0110.020.0740.0250.0480.037?
4copy a large file (4GB) s35.48637.22730.60543.54730.3242.17?
5recopy the large file s56.91957.52659.89359.31555.65457.925?
6remove the large file s3.1260.2952.1780.0160.0184.137?
7copy linux kernel archive.tar s0.1030.1430.5740.0940.5520.564?
8extract files from kernel.tar s42.6784439.68157.37470.99347.538?
9create kernel.tar from linux source s32.73339.14539.30539.16737.9243.828?
10compile linux kernel s561.834566.474557.429571.3551773.143828.028?
11copy kernel file tree s190.701197.191194.864217.355255.777185.406?
12recopy kernel file tree s66.272170.643100.67143.517194.89879.247?
13remove kernel file tree s13.7193.7833.66150.07292.06833.2?
14list all files for kernel source(tree) s15.96115.53920.71715.81829.13915.611?
15file search in kernel source (find) s0.1190.90.3312.5150.7915.913?
16create 1 million files s1000.969986.712940.2011128.2441111.5092462.65?
17recopy the 1 million files s4783.069595.82859.252972.6711005.0571734.48?
18remove the 1 million files s3257.384396.3274.917735.0482395.4171165.314?
19dd read IOPS (bs=1KB,4GB) s26.79527.25726.03626.15825.94826.485?
20dd write IOPS (bs=1KB,4GB) s27.00626.46132.57726.16429.203126.906?
21dd read BW (bs=1MB,4GB) s26.78423.55225.99926.23328.63526.541?
22dd write BW (bs=1MB,4GB) s29.42926.12330.6424.68331.44631.925?
?????????
?Postmark (postmark.conf)???????
23transaction /s333384384113166416?
24read MB/s27.9820.4224.379.6910.6430.22?
25write MB/s87.3263.7276.0630.2333.2194.31?
?????????
?Randomio (randomio bigfile 10 .25 .01 2048 60 1)(X表示Randomio不支持該文件系統(tǒng))???
26create 4GB file MB/s16716616416815651.3?
27random io/s372.1382.3378.8521.5382.7X?
28random read latency ms26.926.226.613.226.3X?
29random write latency ms26.52625.937.125.6X?
30random read latency std dev ms17.916.716.613.116.3X?
31random write latency std dev ms15.814.914.538.814.3X?
?????????
?Bonnie++ (-d /cacheX -s 7920 -x 1 -u root)(+++++表示未獲得準(zhǔn)確測試結(jié)果)???
32read KB/s155161150029160919159242155811144079?
33write KB/s155150150635142801159393139770107923?
34seek /s812.9816.7816806.4730.7775.9?
35sequential create /s7374(+++++)29088710136610031?
36sequential delete /s(+++++)(+++++)251606354703123?
37random create /s7558(+++++)281787455095015?
38random delete /s25292(+++++)247235592873365?
?????????
?IOZone (-Razc -s 8192m -y 4k|1m -q 4k|1m -i 0 -i 1 -i 2 -b iozone.xls)????
39sequential read with 4KB KB/s???????
40sequential write with 4KB KB/s?(測試用時(shí)太長,暫未完成)??
41random read with 4KB KB/s???????
42random write with 4KB KB/s???????
43sequential read with 1MB KB/s156790153432160142159591161785143197?
44sequential write with 1MB KB/s155928156378131246162226143348138672?
45random read with 1MB KB/s1010049806010284010122510110095864?
46random write with 1MB KB/s1105371022459792410714011973397941?
?????????
?FileBench (load)???????
47randomread???????
48randomwrite???????
49varmail????????????
49iops /s1292.331921.6581276.035710.653692.282772.895?
?BW MB/s4.26.34.32.42.32.6?
?webproxy???????????
50iops /s14868.18916379.94214984.046156.1592830.0368705.437?
51BW MB/s55.560.85625.112.334.7?
?videoserver???????????
?iops /s395.147392.849391.85391.65391.74391.048?
?BW MB/s97.5227.996.7227.696.796.5?

轉(zhuǎn)載于:https://www.cnblogs.com/tcicy/p/8458359.html

總結(jié)

以上是生活随笔為你收集整理的Linux文件系统选择的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。