FreeBSD and poor ata performance

fandino fandino at ng.fadesa.es
Fri Oct 15 02:21:52 PDT 2004


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

_______________________________________________
freebsd-questions at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list