Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Apr 2001 16:48:16 -0400 (EDT)
From:      Zhihui Zhang <zzhang@cs.binghamton.edu>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        Brian Somers <brian@Awfulhak.org>, Jason DiCioccio <Jason.DiCioccio@Epylon.com>, "'current@freebsd.org'" <current@FreeBSD.ORG>
Subject:   Re: FW: Filesystem gets a huge performance boost 
Message-ID:  <Pine.SOL.4.21.0104101640100.624-100000@onyx>
In-Reply-To: <200104101824.f3AIOZ389340@earth.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Tue, 10 Apr 2001, Matt Dillon wrote:

> :> I'm not 100% convinced about the algorithm to avoid clusters filling 
> :> up with directory-only entries (it looks like a worst-case would fill 
> :> a cluster with 50% directories and 50% files leaving a bad layout when 
> :> the directories are populated further), but then the non-dirpref 
> :> scheme has some far worse worst-case scenarios ;-)
> :
> :Just to follow up on myself... it seems the dirpref stuff was 
> :committed to FreeBSD this morning :-]
> :
> :-- 
> :Brian <brian@Awfulhak.org>                        <brian@[uk.]FreeBSD.org>
>     
>     Yup, Kirk committed it.  I really like the changes -- in the old days
>     disk caches were tiny and directories were not well cached on top of that.
>     It made sense to try to keep directories close to their files.
> 
>     But today the proximity of a directory to its files is not really that
>     important.  It is far more important for directories to have reasonable
>     proximity to each other not only to improve directory scans and lookups,
>     but also to improve caching.  Especially for small directories.  
>     Consider that small directories are typically contained in a single
>     fragment (1K).  If directories are spread all over the disk, caching
>     is non-optimal.  But if they are relatively close to each other then
>     both our VM cache (if vfs.vmiodirenable is set to 1) and the hard
>     drive's internal cache become extremely effective.  With the added

Why VMIO dir works better if directories are placed close to each other? I
think it only makes the cache data of an individual directory stay in the
memory longer.  Is there a way to measure the effectiveness of the disk
drive's cache?

-Zhihui

>     effectiveness of the caches, seeking should wind up being
>     significantly reduced even for things like 'tar'.  Large directories
>     also benefit, I think.
> 
>     From looking at the code, I don't think fragmentation will be an issue.
>     Or, to be more specific, I don't think the fact that files may not wind
>     up in the same cylinder group as their directory entry is an issue.
>     Either you have a huge number of directories being accessed and need
>     the locality of reference within the directory space even if it costs
>     some additional seeking to access underlying files, or you don't and
>     the active directories all wind up being cached, removing any additional
>     seeking from the equation entirely.
> 
> 						-Matt
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-current" in the body of the message
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.4.21.0104101640100.624-100000>