Dienstag, 30. März 2010
Hallo Sysadmins,
Defragmentieren, Reorganisieren … OK: nennen wir es Optimieren.
All das geht bei VxFS natürlich online!
So um das Jahr 2000 habe ich mal für einen Automobilzulieferer zwei damals schon veraltete SUN Ultra 1 als Web Proxy Server mit squid aufgesetzt. Die hatten leider kein Kleingeld für ein VxFS übrig und UFS machte zwei Probleme: Durch die hohe Anzahl an kleinen Files musste das UFS mit einer höheren Anzahl von Inodes angelegt werden. Sonst waren die Inodes schon voll, aber eigentlich wäre noch Platz für Daten da. Tja und nach jeweils ca. 4 Wochen war das UFS Filesystem so defragmentiert, das ein “newfs” fällig war. Beides wäre damals schon mit VxFS vermeidbar gewesen.
Es gibt zwei Arten der Optimierung:
fsadm -F vxfs -D <mountpoint>
zeigt einen “Directory Fragmentation Report” an:
hugo.global:/# fsadm -F vxfs -D /hirschhome
Directory Fragmentation Report
Dirs Total Immed Immeds Dirs to Blocks to
Searched Blocks Dirs to Add Reduce Reduce
total 9515 6622 5412 230 276 619
fsadm -F vxfs -d <mountpoint>
führt dann die Optimierung durch:
hugo.global:/# fsadm -F vxfs -d /hirschhome
hugo.global:/# fsadm -F vxfs -D /hirschhome
Directory Fragmentation Report
Dirs Total Immed Immeds Dirs to Blocks to
Searched Blocks Dirs to Add Reduce Reduce
total 9515 6204 5421 221 226 227
fsadm -F vxfs -E <mountpoint>
zeigt wieder einen Report an:
hugo.global:/# fsadm -F vxfs -E /hirschhome
Extent Fragmentation Report
Total Average Average Total
Files File Blks # Extents Free Blks
99773 164 1 56827427
blocks used for indirects: 1312
% Free blocks in extents smaller than 64 blks: 0.18
% Free blocks in extents smaller than 8 blks: 0.05
% blks allocated to extents 64 blks or larger: 97.00
Free Extents By Size
1: 3933 2: 4241 4: 4235
8: 2101 16: 1567 32: 1033
64: 577 128: 485 256: 386
512: 291 1024: 215 2048: 822
4096: 273 8192: 153 16384: 82
32768: 31 65536: 23 131072: 22
262144: 9 524288: 2 1048576: 2
2097152: 1 4194304: 1 8388608: 0
16777216: 0 33554432: 1 67108864: 0
134217728: 0 268435456: 0 536870912: 0
1073741824: 0 2147483648: 0
fsadm -F vxfs -e <mountpoint>
führt die Optimierung durch:
Keine Panik, das kann eine Weile dauern, weil zum Teil mehrere Durchläufe stattfinden (kann man mit -p <passes> ändern, default ist 5; mit -s wird am Ende jeden Durchlaufs eine Zusammenfassung angezeigt).
hugo.global:/# fsadm -F vxfs -e /hirschhome
hugo.global:/# fsadm -F vxfs -E /hirschhome
Extent Fragmentation Report
Total Average Average Total
Files File Blks # Extents Free Blks
99798 165 1 56609775
blocks used for indirects: 1120
% Free blocks in extents smaller than 64 blks: 0.06
% Free blocks in extents smaller than 8 blks: 0.01
% blks allocated to extents 64 blks or larger: 97.21
Free Extents By Size
1: 529 2: 395 4: 422
8: 604 16: 589 32: 572
64: 656 128: 600 256: 559
512: 413 1024: 270 2048: 462
4096: 300 8192: 215 16384: 127
32768: 26 65536: 21 131072: 13
262144: 7 524288: 2 1048576: 1
2097152: 2 4194304: 1 8388608: 0
16777216: 0 33554432: 1 67108864: 0
134217728: 0 268435456: 0 536870912: 0
1073741824: 0 2147483648: 0
Empfohlen wird die Optimierung vor allem für Datenbank Files. Ein guter Zeitpunkt soll vor dem Backup sein. Dabei soll eine verifizierbare Performance Steigerung zu Tage treten. Mir fehlt leider im Augenblick eine adäquate Testumgebung um hier Daten liefern zu können ….
Eine weitere Anwendung der Optimierung ist natürlich vor dem Verkleinern eines Veritas Filesystems.
Viele Grüße
Michael