xfs
[Top] [All Lists]

Re: allocsize mount option behavior

To: Ivan.Novick@xxxxxxx
Subject: Re: allocsize mount option behavior
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 17 Nov 2010 12:26:29 +1100
Cc: xfs@xxxxxxxxxxx, Timothy.Heath@xxxxxxx
In-reply-to: <C9083DF0.FCE%ivan.novick@xxxxxxx>
References: <C9083DF0.FCE%ivan.novick@xxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Tue, Nov 16, 2010 at 04:56:00PM -0500, Ivan.Novick@xxxxxxx wrote:
> Hello,
> 
> I am using the allocsize mount option to reduce fragmentation, by
> ensuring extents are of a minimum size.
> 
> Under a workload with heavy concurrency we noticed that disk space
> usage went up noticeably.

Expected behaviour.

> Can someone clarify the expected behavior of allocsize.  Does it
> force files to be at least the allocsize size on disk, or is the
> allocsize size reserved for each open file and then freed up if it
> is not used and the file is closed, or does it work some other
> way.

The latter - it's an in-memory, per-inode speculative allocation
that is removed when the file is closed.

> For example if allocsize=1g and I open 1000 files and start
> writing a small amount of data to each file …. Would the device
> show as using 1000* 1g of disk space while the files are opened
> and after they are closed then only the amount of space actually
> written by the user would be shown as used on disk?

Yes, exactly.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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