From owner-freebsd-fs@FreeBSD.ORG Fri Dec 7 17:49:26 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 9C26B16A474; Fri, 7 Dec 2007 17:49:26 +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 0DDBF13C4E1; Fri, 7 Dec 2007 17:49:25 +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 lB7HnO3j074856; Fri, 7 Dec 2007 18:49:24 +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 lB7HnFR8033545 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 7 Dec 2007 18:49:16 +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 lB7HnFME021305; Fri, 7 Dec 2007 18:49:15 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id lB7HnFYS021304; Fri, 7 Dec 2007 18:49:15 +0100 (CET) (envelope-from ticso) Date: Fri, 7 Dec 2007 18:49:15 +0100 From: Bernd Walter To: Ivan Voras Message-ID: <20071207174914.GQ10459@cicely12.cicely.de> References: <868x46u0lz.fsf@ds4.des.no> <20071207133700.GO10459@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, AWL=0.023, 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 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: Fri, 07 Dec 2007 17:49:26 -0000 On Fri, Dec 07, 2007 at 03:16:30PM +0100, Ivan Voras wrote: > Bernd Walter wrote: > > > I wonder if the kernel can read a single file in parallel, because > > disk heads can't be on multiple positions at the same time. > > They can be in case of RAID0 and similar schemes. 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. Granted if you issue many access in parallel you allow the disk queue to sort them in the most effective way, but most FS do a hard job getting single files almost linear, so there is no seek time win at all. I assume the best is the application sorting the readv entries in an increasing order. > > ZFS does fill read cache in parallel if it knowns that there are enough > > spindels, but in every other case the FS doesn't know about multiple > > spindels. > > In case of ZFS you don't have to care much about it in you application > > because the next sequentiel fileread will use the previously parallel > > prefilled cache. > > Yes, ZFS is supposed to be doing marvelous things with IO prediction and > scheduling, but I think even basic "ladder" scheduling done in FreeBSD > could in theory help in tight spots with multiple requests. At least there are some workloads with very good results. A friend recently measured almost twice the speed when reading a big file on a two disk ZFS mirror compared to single disk raw speed. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de