xfs
[Top] [All Lists]

Re: Question regarding XFS on LVM over hardware RAID.

To: Eric Sandeen <sandeen@xxxxxxxxxxx>, "C. Morgan Hamill" <chamill@xxxxxxxxxxxx>, xfs <xfs@xxxxxxxxxxx>
Subject: Re: Question regarding XFS on LVM over hardware RAID.
From: Stan Hoeppner <stan@xxxxxxxxxxxxxxxxx>
Date: Wed, 29 Jan 2014 16:40:51 -0600
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <52E91923.4070706@xxxxxxxxxxx>
References: <1391005406-sup-1881@xxxxxxxxxxxxxxx> <52E91923.4070706@xxxxxxxxxxx>
Reply-to: stan@xxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
On 1/29/2014 9:07 AM, Eric Sandeen wrote:
> On 1/29/14, 8:26 AM, C. Morgan Hamill wrote:
>> Howdy folks,
>>
>> I understand that XFS have stripe unit and width configured according to
>> the underlying RAID device when using LVM, but I was wondering if this
>> is still the case when a given XFS-formatted logical volume takes up
>> only part of the available space on the RAID.  In particular, I could
>> imagine that stripe width would need to be modified proportionally with
>> the decrease in filesystem size.  My intuition says that's false, but
>> I wanted to check with folks who know for sure.
> 
> The stripe unit and width are units of geometry of the underlying
> storage; a filesystem will span some number of stripe units, depending
> on its size.
> 
> So no, the filesystem's notion of stripe geometry does not change
> with the filesystem size.
> 
> You do want to make sure that stripe geometry is correct and aligned
> from top to bottom.

This is correct if indeed stripe alignment is beneficial to the
workload.  But not all workloads benefit from stripe alignment.  Some
may perform worse when XFS is stripe aligned to the underlying storage.

For instance, when a workload performs lots of allocations that are
significantly smaller than the RAID stripe width.  Here you end up with
a small file allocated at the start of each stripe and the rest of the
stripe left empty.  This can create an IO hot spot on the first one or
two drives in the array, and the others may sit idle.  This obviously
has a negative impact on throughput with such a workload.

Thus for a workload that performs lots of predominantly small
allocations, it is best to not align during mkfs.xfs with hardware RAID
that doesn't provide geometry to Linux.  If the underlying storage
device does do so, or if it is is a striped md/RAID device, you will
want to manually specify 4K alignment, as mkfs.xfs will auto align to md
geometry.

-- 
Stan

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