Subject: install/31297: mounting volumes with -o async speeds up file write operations 500% (5 times)
To: None <install-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <plp@actcom.co.il>
List: netbsd-bugs
Date: 09/11/2005 23:30:00
>Number:         31297
>Category:       install
>Synopsis:       mounting volumes with -o async speeds up file write operations 500% (5 times)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 11 23:30:00 +0000 2005
>Originator:     Peter
>Release:        netbsd-1.6.1
>Organization:
n/a
>Environment:
INSTALL kernel (default 1.6.1 install disk), and all other known kernels
compiled under 1.6.1 i386. Hardware is 450MHz P3, disks are UDMA2 (cdrom 
and hdds). 
>Description:
I noticed that using the mount option -o async for IDE/UDMA disks during
installation and all other large file unpacking operations (many files,
tar -x uncompressed archives, data size ~0.6G, UDMA2 disks), the time
required to unpack decreased 5-fold. In my case from 30 minutes to 6.

Using any other mount options did not bring such improvements (including
not softdep).

I think that all install disks should mount -o async since a crash during install would mean reinstalling anyway. This would mean using
-o async in all mounts done by sysinst.

The speedup does not depend on the machine, it was repeated with completely different hardware, with the exact same results. With -o
async at least 50% of the hardware speed is reached. Without it, it is
much slower. Testing was done with an uncompressed tar archive that
contained many relatively small files, such as a backup of a plain NetBSD installation.

Filesystem was ffs, default options set by sysinst)

>How-To-Repeat:
Generate a tar file containing ~1000 files of size ~10k and untar it
first on a volume mounted -o whatever and then -o async. Compare the runtimes. The actual testing was done with tar files >200MB.
>Fix:
I think that sysinst should mount media -o async and that it should be reommended to use -o async when restoring backups or installing large files etc.