Skip to contentSkip to conversation

allocsize mount option

DISCUSSION [email protected] 2 participants 2 messages Sep 28, 2010 – Sep 29, 2010

lore
Share & tools
lore
#0 lore raw

Hi all,

According to the documentation the allocsize mount option: "Sets the buffered I/O end-of-file preallocation size when doing delayed allocation writeout"

Will this value limit "extent" sizes to be be no smaller than the allocsize?

I have set the following mount options:
(rw,noatime,nodiratime,logbufs=8,allocsize=512m)

And yet, depending on the workload, the extent sizes are often 1 or 2 orders of magnitude lower than 512 MB ...

If I wanted to do further reading on the subject, can someone point me to an approximate location in the code where the size of a newly created extent is determined?

Cheers,
Ivan Novick

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

#1 lore raw
Quoted 7 lines · On Tue, Sep 28, 2010 at 02:53:46PM -0400, [email protected] wrote:

Hi all,

According to the documentation the allocsize mount option: "Sets the buffered I/O end-of-file preallocation size when doing delayed allocation writeout"

Will this value limit "extent" sizes to be be no smaller than the allocsize?

No - it's specualtive preallocation.

Quoted 2 lines

I have set the following mount options:
(rw,noatime,nodiratime,logbufs=8,allocsize=512m)

/me wishes he could run a sed script across the internet.

noatime implies nodiratime, and logbufs=8 is the default, so you only need "noatime,allocsize=512m"

Quoted 2 lines

And yet, depending on the workload, the extent sizes are often 1 or 2 orders of magnitude lower than 512 MB ...

It's speculative and there's no guarantee that it can find a big enough extent to complete the full allocsize allocation. Also, when you close the file the speculative allocation beyond EOF is truncated away. This is a particular problem with NFS servers.

Quoted 3 lines

If I wanted to do further reading on the subject, can someone point me to an approximate location in the code where the size of a newly created extent is determined?

Start here:

fs/xfs/xfs_iomap.c::xfs_iomap_write_delay()

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

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