On 02/12/18 on 13:08, info at smallinnovations dot nl wrote: > > If you disable journalling on ext4 you can just as well mount it with > ext2 afaik. > > Grtz > > Nick >
No, ext2 is significantly slower than a journal-less ext4 filesystem. This must be due mainly to the fact that ext4 uses an improved block-allocator algorithm, one that merges the allocation of a series of blocks to the same file in one run instead of $FILE_SIZE/$BLOCK_SIZE runs. I recently run a comparison test on an old 1GB USB pendrive connected to a USB-2 port, here you are with the log: [alessandro@wkstn02 ~]$ cat bin/bomb_filesystem.sh #!/bin/dash TESTROOT=/mnt/loop MAXDIRS=100 MAXFILES=10 if mountpoint --quiet "$TESTROOT" then I=0 while test "$I" -lt "$MAXDIRS" do mkdir "$TESTROOT/Dir_$I" || break I=$((I+1)) done I=0 while test $I -lt "$MAXDIRS" do J=0 while test $J -lt "$MAXFILES" do dd count=$((1024+16*J)) if=/dev/zero of="$TESTROOT/Dir_$I/file_$J" J=$((J+1)) done I=$((I+1)) done else echo "ERROR: \"$TESTROOT\" does not exist or is not a mountpoint" >&2 exit 1 fi [root@wkstn02 ~]# mkfs.ext2 /dev/sdb [root@wkstn02 ~]# mount /dev/sdb /mnt/loop [root@wkstn02 ~]# chown alessandro /mnt/loop [alessandro@wkstn02 ~]$ time (bomb_filesystem.sh ; sync) real 10m35,149s user 0m1,042s sys 0m1,921s [alessandro@wkstn02 ~]$ df /mnt/loop File system Size Used Avail Use% Mounted on /dev/sdb 953M 541M 364M 60% /mnt/loop [alessandro@wkstn02 ~]$ time (\rm -r /mnt/loop/Dir_* ; sync) real 0m2,133s user 0m0,009s sys 0m0,076s [alessandro@wkstn02 ~]$ time (bomb_filesystem.sh ; sync) real 11m10,261s user 0m0,961s sys 0m2,109s [root@wkstn02 ~]# umount /dev/sdb [root@wkstn02 ~]# mkfs.ext4 -O ^has_journal /dev/sdb [root@wkstn02 ~]# mount /dev/sdb /mnt/loop [root@wkstn02 ~]# chown alessandro /mnt/loop [alessandro@wkstn02 ~]$ time (bomb_filesystem.sh ; sync) real 3m39,434s user 0m1,024s sys 0m1,950s [alessandro@wkstn02 ~]$ time (\rm -r /mnt/loop/Dir_* ; sync) real 0m2,486s user 0m0,002s sys 0m0,082s -- Alessandro Selli <alessandrose...@linux.com> VOIP SIP: dhatarat...@ekiga.net Chiave firma e cifratura PGP/GPG signing and encoding key: BA651E4050DDFC31E17384BABCE7BD1A1B0DF2AE
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng