I have measured write/remove time with the USB flash drive;

  uhub4 at uhub0 port 5 "NEC product 0x005a" rev 2.00/1.00 addr 2
  umass0 at uhub4 port 1 configuration 1 interface 0 "TOSHIBA TransMemory" rev 
2.00/1.10 addr 3
  umass0: using SCSI over Bulk-Only
  scsibus2 at umass0: 2 targets, initiator 0
  sd0 at scsibus2 targ 1 lun 0: <TOSHIBA, TransMemory, PMAP> SCSI0 0/direct 
removable
  sd0: 961MB, 512 bytes/sec, 1968128 sec total


First, I copied file tree (about 100MB) from mfs to such USB flash drive, then 
umount.
Next, mount it again, then remove all files and directories.
(test script at the end of this mail)

Here's the data;

                     write files                  remove files
-------------------  ---------------------------  -------------------------
mount option         real       user    system    real      user    system
-------------------  ---------  ------- --------  --------- ------- -------
none                 24m18.37s  0m1.15s 0m16.58s  14m54.99s 0m0.26s 0m5.70s
noatime              23m56.60s  0m1.03s 0m16.95s  14m32.22s 0m0.42s 0m5.59s
async                07m28.74s  0m0.79s 0m14.29s  00m06.91s 0m0.24s 0m1.90s
async,noatime        07m29.09s  0m0.87s 0m14.97s  00m07.02s 0m0.19s 0m2.06s
softdep              09m55.40s  0m0.73s 0m15.59s  04m23.48s 0m0.24s 0m2.17s
softdep,noatime      09m54.15s  0m0.90s 0m15.05s  04m27.81s 0m0.21s 0m1.99s


result:  write time:  none >> softdep > async
        remove time:  none >> softdep >> async

Both softdep and async options seem to affect write/remove times.
And especially, async option very affects remove time.


----[test script]-------------------------------------------
#!/bin/sh

for opt in none noatime async noatime,async softdep softdep,async
do
    if [ X$opt = Xnone ]
    then
        opt=""
    else
        opt="-o $opt"
    fi

    echo ==== opt: $opt ====

    if mount $opt /dev/sd0d /mnt
    then
        cd /mfs/ && time pax -rwpe . /mnt/tmp/.
        umount /mnt
        sleep 60
    fi

    if mount $opt /dev/sd0d /mnt
    then
        cd /mnt/tmp && time rm -rf *
        cd
        umount /mnt
        sleep 60
    fi
done
------------------------------------------------------------

Reply via email to