Ich hab heute mal ein paar Tests durchgeführt - ext3, ext4, jfs, xfs und reiserfs.
Hierbei hat ext4 recht gut abgeschnitten, besser als ext3 allemal. Ich habe sowohl das Schreiben und Löschen einer großen Datei und auch das von "vielen" (1000) kleinen Files getestet.
Hier ist die Auswertung - mit Sicherheit kein richtiger Performancetest, gibt aber einen kleinen Überblick:
ext3
Creating Filesystem: ext3
real 0m1.746s
Creating Testfile...
100000+0 records in
100000+0 records out
819200000 bytes (819 MB) copied, 24.1278 s, 34.0 MB/s
real 0m24.608s
Removing Testfile...
real 0m0.248s
Creating 1000 small files...
real 0m10.317s
Removing them again...
real 0m0.162s
----
ext4
Creating Filesystem: ext4
real 0m1.661s
Creating Testfile...
100000+0 records in
100000+0 records out
819200000 bytes (819 MB) copied, 21.4117 s, 38.3 MB/s
real 0m21.438s
Removing Testfile...
real 0m0.209s
Creating 1000 small files...
real 0m9.675s
Removing them again...
real 0m0.003s
----
jfs
Creating Filesystem: jfs
mkfs.jfs version 1.1.13, 17-Jul-2008
/
Format completed successfully.
1048576 kilobytes total disk space.
real 0m0.196s
Creating Testfile...
100000+0 records in
100000+0 records out
819200000 bytes (819 MB) copied, 22.3262 s, 36.7 MB/s
real 0m22.331s
Removing Testfile...
real 0m0.003s
Creating 1000 small files...
real 0m7.270s
Removing them again...
real 0m0.003s
----
reiserfs
Creating Filesystem: reiserfs
real 0m1.285s
Creating Testfile...
100000+0 records in
100000+0 records out
819200000 bytes (819 MB) copied, 22.7108 s, 36.1 MB/s
real 0m22.837s
Removing Testfile...
real 0m0.426s
Creating 1000 small files...
real 0m13.334s
Removing them again...
real 0m0.032s
xfs
----
Creating Filesystem: xfs
real 0m0.662s
Creating Testfile...
100000+0 records in
100000+0 records out
819200000 bytes (819 MB) copied, 21.6159 s, 37.9 MB/s
real 0m21.723s
Removing Testfile...
real 0m0.226s
Creating 1000 small files...
real 0m8.716s
Removing them again...
real 0m0.003s
Die Files wurden alle durch einen dd aus /dev/zero erzeugt, also kann da der eine oder andere Filesystemvorteil auch noch was gebracht haben. Aber aus /dev/urandom kommt nicht immer was raus 😉 Die Platte ist ne alte IDE Platte gewesen, allzuviel Platz hatte ich auch nicht. Sollte eher nochmal mit 100000 Files und nem 100GB großen File oder sowas wiederholt werden.
Zudem habe ich es auf einem lvm2 getestet - werde es morgen evtl. dann nochmal auf einer richtigen Partiton testen.
/usr und /var hab ich auf jeden Fall schonmal von xfs auf ext4 umgewandelt (mittels tar). Da es eben eine alte Platte ist, hätte ich da schon gerne DEN Vorteil von ext4, nämlich die Schreibkonsitenzprüfung.
Morgen wandele ich auf jeden Fall /home auch auf ext4 um - hab ja nen Backup 🙂
Anlegen des Testfiles (819MB) geschah mittels
time dd if=/dev/zero of=/test/testfile bs=8192 count=100000
Die kleinen Files hab ich mit einer while-Schleife mit folgender Funktion angelegt (alles quick&dirty)
function small_files() {
i=0
echo Creating 1000 small files...
time while [ $i -le 1000 ]
do
dd if=/dev/zero of=/test/file_$1 bs=1 count=1023 2>/dev/null
i=$(( i + 1))
done
sync
echo Removing them again...
time rm /test/file*
sync
}
Insgesamt wurden viele syncs verwendet, um den Plattencache möglichst leer zu halten.
Vielleicht hat ja jemand noch bessere und aussagekräftigere Tests auf Lager?