public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* allocsize mount option behavior
@ 2010-11-16 21:56 Ivan.Novick
  2010-11-17  1:26 ` Dave Chinner
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan.Novick @ 2010-11-16 21:56 UTC (permalink / raw)
  To: xfs; +Cc: Timothy.Heath

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.

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.

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?

Cheers,
Ivan Novick

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: allocsize mount option behavior
  2010-11-16 21:56 allocsize mount option behavior Ivan.Novick
@ 2010-11-17  1:26 ` Dave Chinner
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Chinner @ 2010-11-17  1:26 UTC (permalink / raw)
  To: Ivan.Novick; +Cc: Timothy.Heath, xfs

On Tue, Nov 16, 2010 at 04:56:00PM -0500, Ivan.Novick@emc.com 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@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-17  1:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-16 21:56 allocsize mount option behavior Ivan.Novick
2010-11-17  1:26 ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox