XFS and file allocation

Suggestions and discussion of future versions
Post Reply
cbrigstocke
Member
Member
Posts: 12
Joined: Wed Feb 13, 2008 6:32 pm
Location: New York

XFS and file allocation

Post by cbrigstocke »

I'm hoping that somewhere down the road that xfs specific file allocation will be an option. Any chance?

Thanks.
-cbrigstocke
andar
Top Bloke
Top Bloke
Posts: 1050
Joined: Fri Jun 08, 2007 8:38 pm
Location: Victoria, BC
Contact:

Re: XFS and file allocation

Post by andar »

What do you mean?

I'm pretty sure XFS supports sparse file allocation. What more does one need?
lvm
Seeder
Seeder
Posts: 130
Joined: Sat Apr 19, 2008 6:05 am

Re: XFS and file allocation

Post by lvm »

I store torrents on xfs and may confirm that you are unfortunately correct. Unfortunately, because deluge uses sparse file in full allocation mode, and even though FAQ describes it as a feature it is a whopping bug. Sparse allocation kills the very idea of full allocation which is eh... to allocate space fully and immediately. Sparse mode should be used for compact allocation.
User avatar
Ux64
Seeder
Seeder
Posts: 140
Joined: Wed Nov 14, 2007 5:02 am
Location: System Specialist

Re: XFS and file allocation

Post by Ux64 »

And when using full allocation, pre-allocation should be done anyway to prevent needless fragmentaition.

AFAIK, every program should use pre-allocation if file system supports it, if file size is known.

Ext3 doesn't support pre-allocation without patch, but NTFS, Ext4 and BtrFS do.
cbrigstocke
Member
Member
Posts: 12
Joined: Wed Feb 13, 2008 6:32 pm
Location: New York

Re: XFS and file allocation

Post by cbrigstocke »

Let me preface by letting you all know that I'm by no means an expert. My downloads are very fragmented even when using deluge. I know this because I can watch them defrag using xfs_fsr, and so it's not a huge deal since the fragmentation is easily fixed. It would be nice to not have to do it though.

I read somewhere that sparse file allocation doesn't work well with XFS. Maybe fallocate works with xfs and also xfs_io from xfsprogs should work.

Thanks again for all the great work.
-cbrigstocke
lvm
Seeder
Seeder
Posts: 130
Joined: Sat Apr 19, 2008 6:05 am

Re: XFS and file allocation

Post by lvm »

cbrigstocke wrote:Let me preface by letting you all know that I'm by no means an expert. My downloads are very fragmented even when using deluge. I know this because I can watch them defrag using xfs_fsr, and so it's not a huge deal since the fragmentation is easily fixed. It would be nice to not have to do it though.

I read somewhere that sparse file allocation doesn't work well with XFS. Maybe fallocate works with xfs and also xfs_io from xfsprogs should work.
Sparse allocation works more or less the same on all filesystems and using it is the best way to get file fragmented as much as possible - the exact opposite of full allocation.
Maybe fallocate works with xfs and also xfs_io from xfsprogs should work
I believe plain lseek to the planned file size should do the trick on all filesystems.
Post Reply