(S)ATA performance in FBSD 6.2/7.0

Alexander Leidinger Alexander at Leidinger.net
Fri Mar 2 12:03:55 UTC 2007


Quoting Cheffo <cheffo at FreeBSD-BG.org> (from Fri, 02 Mar 2007 13:38:45 +0200):

> Hi,
>
>
> Ted Mittelstaedt wrote:
>> ----- Original Message ----- From: "O. Hartmann"   
>> <ohartman at zedat.fu-berlin.de>
>> To: <freebsd-performance at freebsd.org>; <freebsd-questions at freebsd.org>
>> Sent: Friday, March 02, 2007 1:38 AM
>> Subject: (S)ATA performance in FBSD 6.2/7.0
>>> The last days I tried to figure out why some of my lab's FreeBSD   
>>> boxes and also mine at home seem to be outperformed by some Linux   
>>> setups around here and I saw something interesting.
>>>
>>
>> blah blah blah deleted
>>
>>> Before digging into this problem deeper with benchmarks, could   
>>> anyone explain why FreeBSD reaches this 33 MB/s limit (sounds like  
>>>  UDMA 33
>>
>> man mount
>>
>> read section on "async"
>>
>> linux by default mounts async
>>
>> freebsd by default mounts sync
>>
>> you can change FBSD to async
>>
>> then watch your fs scramble during a power failure
>>
>> no big deal, it's only your data.
>>
>> Ted
>
> If SYNC is default how can you explain this:
>
> [12:58]root at hater:~# mount
> /dev/ad4s3a on / (ufs, local, synchronous)
> devfs on /dev (devfs, local)
> /dev/ad4s3d on /tmp (ufs, local, soft-updates)
> /dev/ad4s3f on /usr (ufs, local, soft-updates)
> /dev/ad4s3e on /var (ufs, local, soft-updates)
[...]
> So I'm pretty sure that for type ufs async is default.

Both of you are wrong. By default "noasync" is used. This is different  
from sync and async. Feel free to look up the difference.

> Also I do not see why sync should report different speeds for copy and
> benchmark tools if they do the same thing?

Because cp may behave differently than the tools used to benchmark. A  
dd may be more portable in this case.

> Just to be sure I added to my /tmp entry async in /etc/fstab:
> /dev/ad4s3d             /tmp            ufs     rw,async     2       2
>
> umounted and mounted again and still have:
> /dev/ad4s3d on /tmp (ufs, local, soft-updates)

IIRC when SU is used, async is not used even if specified. But I' not  
sure about this.


Asides from the linux async-by-default there's maybe also the  
write-cache-off penalty in FreeBSD. But I'm not sure it is off by  
default. I disable the WC myself in loader.conf everywhere to be on  
the safe side and I don't feel like experimenting ATM (I'm ill in bed).

If the same conditions are tested in FreeBSD and linux (which is not  
easy, as we don't share a common FS implementation, even when we  
support the same FS type) and the sync/async and WC related stuff can  
be ruled out, it may be a problem in the (S)ATA code and it would be  
nice if we would know about this. So please dig deeper into this (it  
can also be a problem with our cp or GEOM or whatever).

Bye,
Alexander.

-- 
  "I heard one time you single-handedly defeated a hoard of rampaging of
somethings in the something something system." -Fry

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137


More information about the freebsd-questions mailing list