From: David Chinner <dgc@sgi.com>
To: "Raz Ben-Jehuda(caro)" <raziebe@gmail.com>
Cc: dgc@sgi.com, xfs@oss.sgi.com
Subject: Re: [DISCUSS] xfs allocation bitmap method over linux raid
Date: Thu, 25 Jan 2007 09:58:52 +1100 [thread overview]
Message-ID: <20070124225852.GO33919298@melbourne.sgi.com> (raw)
In-Reply-To: <5d96567b0701232234y2ff15762sbd1aaada5c3a0a0@mail.gmail.com>
On Wed, Jan 24, 2007 at 08:34:22AM +0200, Raz Ben-Jehuda(caro) wrote:
> David Hello.
> I have looked up in LKML and hopefully you are the one to ask in
> regard to xfs file system in Linux.
> My name is Raz and I work for a video servers company.
> These servers demand high throughput from the storage.
> We applied XFS file system on our machines.
>
> A video server reads a file in a sequential manner. So, if a
> file extent size is not a factor of the stripe unit size a sequential
> read over a raid would break into several small pieces which
> is undesirable for performance.
>
> I have been examining the bitmap of a file over Linux raid5.
> According to the documentation XFS tries to align a file on
> stripe unit size.
Yup.
> What I have done is to fix the bitmap allocation method during
> the writing to be aligned by the stripe unit size.
> The thing is , though this seems to work , I do not know whether I
> missed something.
>
> The bellow is a patch (a mere two lines) i have applied to the
> file system and I would be really grateful to have your opinion.
>
>
> diff -ru --exclude='*.o'
> /d1/rt/kernels/linux-2.6.17-UNI/fs/xfs/xfs_iomap.c
> linux-2.6.17-UNI/fs/xfs/xfs_iomap.c
> --- /d1/rt/kernels/linux-2.6.17-UNI/fs/xfs/xfs_iomap.c 2006-06-18
> 01:49:35.000000000 +0000
> +++ linux-2.6.17-UNI/fs/xfs/xfs_iomap.c 2006-12-26 14:11:02.000000000 +0000
> @@ -441,8 +441,8 @@
> if (unlikely(rt)) {
> if (!(extsz = ip->i_d.di_extsize))
> extsz = mp->m_sb.sb_rextsize;
> - } else {
> - extsz = ip->i_d.di_extsize;
> + } else {
> + extsz = mp->m_dalign; // raz fix alignment to raid stripe unit
> }
>
> isize = ip->i_d.di_size;
> @@ -663,7 +663,7 @@
> if (!(extsz = ip->i_d.di_extsize))
> extsz = mp->m_sb.sb_rextsize;
> } else {
> - extsz = ip->i_d.di_extsize;
> + extsz = mp->m_dalign; // raz fix alignment to raid stripe unit
> }
>
> offset_fsb = XFS_B_TO_FSBT(mp, offset);
No, that changes the default behaviour of XFS and breaks the extent
allocation size hint code, which is what you should be using to
do this. i.e:
# xfs_io -c "chattr -R +e +E" -c "extsize <sunit>" /path/to/mnt
Will set the inode extent size on all new files and directories in the
filesystem to <sunit>. You'll get a bunch of errors from this
command because you cannot change the extsize of a file that already
has extents allocated to it, so it's best to apply this right after
mkfs when the filesystem is empty.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
prev parent reply other threads:[~2007-01-24 23:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-24 6:34 [DISCUSS] xfs allocation bitmap method over linux raid Raz Ben-Jehuda(caro)
2007-01-24 22:38 ` Nathan Scott
2007-01-28 10:32 ` Raz Ben-Jehuda(caro)
2007-01-28 21:49 ` Nathan Scott
2007-01-29 21:49 ` Nathan Scott
2007-01-28 23:52 ` David Chinner
2007-01-24 22:58 ` David Chinner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070124225852.GO33919298@melbourne.sgi.com \
--to=dgc@sgi.com \
--cc=raziebe@gmail.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox