Bug 28339

Summary: Slow Disk performance on 4.3 (about half that on 4.2)
Product: Base System Reporter: Matthew Williams <matthew>
Component: miscAssignee: Peter Pentchev <roam>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Matthew Williams 2001-06-22 16:40:01 UTC
We use dd to install Windows onto a partition. Under 4.3 the performance has reduced dramatically.
I have experimented with a binary only install in 4.2 and 4.3 creating a file from
/dev/zero and dd-ing it on to a unmounted raw partition.
Under 4.2 I get an average throughput of about 6MB/sec but under 4.3 this
drops to 3.5MB/sec.

Hardware from dmesg:
pcib0: <Intel 82443BX (440 BX) host to PCI bridge> on motherboard
...
ata: at 0x1f0 irq 14 on atapci0
...
...
ad0: 8223MB <ST38410A> [16708/16/63] at ata0-master UDMA33
acd0: CDROM <CREATIVE CD5233E> at ata1-master using PIO4

How-To-Repeat: Create a bin only istallation leaving a spare partition (rad0s1f - in my case) say 100M. Create
a file from /dev/zero (dd count=102400 if=/dev/zero of=/usr/tmp/zero.fil).
Now get iostat running on another console and do the following:
dd bs=256b if=./zeros.fil of=/dev/rad0s1f
A number of runs should get you a good average, the output from dd and iostat should
be the same.
Comment 1 Peter Pentchev 2001-06-22 17:08:50 UTC
On Fri, Jun 22, 2001 at 08:38:12AM -0700, Matthew Williams wrote:
> 
> >Number:         28339
> >Category:       misc
> >Synopsis:       Slow Disk performance on 4.3 (about half that on 4.2)
> >Originator:     Matthew Williams
> >Release:        4.3
> >Organization:
> University of Wales, Bangor. UK.
> >Environment:
> FreeBSD HOSTNAME.sees.bangor.ac.uk 4.3-REALEASE FreeBSD 4.3-RELEASE #2:
> Thu Jun 21 14:45:51 BST  root@HOSTNAME.sees.bangor.ac.uk:/usr/src/sys/compile/P500
>  i386
> >Description:
> We use dd to install Windows onto a partition. Under 4.3 the performance has reduced dramatically.
> I have experimented with a binary only install in 4.2 and 4.3 creating a file from
> /dev/zero and dd-ing it on to a unmounted raw partition.
> Under 4.2 I get an average throughput of about 6MB/sec but under 4.3 this
> drops to 3.5MB/sec.

4.3 has IDE write caching off by default.  To enable it, add this line:

hw.ata.wc="1"

to the /boot/loader.conf file, and reboot.

G'luck,
Peter

-- 
"yields falsehood, when appended to its quotation." yields falsehood, when appended to its quotation.
Comment 2 Peter Pentchev freebsd_committer freebsd_triage 2001-06-23 12:02:39 UTC
State Changed
From-To: open->feedback

Does setting the hw.ata.wc tunable, as suggested in my previous mail, 
work for you? 


Comment 3 Peter Pentchev freebsd_committer freebsd_triage 2001-06-23 12:02:39 UTC
Responsible Changed
From-To: freebsd-bugs->roam

I'll keep track of the reply.
Comment 4 Peter Pentchev freebsd_committer freebsd_triage 2002-04-09 08:31:39 UTC
State Changed
From-To: feedback->closed

Feedback timeout (> 10 months)