Skip to contentSkip to conversation

allocsize mount option

DISCUSSION Gim Leong Chin 2 participants 2 messages Jan 11, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

Mount options for xfs
allocsize=size
Sets the buffered I/O end-of-file preallocation size when doing delayed allocation writeout (default size is 64KiB).

I read that setting allocsize to a big value can be used to combat filesystem fragmentation when writing big files.

I do not understand how allocsize works. Say I set allocsize=1g, but my file size is only 1 MB or even smaller. Will the rest of the 1 GB file extent be allocated, resulting in wasted space and even file fragmentation problem?

Does setting allocsize to a big value result in performance gain when writing big files? Is performance hurt by a big value setting when writing files smaller than the allocsize value?

I am setting up a system for HPC, where two different applications have different file size characteristics, one writes files of GBs and even 128 GB, the other is in MBs to tens of MBs.

I am not able to find documentation on the behaviour of allocsize mount option.

Thank you.

Chin Gim Leong

New Email names for you!
Get the Email name you've always wanted on the new @ymail and @rocketmail. Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/sg/

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw
Quoted 9 lines · Gim Leong Chin

Hi,

Mount options for xfs allocsize=size Sets the buffered I/O end-of-file preallocation size when doing delayed allocation writeout (default size is 64KiB).

I read that setting allocsize to a big value can be used to combat filesystem fragmentation when writing big files.

That's not universally necessary though, depending on how you are writing them. I've only used it in the very specific case of mythtv calling "sync" every couple seconds, and defeating delalloc.

Quoted 4 lines

I do not understand how allocsize works. Say I set allocsize=1g, but my file size is only 1 MB or even smaller. Will the rest of the 1 GB file extent be allocated, resulting in wasted space and even file fragmentation problem?

possibly :) It's only speculatively allocated, though, so you won't have 1g for every file; when it's closed the preallocation goes away, IIRC.

Quoted 7 lines

Does setting allocsize to a big value result in performance gain when writing big files? Is performance hurt by a big value setting when writing files smaller than the allocsize value?

I am setting up a system for HPC, where two different applications have different file size characteristics, one writes files of GBs and even 128 GB, the other is in MBs to tens of MBs.

We should probably back up and say: are you seeing fragmentation problems -without- the mount option, and if so, what is your write pattern?

-Eric

Quoted 9 lines

I am not able to find documentation on the behaviour of allocsize mount option.

Thank you.

Chin Gim Leong

Quoted 7 lines

New Email names for you! Get the Email name you've always wanted on the new @ymail and @rocketmail. Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/sg/

_______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs