Zmeny v GEOM / UFS - opozdeny zapis
Miroslav Lachman
000.fbsd at quip.cz
Fri Dec 14 13:15:42 CET 2012
Nesledujete nekdo podrobneji zmeny v kodu, nebo aspon chovani GEOM / UFS?
Zkousel jsem ted na novem stroji 9.1-RC3. Zkousel jsem ruzna nastaveni
filesystemu / rozdeleni disku a testoval rychlost zapisu - rozbaleni
ports.tgz
K memu prekvapeni dochazi k tomu, ze `tar xf ports.tgz` dobehne a jeste
dalsi dve minuty probihaji zapisy na disk.
Vim, ze normalne takhle probihaji Soft Updates, ale tam byval myslim
limit do 30 sekund a tak se to chova na 8.3. Rozbalim ports.tgz na 8.3 a
zhruba do 20 sekund jeste probehnou nejake zapisy na disky a vic nic.
Na obou testovanych strojich je pouzity gmirror a UFS2 + SU - bez journalu.
Co vim, ze se rozhodne zmenilo, je vychozi velikost fragmentu ze 2k na
4k a k tomu i velikost bloku z 16k na 32k. To by ale nemelo mit na tohle
vliv.
Aby toho nebylo malo, tak na starem stroji s 8.3 a disky Samsung F1 1TB
to rozbaleni ports.tgz trva mene nez minutu, cca 0:55.
Na novem Cisco UCS C200 se SATA III radicem a disky Seagate
Constellation ES 1TB to trva dvojnasobek casu, cca 1:52
Oboje disky pouzivaji 512B, takze to ani neni problem se 4k sektory a
nezarovnanymi partitions.
S tim jsem se potykal u jinych disku, kde pri nezarovnanych partitions a
2k fragmentech namisto 4k fragmentu trva rozbaleni ports.tgz az 7 minut!
Jeste teda dalsi zmena 9.1 oproti 8.3 je ta, ze se pouziva AHCI a disky
jsou jako ada0 a ada1. To uz jsem drive cetl, ze nekdo ma s touhle
"novinkou" pomalejsi praci disku, nez se starsim rezimem.
Pro ilustraci jeste jak vypada ten opozdeny zapis na 9.1-RC3 z pohledu
iostat (co zaznam, to 10 sekund)
root na ksdtm-s2 ~/# iostat -x -w 10 ada0 ada1
...
...
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 1193.6 0.0 7146.1 2545 1711.7 93
ada1 0.4 1196.5 1.6 7129.3 2596 1806.6 98
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 1180.9 0.0 7850.4 2851 1790.3 99
ada1 0.6 1168.5 2.4 7832.8 3026 1769.6 93
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 1210.1 0.0 7616.8 2124 1665.4 98
ada1 0.5 1210.2 2.0 7610.4 2298 1803.1 98
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 1076.2 0.0 5654.2 2167 1799.6 98
ada1 0.5 1072.1 10.4 5634.6 2382 1872.7 99
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 1338.6 0.0 7700.0 707 1985.2 100
ada1 0.0 1304.8 0.0 7536.0 1260 2264.7 100
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.9 1514.6 3.6 8796.3 2589 951.3 91
ada1 0.0 1563.7 0.0 9037.1 2651 1104.9 97
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.7 1186.7 2.8 5936.4 2605 1838.4 98
ada1 0.0 1191.0 0.0 5943.2 2624 1841.2 96 <-- konec
rozbaleni tar
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 656.6 0.0 5893.4 0 1382.8 39
ada1 0.0 658.5 0.0 5910.2 0 1390.0 41
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 165.3 0.0 676.3 0 217.2 11
ada1 0.0 165.3 0.0 676.3 0 194.4 10
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 653.8 0.0 2870.1 1215 891.1 46
ada1 0.0 653.1 0.0 2867.3 1222 869.4 46
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 176.6 0.0 2148.2 0 2242.7 17
ada1 0.0 177.3 0.0 2151.0 0 2275.2 17
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 524.9 0.0 2106.2 0 346.9 22
ada1 0.0 524.9 0.0 2106.2 0 346.3 21
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 107.6 0.0 1073.0 0 126.0 8
ada1 0.0 107.6 0.0 1073.0 0 144.2 8
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 126.9 0.0 511.9 0 113.6 9
ada1 0.0 126.9 0.0 511.9 0 114.9 8
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 35.8 0.0 142.9 0 69.3 2
ada1 0.0 35.8 0.0 142.9 0 67.1 2
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 44.8 0.0 189.7 0 101.1 3
ada1 0.0 44.8 0.0 189.7 0 102.1 3
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 0.2 0.0 0.4 0 0.2 0
ada1 0.0 0.2 0.0 0.4 0 0.3 0
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 168.9 0.0 679.2 6 138.2 10
ada1 0.0 168.9 0.0 679.2 6 140.9 10
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 17.7 0.0 70.1 0 49.5 2
ada1 0.0 17.7 0.0 70.1 0 50.6 2
extended device statistics
device r/s w/s kr/s kw/s qlen svc_t %b
ada0 0.0 0.1 0.0 0.0 0 0.2 0
ada1 0.0 0.1 0.0 0.0 0 0.5 0
A jeste dodavam, ze nic jineho na ty disky nesaha, protoze system bezi z
USB flashdisku a na tomhle mirroru nejsou zadna data, oddil byl pred
rozbalenim ports.tgz cerstve naformatovan.
root na ksdtm-s2 ~/# dumpfs -m /dev/mirror/gm0s1e
# newfs command for /dev/mirror/gm0s1e (/dev/mirror/gm0s1e)
newfs -L test -O 2 -U -a 4 -b 32768 -d 32768 -e 4096 -f 4096 -g 16384 -h
64 -m 8 -o time -s 20971520 /dev/mirror/gm0s1e
root na ksdtm-s2 ~/# tunefs -p /mnt/
tunefs: POSIX.1e ACLs: (-a) disabled
tunefs: NFSv4 ACLs: (-N) disabled
tunefs: MAC multilabel: (-l) disabled
tunefs: soft updates: (-n) enabled
tunefs: soft update journaling: (-j) disabled
tunefs: gjournal: (-J) disabled
tunefs: trim: (-t) disabled
tunefs: maximum blocks per file in a cylinder group: (-e) 4096
tunefs: average file size: (-f) 16384
tunefs: average number of files in a directory: (-s) 64
tunefs: minimum percentage of free space: (-m) 8%
tunefs: optimization preference: (-o) time
tunefs: volume label: (-L) test
Mirek
More information about the Users-l
mailing list