From owner-freebsd-performance@FreeBSD.ORG Sat Mar 3 00:56:14 2007 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B826816A400 for ; Sat, 3 Mar 2007 00:56:14 +0000 (UTC) (envelope-from amesbury@UMN.EDU) Received: from mta-a2.tc.umn.edu (mta-a2.tc.umn.edu [134.84.119.206]) by mx1.freebsd.org (Postfix) with ESMTP id 7E80213C491 for ; Sat, 3 Mar 2007 00:56:14 +0000 (UTC) (envelope-from amesbury@UMN.EDU) Received: from [160.94.247.212] (paulaner.oitsec.umn.edu [160.94.247.212]) by mta-a2.tc.umn.edu (UMN smtpd) with ESMTP for ; Fri, 2 Mar 2007 17:56:05 -0600 (CST) X-Umn-Remote-Mta: [N] paulaner.oitsec.umn.edu [160.94.247.212] #+LO+TS+AU+HN Message-ID: <45E8B994.2010100@umn.edu> Date: Fri, 02 Mar 2007 17:56:04 -0600 From: Alan Amesbury User-Agent: Thunderbird 1.5.0.9 (X11/20061222) MIME-Version: 1.0 To: freebsd-performance@freebsd.org References: <20070302120018.5830716A4A9@hub.freebsd.org> In-Reply-To: <20070302120018.5830716A4A9@hub.freebsd.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: (S)ATA performance in FBSD 6.2/7.0 X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Mar 2007 00:56:14 -0000 O. Hartmann" wrote: > If SYNC is default how can you explain this: > > [12:58]root@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) > > [13:00]root@hater:~# cat /etc/fstab > # Device Mountpoint FStype Options Dump > Pass# > /dev/ad4s3b none swap sw 0 0 > /dev/ad4s3a / ufs rw,sync 1 1 > /dev/ad4s3d /tmp ufs rw 2 2 > /dev/ad4s3f /usr ufs rw 2 2 > /dev/ad4s3e /var ufs rw 2 2 > > And this is only because I manually add *sync* to my /etc/fstab. > > E.g if sync is default why mount do not report that my /dev/ad4s3f on > /usr is mounted synchronous? [snip] No, the default with softupdates disabled is synchronous, not asynchronous under FreeBSD. There was a thread on this years ago (back around 3.5-RELEASE?) where this was discussed in detail. (I'm too lazy to look for it.) The discussion centered around the Linux ext2 working faster than UFS/FFS and it was exactly because ext2 file systems were mounted async by default and UFS/FFS sync by default. Looking at /usr/include/sys/mount.h, I see that there are two flags defined: MNT_SYNCHRONOUS and MNT_ASYNC. I'm not sure why both flags exist, but suspect the former was added so you could mount UFS/FFS/UFS2 filesystems that had soft updates enabled in synchronous mode without having to umount the filesystem, use tunefs(8)'s "-n" flag to enable/disable soft updates, then remount the filesystem with the appropriate flag(s). To return to your original questions, though..... I'm not sure why KB/t doesn't exceed 128, but suspect that you're right about it being a buffer limit of some sort. No idea where, though, without digging through some source. My guess is that the answer is buried somewhere in the ATA DMA bus code, but that's pure speculation. I'm unsure what would cause the slowdown you mention, too. If it were PATA, I'd immediately suspect some sort of legacy device being present, e.g., an older CD-ROM drive or something. However, that's not a concern in the SATA world, and connections are (I thought) point-to-point. Perhaps it's an interrupt sharing problem? Do you have a legacy PATA controller enabled and sharing resources with your SATA controller(s)? What does 'dmesg' show for device identification, in particular which device is on which atan-[master|slave] connection? I'd be careful about running things like 'vmstat' or 'systat' with intervals shorter than five seconds, though, as some of those tools have historically had counters that didn't update meaningfully in intervals shorter than that. There's also the question of jitter, noise, whatever. Also, if you want to benchmark the filesystem code, try running tests against a memory-backed filesystem (but one that doesn't swap!) to see how well they perform. Good luck with your testing! -- Alan Amesbury University of Minnesota