xfs
[Top] [All Lists]

RE: EXTENT BOUNDARIES

To: "'Les Oxley'" <les@xxxxxxxxx>
Subject: RE: EXTENT BOUNDARIES
From: "Barry Naujok" <bnaujok@xxxxxxxxxxxxxxxxx>
Date: Tue, 23 Jan 2007 14:08:29 +1100
Cc: <xfs@xxxxxxxxxxx>
In-reply-to: <45B19BDD.2050808@xxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
Thread-index: Acc8TH8L1gsIRHEuRTG6DU0RpXquDACTa4xQ
 

> -----Original Message-----
> From: xfs-bounce@xxxxxxxxxxx [mailto:xfs-bounce@xxxxxxxxxxx] 
> On Behalf Of Eric Sandeen
> Sent: Saturday, 20 January 2007 3:35 PM
> To: Les Oxley
> Cc: xfs@xxxxxxxxxxx
> Subject: Re: EXTENT BOUNDARIES
> 
> Les Oxley wrote:
> > 
> > Hello,
> > 
> > We are looking into running XFS on a 3TB FLASH MEMORY 
> MODULE.  We have a 
> > question  regarding the extent boundaries.
> > See the attached PowerPoint drawing, xfs.ppt We are running Linux.
> > Our  media is 3 million contiguous 4KB blocks. We would 
> like to define 
> > an extent size of 1MB and this tracks the erasure block size
> > of the flash memory, and that greatly improves perfomance. 
> We are trying 
> > to understand where XFS places the extent boundaries with 
> reference to 
> > the contiguous block sequence.
> > Is this deterministic as indicated in the drawing ? That 
> is, are the 
> > extent boundaries on 256 block boundaries.
> > 
> > Any help would be greatly appreciated.
> > 
> > Les Oxley
> > Ampex Corporation
> > Redwood City
> > California.
> 
> extents by definition land on filesystem block boundaries, and can in 
> general be any number of filesystem blocks, starting & ending most 
> anywhere on the block device.
> 
> If you wish to always allocate in 1m chunks, you might consider using 
> the xfs realtime subvolume, see the extsize description in 
> the mkfs.xfs 
> man page.  I'm not sure how much buffered IO to the realtime 
> subvol has 
> been tested; pretty sure it works at this point, though the sgi guys 
> will correct me if I'm wrong... it's not exactly the normal mode of 
> operation.
> 
> Using the realtime subvol, however, all your file -metadata- 
> will still 
> be allocated on the main data volume, in much smaller pieces.
> 
> -Eric

If you don't need to use 100% of the space for your data, you can give
XFS a hint to align on a stripe unit if it's applicable.

If you allocate 1MB chunks at a time (either via a write or prealloc)
with an filesystem with sunit=1MB (2048 sectors if using 512 bytes
sectors for mkfs.xfs command), it will align to the stripe unit where
there is space available.

Once the aligned space is full, it will allocate in the remaining space.
Metadata such as inodes, directories, etc will not be nicely aligned.

If your total write or prealloc is smaller than 512KB it will not nicely
align, but find suitable space.

I would recommending some experimentation to see if either of the above
ideas are suitable for your purpose.

For the sunit idea and 512 byte sector size, the following mkfs command
should work:

# mkfs.xfs -b 4096 -d sunit=2048,swidth=4096 <device>

To see it in action using dd:

# dd if=/dev/zero of=<file> bs=1048576
# xfs_bmap -v <file>

You should see the block range aligned to 2048 sectors.


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