From owner-freebsd-fs@FreeBSD.ORG Thu Dec 20 22:25:24 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 2C0D016A41B for ; Thu, 20 Dec 2007 22:25:24 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outL.internet-mail-service.net (outL.internet-mail-service.net [216.240.47.235]) by mx1.freebsd.org (Postfix) with ESMTP id 1401313C458 for ; Thu, 20 Dec 2007 22:25:23 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Thu, 20 Dec 2007 14:25:23 -0800 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id A66C2126D39; Thu, 20 Dec 2007 14:25:22 -0800 (PST) Message-ID: <476AEBD1.5020307@elischer.org> Date: Thu, 20 Dec 2007 14:25:21 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: ticso@cicely.de References: <20071207174914.GQ10459@cicely12.cicely.de> <200712202140.08367.peter.schuller@infidyne.com> <20071220221735.GB67140@cicely12.cicely.de> In-Reply-To: <20071220221735.GB67140@cicely12.cicely.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org, Ivan Voras Subject: Re: readv: parallel or sequential? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2007 22:25:24 -0000 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. All IO to a single descriptor MUST be serialised.