From owner-freebsd-fs@FreeBSD.ORG Thu Dec 20 22:35:41 2007 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B2AB16A41B; Thu, 20 Dec 2007 22:35:41 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id DAA2713C461; Thu, 20 Dec 2007 22:35:40 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id lBKMZaVX053574; Thu, 20 Dec 2007 23:35:36 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id lBKMZSZf082054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 Dec 2007 23:35:28 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id lBKMZSo1068328; Thu, 20 Dec 2007 23:35:28 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id lBKMZR1C068327; Thu, 20 Dec 2007 23:35:27 +0100 (CET) (envelope-from ticso) Date: Thu, 20 Dec 2007 23:35:27 +0100 From: Bernd Walter To: Julian Elischer Message-ID: <20071220223527.GC67140@cicely12.cicely.de> References: <20071207174914.GQ10459@cicely12.cicely.de> <200712202140.08367.peter.schuller@infidyne.com> <20071220221735.GB67140@cicely12.cicely.de> <476AEBD1.5020307@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <476AEBD1.5020307@elischer.org> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: freebsd-fs@freebsd.org, ticso@cicely.de, Ivan Voras Subject: Re: readv: parallel or sequential? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2007 22:35:41 -0000 On Thu, Dec 20, 2007 at 02:25:21PM -0800, Julian Elischer wrote: > Bernd Walter wrote: > >On Thu, Dec 20, 2007 at 09:40:00PM +0100, Peter Schuller wrote: > >>>Yes, but how can it now that it is on a RAID0 and taking advantage of > >>>multiple spindles instead of making it worse? > >>>The FS has to do sensible things for single spindle as well. > >>>And normaly disks are fastest when reading linear and with disk read > >>>caches this doesn't even have to be interleaved. > >>>I don't see any potential for parallell access within the same file > >>>beside some special constructed cases maybe. > >>I strongly disagree here. I would expect the operating system to not > >>serialize all I/O to the same file descriptor/file, if done in paralell > >>from multiple threads or through AIO. I have at least on use case heavily > >>dependent on this - does this mean FreeBSD would not be usable for this? > > > >No - I just didn't though about this. > >In most cases a single file means serialized use from the application, > >but of course this is not true in every case. > >In case the application uses serialized access there is not much to do > >beside preread or caching writes to make use of multiple spindles. > >But an application has to be carefull, because parallel access within > >a single file almost always mean that access is not linear anymore, so > >many opther performance tunings won't work as good as they could, so > >this could easily outweight the performance gain from multiple access. > >Nonlinear access from within an application has to be for another reason > >and not as a performance tuning. > > If you want to write to different points in a file you can always open > multiple file descriptors to the same file. Or mmap the file and access it with multiple threads. > All IO to a single descriptor MUST be serialised. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de