From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from ) id 1HmOA7-0006Ne-FN for garchives@archives.gentoo.org; Fri, 11 May 2007 05:59:31 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l4B5vW33023934; Fri, 11 May 2007 05:57:32 GMT Received: from lancia.kaluga.ru (mx.kaluga.ru [62.148.128.2]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l4B5pXh5016292 for ; Fri, 11 May 2007 05:51:33 GMT Received: from pavillion ([62.148.150.64]) by lancia.kaluga.ru (8.13.8/8.13.8) with ESMTP id l4B5pUVi082786 for ; Fri, 11 May 2007 09:51:31 +0400 (MSD) Date: Fri, 11 May 2007 09:51:37 +0400 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: Separate /usr From: "Andrey Gerasimenko" Content-Type: text/plain; format=flowed; delsp=yes; charset=windows-1251 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 References: <49bf44f10705081656s776f28f5kbe497a5326107c2f@mail.gmail.com> <3103632.vvIsoWeEWl@kn.gn.rtr.message-center.info> <20070510104016.360d3a97@hactar.digimed.co.uk> <200705101211.34696.benno.schulenberg@gmail.com> <20070510113446.7fdae1b8@hactar.digimed.co.uk> <20070510163603.5d3836e4@pascal.spore.ath.cx> Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <20070510163603.5d3836e4@pascal.spore.ath.cx> User-Agent: Opera Mail/9.20 (Win32) X-Antivirus: avast! (VPS 000739-2, 05/11/2007), Outbound message X-Antivirus-Status: Clean X-Archives-Salt: 17961df1-11b4-464f-9aac-ecba55c668ef X-Archives-Hash: 6422e7151d9d46824eefabf75cd7a14b On Fri, 11 May 2007 01:36:03 +0400, Dan Farrell wrote: > On Thu, 10 May 2007 11:34:46 +0100 > Neil Bothwick wrote: > >> On Thu, 10 May 2007 12:11:34 +0200, Benno Schulenberg wrote: >> >> > > No idea, but I tried it when I encountered that page and portage >> > > operations were measurably faster. >> > >> > That might well be just the transfer effect: you went from an old >> > fragmented file system to a fresh unfragmented one. >> >> I allowed for that. I created a new filesystem for /usr/portage - I >> had been using a directory in /usr before. >> >> > Well, maybe it has to do with the efficiency of reading discontiguous > blocks from one file as opposed to a filesystem. Since it's a sparse > file, there might be a lot of 'space' that, if it were on an actual > disk, the heads would have to pass over; thus there may be a way in > which a sparse file is more efficient than a regular filesystem. > > Remeber that the files in portage are, except for distfiles, quite > small. By my calculation, the average size for files and directories > under $PORTDIR (excluding $DISTDIR of course) is only 62 bytes. What > would you bet that on a disk partition, the other 962 to 4034 bytes per > block (I couldn't have block sizes less than 1K on reiser for my > portage, and 4096 is the default for most FS's) are filled with > nothing, and the heads need to pass over them to read the next block. > On a sparse file that space is merely reserved, it needn't actually > exist. Hope that helps you conceptualize the difference. I guess the idea is correct, but the details are questionable. The heads do not move over empty tails, the spinning disk does. A head just moves to the track that contains the required sectors. The head movement and disk spinning do not influence performance directly since there are many levels of caching between a physical read and an application. It looks like it takes much less buffer space to cache lots of small files when they are joined into a sparse file than when they are in a real file system, making sparse file very efficient. -- Andrei Gerasimenko -- gentoo-user@gentoo.org mailing list