From owner-freebsd-performance@FreeBSD.ORG Mon Mar 5 03:19:23 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 028A716A402 for ; Mon, 5 Mar 2007 03:19:23 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1-3.pacific.net.au [61.8.2.210]) by mx1.freebsd.org (Postfix) with ESMTP id 95A5A13C467 for ; Mon, 5 Mar 2007 03:19:22 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 0A56E5A7F48; Mon, 5 Mar 2007 14:19:21 +1100 (EST) Received: from besplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id E25A78C23; Mon, 5 Mar 2007 14:19:19 +1100 (EST) Date: Mon, 5 Mar 2007 14:19:18 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: dima <_pppp@mail.ru> In-Reply-To: Message-ID: <20070305133954.D2598@besplex.bde.org> References: <45E7F09B.7070005@zedat.fu-berlin.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-performance@FreeBSD.org, "O. Hartmann" 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: Mon, 05 Mar 2007 03:19:23 -0000 On Mon, 5 Mar 2007, dima wrote: > I think you're quite OK with dd. I do believe you'll get a comparable results for cp setting "noatime" option in mount(8)s. As you were told, the default mount mode is noasync which is "synchronous metadata + asynchronous data". But FreeBSD still updates metadata for atime on every file read. No. Atime updates are always async (strictly, delayed). It is another bug in mount.8 and in many mails in this thread to claim that !noasync gives sync for all metadata or that sync gives sync for metadata. The async and sync flags have no effect on syncing atime updates. Similarly for updates of all times set by utimes(2). This might be a bug in the sync mount and O_FSYNC cases. fsync(2) on the file after the utimes(2) will update the metadata (to the disk), but O_FSYNC doesn't make this happen automatically. 4.4BSD-Lite1 gets this wrong in the opposite way, by always doing a sync update for times set by utimes(2). This was changed in 4.4BSD-Lite2 and misimported into FreeBSD in rev.1.79 of ufs_vnops.c by splatting Lite2 changes onto the non-vendor branch and not documenting them. Similarly except for history for the more critical updates of metadata changed by chown(2), chmod(2), chflags(2) and perhaps others. These updates were always done only to the in-core inode and any syncing to the disk was accidental. The syncing for utimes(2) is just an accident that always happened immediately. It was silly to sync relatively unimportant changes to times while not syncing changes to permissions. > 2all: Are there any reasons not to make noasync the default mount option? It greatly improves FS performance and I don't think many modern administrators do care about access times of their files (assuming how many files a modern box has). I think you mean noatime. It is required by POSIX and POLA. noatime has an especially tiny effect on large copies. The atime updates get written to disk every 30 seconds or so, one for every GB or so of data. noatime makes a difference mainly for tree walks where looking in lots of directories clobbers their atimes. Bruce