From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <46ACB40C.2040908@gmail.com> Date: Sun, 29 Jul 2007 17:36:44 +0200 From: Rene Herman MIME-Version: 1.0 Subject: Re: RFT: updatedb "morning after" problem [was: Re: -mm merge plans for 2.6.23] References: <9a8748490707231608h453eefffx68b9c391897aba70@mail.gmail.com> <46AAEDEB.7040003@gmail.com> <46AB166A.2000300@gmail.com> <20070728122139.3c7f4290@the-village.bc.nu> <46AC4B97.5050708@gmail.com> <20070729141215.08973d54@the-village.bc.nu> <46AC9F2C.8090601@gmail.com> <2c0942db0707290758p39fef2e8o68d67bec5c7ba6ab@mail.gmail.com> <46ACAB45.6080307@gmail.com> <2c0942db0707290820r2e31f40flb51a43846169a752@mail.gmail.com> In-Reply-To: <2c0942db0707290820r2e31f40flb51a43846169a752@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Ray Lee Cc: Alan Cox , david@lang.hm, Daniel Hazelton , Mike Galbraith , Andrew Morton , Ingo Molnar , Frank Kingswood , Andi Kleen , Nick Piggin , Jesper Juhl , ck list , Paul Jackson , linux-mm@kvack.org, linux-kernel@vger.kernel.org List-ID: On 07/29/2007 05:20 PM, Ray Lee wrote: >> I understand what log structure is generally, but how does it help swapin? > > Look at the swap out case first. > > Right now, when swapping out the kernel places whatever it can > wherever it can inside the swap space. The closer you are to filling > your swap space, the more likely that those swapped out blocks will be > all over place, rather than in one nice chunk. Contrast that with a > log structured scheme, where the writeout happens to sequential spaces > on the drive instead of scattered about. This seems to be now fixing the different problem of swap-space filling up. I'm quite willing to for now assume I've got plenty free. > So, at some point when the system needs to fault those blocks that > back in, it now has a linear span of sectors to read instead of asking > the drive to bounce over twenty tracks for a hundred blocks. Moreover though -- what I know about log structure is that generally it optimises for write (swapout) and might make read (swapin) worse due to fragmentation that wouldn't happen with a regular fs structure. I guess that cleaner that Alan mentioned might be involved there -- I don't know how/what it would be doing. > So, it eliminates the seeks. My laptop drive can read (huh, how odd, > it got slower, need to retest in single user mode), hmm, let's go with > about 25 MB/s. If we ask for a single block from each track, though, > that'll drop to 4k * (1 second / seek time) which is about a megabyte > a second if we're lucky enough to read from consecutive tracks. Even > worse if it's not. > > Seeks are the enemy any time you need to hit the drive for anything, > be it swapping or optimizing a database. I am very aware of the costs of seeks (on current magnetic media). Rene. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org