Date: Fri, 7 Dec 2007 18:49:15 +0100 From: Bernd Walter <ticso@cicely12.cicely.de> To: Ivan Voras <ivoras@freebsd.org> Cc: freebsd-fs@freebsd.org Subject: Re: readv: parallel or sequential? Message-ID: <20071207174914.GQ10459@cicely12.cicely.de> In-Reply-To: <fjbk9g$pua$1@ger.gmane.org> References: <fjbb3v$n60$1@ger.gmane.org> <ad79ad6b0712070347s4a5d5bb2rc7adfdc54b107dac@mail.gmail.com> <868x46u0lz.fsf@ds4.des.no> <fjbh4h$f5s$1@ger.gmane.org> <20071207133700.GO10459@cicely12.cicely.de> <fjbk9g$pua$1@ger.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071207174914.GQ10459>