From owner-freebsd-fs@FreeBSD.ORG Wed Jul 3 20:17:52 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2255CD49 for ; Wed, 3 Jul 2013 20:17:52 +0000 (UTC) (envelope-from jdc@koitsu.org) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by mx1.freebsd.org (Postfix) with ESMTP id D768013BF for ; Wed, 3 Jul 2013 20:17:51 +0000 (UTC) Received: from mfilter21-d.gandi.net (mfilter21-d.gandi.net [217.70.178.149]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 333B5A80CF; Wed, 3 Jul 2013 22:17:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter21-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter21-d.gandi.net (mfilter21-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id UZEmdKZONIxo; Wed, 3 Jul 2013 22:17:37 +0200 (CEST) X-Originating-IP: 76.102.14.35 Received: from jdc.koitsu.org (c-76-102-14-35.hsd1.ca.comcast.net [76.102.14.35]) (Authenticated sender: jdc@koitsu.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 3327FA80CD; Wed, 3 Jul 2013 22:17:37 +0200 (CEST) Received: by icarus.home.lan (Postfix, from userid 1000) id 4E68C73A1C; Wed, 3 Jul 2013 13:17:35 -0700 (PDT) Date: Wed, 3 Jul 2013 13:17:35 -0700 From: Jeremy Chadwick To: Zoltan Arnold NAGY Subject: Re: O_DIRECT|O_SYNC semantics? Message-ID: <20130703201735.GB70533@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2013 20:17:52 -0000 On Wed, Jul 03, 2013 at 09:05:40PM +0200, Zoltan Arnold NAGY wrote: > Could someone have a look here: > http://serverfault.com/questions/520141/please-explain-my-fio-results-is-o-synco-direct-misbehaving-on-linux > > Basically, I'm seeing wastly different results on Linux and on FreeBSD 9.1. > Either FreeBSD's not honoring O_SYNC properly, or Linux does something > wicked. > > I've been at it for a few days, without any real progress. > > I do realize that since I'm operating at a block device level not with any > filesystem it's strange to ask on -fs, but I came to this results while > experimenting with the SSD as a ZIL device, and was surprised at the low > numbers. Block devices on FreeBSD are ***always*** O_DIRECT. There is no "caching mechanism" with such. Block devices on Linux result in caching, unless O_DIRECT is used. Because you're asking about some underlying kernel behaviour, I might recommend this be discussed on the -hackers list, where many of the low-level folks hang out. I can assure you that you're going to be asked to provide "dmesg" (on FreeBSD) from the system you're testing with, so you'd best have that ready. -- | Jeremy Chadwick jdc@koitsu.org | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Making life hard for others since 1977. PGP 4BD6C0CB |