Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Oct 2004 10:57:10 +0200
From:      fandino <fandino@ng.fadesa.es>
To:        freebsd-questions@freebsd.org
Subject:   Re: FreeBSD and poor ata performance
Message-ID:  <416F90E6.10108@ng.fadesa.es>
In-Reply-To: <416F849F.8020508@solid-state-logic.com>
References:  <416EB6B1.6060405@ng.fadesa.es> <416F849F.8020508@solid-state-logic.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I'm out of ideas, It doesn't matter if I use other PC or hard disks, 
performance
sucks compared to Linux :-(

Any advice or idea about the possible cause?
I can't believe this difference of throughput with ata disks.Hello Martin,

>> for linux it took about 23 seconds write the file and 18 read it.
>>
>> # time dd if=/dev/zero of=aa bs=1024k count=1024
>> 1024+0 records in
>> 1024+0 records out
>>
>> real    0m23.408s
>> user    0m0.000s
>> sys    0m4.470s
>>
>> # time dd if=aa of=/dev/null bs=1024k
>> 1024+0 records in
>> 1024+0 records out
>>
>> real    0m18.311s
>> user    0m0.000s
>> sys    0m5.850s
>>
>> and for FreeBSD it took 40 seconds write the file and 42 read it:
>>
>> # dd if=/dev/zero of=aa bs=1024k count=1024
>> 1024+0 records in
>> 1024+0 records out
>> 1073741824 bytes transferred in 40.143630 secs (26747502 bytes/sec)
>>
>> # dd if=aa of=/dev/null bs=1024k
>> 1024+0 records in
>> 1024+0 records out
>> 1073741824 bytes transferred in 42.711242 secs (25139560 bytes/sec)
>>
>> so as you can see linux was two times faster that FreeBSD :-?
>> I would like to know if anyone knows  if this is normal or
>> is a bug?
>
> On linux which filesystem - ext2/ext3/....also which kernal/distro

vanilla slackware 8.1 with an old 2.4.18 kernel and ext2 filesystem

> For FreeBSD I presume this was UFS2 rather the UFS, in either case did 
> you enable softupdates?
>
> A better 'test' is the bonnie++ utility where you can throw different 
> file sizes etc at the disks, so see what happens with multiple files 
> etc. This gives a more real world view, rather a single file write.

I don't think so. I suspect a low level problem.

This time I did the test using raw devices instead of block devices, 
this way
filesystem, buffer-cache, softupdates are not present at all. The 
results were
as bad as predicted.

# dd if=/dev/zero of=/dev/ad4 bs=1024k count=1024
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 38.184851 secs (28119576 bytes/sec)

# dd if=/dev/ad4 of=/dev/null bs=1024k count=1024
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 31.090536 secs (34535970 bytes/sec)

As a curiosity transfers between disk are slower :-?

# dd if=/dev/ad4 of=/dev/ad6 bs=1024k count=1024
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 69.606197 secs (15425952 bytes/sec)

I'm out of ideas, It doesn't matter if I use other PC or hard disks, 
performance
sucks compared to Linux :-(

Any advice or idea about the possible cause?
I can't believe this difference of throughput with ata disks.

# atacontrol list
ATA channel 0:
    Master:  ad0 <ST340823A/3.32> ATA/ATAPI revision 4
    Slave:  acd0 <HL-DT-ST DVDRAM GSA-4081B/A100> ATA/ATAPI revision 5
ATA channel 1:
    Master:  ad2 <ST340810A/5.33> ATA/ATAPI revision 6
    Slave:  acd1 <TOSHIBA DVD-ROM SD-M1612/1004> ATA/ATAPI revision 5
ATA channel 2:
    Master:  ad4 <ST340014A/3.54> ATA/ATAPI revision 6
    Slave:       no device present
ATA channel 3:
    Master:  ad6 <ST340014A/3.06> ATA/ATAPI revision 6
    Slave:       no device present

# atacontrol mode 2
Master = UDMA100
Slave  = BIOSPIO
# atacontrol mode 3
Master = UDMA100
Slave  = BIOSPIO

dmesg:
http://lists.freebsd.org/pipermail/freebsd-geom/2004-October/000350.html



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?416F90E6.10108>