xfs
[Top] [All Lists]

Re: Performance of near-full filesystems

To: james rich <james.rich@xxxxxxxxxxxxx>
Subject: Re: Performance of near-full filesystems
From: Steve Lord <lord@xxxxxxx>
Date: Mon, 23 Jul 2001 11:25:28 -0500
Cc: Steve Lord <lord@xxxxxxx>, Federico Sevilla III <jijo@xxxxxxxxxxxxxxxxxxxx>, Linux XFS Mailing List <linux-xfs@xxxxxxxxxxx>
In-reply-to: Message from james rich <james.rich@xxxxxxxxxxxxx> of "Mon, 23 Jul 2001 10:17:46 MDT." <Pine.GSO.4.05.10107231015430.20653-100000@xxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
> On Sun, 22 Jul 2001, Steve Lord wrote:
> 
> > > On Sun, 22 Jul 2001 at 08:03, Steve Lord wrote:
> > > > If you create a large number of files in XFS, inodes are allocated
> > > > dynamically for them. If you remove all the files, the inodes are not
> > > 
> > > Yes, this is what I was referring to. I was under the impression that thi
> s
> > > was "bad", though, and one effectively "lost space". Are inodes allocated
> > > dynamically for large files different from those allocated dynamically fo
> r
> > > a bunch of small files? Meaning, if inodes are allocated for a large file
> ,
> > 
> > There is no distinction in XFS, an inode is an inode, no matter what it
> > is used for, they are all the same size (default 256 bytes on disk) and
> > they are allocated in groups of 32 by default (2 filesystem blocks worth).
> 
> I think the question is about density here.  Two large files create two
> inodes in a certain amount of disk.  If those files are deleted does xfs
> create more inodes in that same amount of disk if small files are placed
> there?  Or are there large holes?


OK, where the inodes live and where the file data lives are different
things. As I mentioned in previous email, the filesystem is split into
allocation groups, each allocation group is self contained when it comes
to free space and free inodes. 

Within each allocation group free space is indexed as two btrees of
extents. One is organized by disk location, one is organized by size
of the space, the tree which is used for allocation depends on what
you want, next to some other space, or of a certain size. As space
is freed it is placed back into the tree, should it be next to
other free space the two extents are coalesced into a single extent.

Once space is released from a file, it is available for anyone else
to use. If all the free space happens to be in one large chunk and we
only want a small part of it we just use one end of the free space.

So yes, there are large holes, but these holes can be carved up into
lots of small chunks should the need arise, and in turn these small
chunks can be put back together into a large chunk of free space
should they all be freed again.

Steve

> 
> James Rich
> james.rich@xxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>