* Default mount options (that suck less).
@ 2007-10-29 7:56 Niv Sardi
2007-10-29 8:55 ` David Chinner
` (5 more replies)
0 siblings, 6 replies; 52+ messages in thread
From: Niv Sardi @ 2007-10-29 7:56 UTC (permalink / raw)
To: xfs
Hello,
XFS's default mount options are in most cases sub-optimal, we should try
to have more sensible defaults, so far I'm following some quick dave-powered
recomendations:
- version 2 logs
- attr2
- lazy superblock counters
- less allocation groups for single disk configs
- imaxpct default can be reduced
it is currently 25, what would be reasonable ?
- dropping the ability to turn unwritten extents off completely
please submit your pet-idea for better defaults here.
Cheers,
--
Niv
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 7:56 Default mount options (that suck less) Niv Sardi
@ 2007-10-29 8:55 ` David Chinner
2007-10-29 10:44 ` nscott
2007-10-29 14:01 ` Eric Sandeen
2007-10-29 14:03 ` Eric Sandeen
` (4 subsequent siblings)
5 siblings, 2 replies; 52+ messages in thread
From: David Chinner @ 2007-10-29 8:55 UTC (permalink / raw)
To: Niv Sardi; +Cc: xfs
On Mon, Oct 29, 2007 at 06:56:57PM +1100, Niv Sardi wrote:
> Hello,
>
> XFS's default mount options are in most cases sub-optimal, we should try
Mkfs options ;)
> to have more sensible defaults, so far I'm following some quick dave-powered
> recomendations:
>
> - version 2 logs
> - attr2
> - lazy superblock counters
> - less allocation groups for single disk configs
>
> - imaxpct default can be reduced
>
> it is currently 25, what would be reasonable ?
Given that 25% on a 4GB filesystem will allow about 5million inodes,
I think it's probably reasonable to bring it down to 5% by the time we
pass 1TB and 1% by 50TB.....
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 8:55 ` David Chinner
@ 2007-10-29 10:44 ` nscott
2007-10-29 14:01 ` Eric Sandeen
1 sibling, 0 replies; 52+ messages in thread
From: nscott @ 2007-10-29 10:44 UTC (permalink / raw)
To: Niv Sardi, David Chinner; +Cc: xfs
> On Mon, Oct 29, 2007 at 06:56:57PM +1100, Niv Sardi wrote:
>> Hello,
>>
>> XFS's default mount options are in most cases sub-optimal, we should try
>
> Mkfs options ;)
>
>> to have more sensible defaults, so far I'm following some quick
>> dave-powered
>> recomendations:
>>
>> - version 2 logs
>> - attr2
>> - lazy superblock counters
>> - less allocation groups for single disk configs
>
Version 2 inodes should always be created by default (there are both
userspace and kernel changes required for that).
cheers.
--
Nathan
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 8:55 ` David Chinner
2007-10-29 10:44 ` nscott
@ 2007-10-29 14:01 ` Eric Sandeen
2007-10-29 21:26 ` David Chinner
1 sibling, 1 reply; 52+ messages in thread
From: Eric Sandeen @ 2007-10-29 14:01 UTC (permalink / raw)
To: David Chinner; +Cc: Niv Sardi, xfs
David Chinner wrote:
> On Mon, Oct 29, 2007 at 06:56:57PM +1100, Niv Sardi wrote:
>> Hello,
>>
>> XFS's default mount options are in most cases sub-optimal, we should try
>
> Mkfs options ;)
>
>> to have more sensible defaults, so far I'm following some quick dave-powered
>> recomendations:
>>
>> - version 2 logs
>> - attr2
>> - lazy superblock counters
>> - less allocation groups for single disk configs
>>
>> - imaxpct default can be reduced
>>
>> it is currently 25, what would be reasonable ?
>
> Given that 25% on a 4GB filesystem will allow about 5million inodes,
> I think it's probably reasonable to bring it down to 5% by the time we
> pass 1TB and 1% by 50TB.....
But what does this affect? It's a cap, but it doesn't affect allocation
policy or anything does it? What's the downside to 25%?
-Eric
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 7:56 Default mount options (that suck less) Niv Sardi
2007-10-29 8:55 ` David Chinner
@ 2007-10-29 14:03 ` Eric Sandeen
2007-10-29 15:05 ` Hannes Dorbath
2007-10-29 21:05 ` David Chinner
2007-10-29 15:26 ` Eric Sandeen
` (3 subsequent siblings)
5 siblings, 2 replies; 52+ messages in thread
From: Eric Sandeen @ 2007-10-29 14:03 UTC (permalink / raw)
To: Niv Sardi; +Cc: xfs
Niv Sardi wrote:
> Hello,
>
> XFS's default mount options are in most cases sub-optimal, we should try
> to have more sensible defaults, so far I'm following some quick dave-powered
> recomendations:
>
> - version 2 logs
> - attr2
FWIW any anaconda-installed xfs filesystems have been using attr2 since
FC6, and after the initial pain, I haven't heard any reports of problems.
> - lazy superblock counters
> - less allocation groups for single disk configs
>
> - imaxpct default can be reduced
>
> it is currently 25, what would be reasonable ?
>
> - dropping the ability to turn unwritten extents off completely
>
> please submit your pet-idea for better defaults here.
larger logbuf count/size seems to be the other tuning that's thrown
around a lot.
-Eric
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 14:03 ` Eric Sandeen
@ 2007-10-29 15:05 ` Hannes Dorbath
2007-10-29 15:07 ` Eric Sandeen
2007-10-29 21:05 ` David Chinner
1 sibling, 1 reply; 52+ messages in thread
From: Hannes Dorbath @ 2007-10-29 15:05 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Niv Sardi, xfs
On 29.10.2007 15:03, Eric Sandeen wrote:
> Niv Sardi wrote:
>> XFS's default mount options are in most cases sub-optimal, we should try
>> to have more sensible defaults, so far I'm following some quick dave-powered
>> recomendations:
Is there any reason to not set the default inode size to 512 bytes? ..as
suggested in:
http://www.suse.de/~agruen/acl/linux-acls/online/
--
Regards,
Hannes Dorbath
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 15:05 ` Hannes Dorbath
@ 2007-10-29 15:07 ` Eric Sandeen
2007-10-30 8:40 ` Stewart Smith
0 siblings, 1 reply; 52+ messages in thread
From: Eric Sandeen @ 2007-10-29 15:07 UTC (permalink / raw)
To: Hannes Dorbath; +Cc: Niv Sardi, xfs
Hannes Dorbath wrote:
> On 29.10.2007 15:03, Eric Sandeen wrote:
>> Niv Sardi wrote:
>>> XFS's default mount options are in most cases sub-optimal, we should try
>>> to have more sensible defaults, so far I'm following some quick dave-powered
>>> recomendations:
>
> Is there any reason to not set the default inode size to 512 bytes? ..as
> suggested in:
>
> http://www.suse.de/~agruen/acl/linux-acls/online/
attr2 should help with the problem now... unless there is some common
case where attr2+256 still spills out a lot?
-Eric
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 7:56 Default mount options (that suck less) Niv Sardi
2007-10-29 8:55 ` David Chinner
2007-10-29 14:03 ` Eric Sandeen
@ 2007-10-29 15:26 ` Eric Sandeen
2007-10-29 15:44 ` Chris Wedgwood
2007-10-30 0:45 ` Timothy Shimmin
2007-10-29 23:48 ` David Chinner
` (2 subsequent siblings)
5 siblings, 2 replies; 52+ messages in thread
From: Eric Sandeen @ 2007-10-29 15:26 UTC (permalink / raw)
To: Niv Sardi; +Cc: xfs
Niv Sardi wrote:
> Hello,
>
> XFS's default mount options are in most cases sub-optimal, we should try
> to have more sensible defaults, so far I'm following some quick dave-powered
> recomendations:
>
> - version 2 logs
> - attr2
> - lazy superblock counters
> - less allocation groups for single disk configs
>
> - imaxpct default can be reduced
>
> it is currently 25, what would be reasonable ?
>
> - dropping the ability to turn unwritten extents off completely
>
> please submit your pet-idea for better defaults here.
Sorry for all the replies ;-)
What would you think of a mkfs conf file like e2fsprogs has, which
defines filesystem classes, and defaults for each? (small, news,
largefile, etc...)
-Eric
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 15:26 ` Eric Sandeen
@ 2007-10-29 15:44 ` Chris Wedgwood
2007-10-29 15:51 ` Eric Sandeen
2007-10-30 0:45 ` Timothy Shimmin
1 sibling, 1 reply; 52+ messages in thread
From: Chris Wedgwood @ 2007-10-29 15:44 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Niv Sardi, xfs
On Mon, Oct 29, 2007 at 10:26:44AM -0500, Eric Sandeen wrote:
> What would you think of a mkfs conf file like e2fsprogs has, which
> defines filesystem classes, and defaults for each? (small, news,
> largefile, etc...)
That makes more sense for ext2/3 where some meta-data isn't
dynamically allocated as needed, for example, historically nntp
servers used one file per article and would often run out of inodes.
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 15:44 ` Chris Wedgwood
@ 2007-10-29 15:51 ` Eric Sandeen
0 siblings, 0 replies; 52+ messages in thread
From: Eric Sandeen @ 2007-10-29 15:51 UTC (permalink / raw)
To: Chris Wedgwood; +Cc: Niv Sardi, xfs
Chris Wedgwood wrote:
> On Mon, Oct 29, 2007 at 10:26:44AM -0500, Eric Sandeen wrote:
>
>> What would you think of a mkfs conf file like e2fsprogs has, which
>> defines filesystem classes, and defaults for each? (small, news,
>> largefile, etc...)
>
> That makes more sense for ext2/3 where some meta-data isn't
> dynamically allocated as needed, for example, historically nntp
> servers used one file per article and would often run out of inodes.
well, anything that is fixed at mkfs time could use this... inode size,
ag count, etc. If there are common use cases which would want different
mkfs-fixed defaults, it might make sense.
-Eric
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 14:03 ` Eric Sandeen
2007-10-29 15:05 ` Hannes Dorbath
@ 2007-10-29 21:05 ` David Chinner
1 sibling, 0 replies; 52+ messages in thread
From: David Chinner @ 2007-10-29 21:05 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Niv Sardi, xfs
On Mon, Oct 29, 2007 at 09:03:57AM -0500, Eric Sandeen wrote:
> Niv Sardi wrote:
> > please submit your pet-idea for better defaults here.
>
> larger logbuf count/size seems to be the other tuning that's thrown
> around a lot.
Well, we already default to 8 logbufs, and 256k log buffers are not a
win in a lot of situations. The log buffer size is a mount option,
so it's much easier to tweak once we default to v2 logs...
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 14:01 ` Eric Sandeen
@ 2007-10-29 21:26 ` David Chinner
0 siblings, 0 replies; 52+ messages in thread
From: David Chinner @ 2007-10-29 21:26 UTC (permalink / raw)
To: Eric Sandeen; +Cc: David Chinner, Niv Sardi, xfs
On Mon, Oct 29, 2007 at 09:01:52AM -0500, Eric Sandeen wrote:
> David Chinner wrote:
> > On Mon, Oct 29, 2007 at 06:56:57PM +1100, Niv Sardi wrote:
> >> Hello,
> >>
> >> XFS's default mount options are in most cases sub-optimal, we should try
> >
> > Mkfs options ;)
> >
> >> to have more sensible defaults, so far I'm following some quick dave-powered
> >> recomendations:
> >>
> >> - version 2 logs
> >> - attr2
> >> - lazy superblock counters
> >> - less allocation groups for single disk configs
> >>
> >> - imaxpct default can be reduced
> >>
> >> it is currently 25, what would be reasonable ?
> >
> > Given that 25% on a 4GB filesystem will allow about 5million inodes,
> > I think it's probably reasonable to bring it down to 5% by the time we
> > pass 1TB and 1% by 50TB.....
>
> But what does this affect? It's a cap, but it doesn't affect allocation
> policy or anything does it? What's the downside to 25%?
It reserves allocation groups as "metadata only" for inode32 filesystems
so data doesn't get placed in them untill all other space is full. So at
1TB, we don't use 25% of the filesystem until the other 75% is full, yet
to hold 4 million inodes we only need about 1GB of space. so 5GB out of
1TB gives us space in the filesystem for ~20m million inodes by default.
AFAICT, this is the only place it is used.
Likewise, at 50TB, we're only going to be able to use 2% of the filesystem
for inodes with inode32. At 100TB, it's meaningless.....
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 7:56 Default mount options (that suck less) Niv Sardi
` (2 preceding siblings ...)
2007-10-29 15:26 ` Eric Sandeen
@ 2007-10-29 23:48 ` David Chinner
2007-10-31 23:35 ` Niv Sardi
2007-11-13 4:10 ` RESEND(2) xaiki
5 siblings, 0 replies; 52+ messages in thread
From: David Chinner @ 2007-10-29 23:48 UTC (permalink / raw)
To: Niv Sardi; +Cc: xfs
On Mon, Oct 29, 2007 at 06:56:57PM +1100, Niv Sardi wrote:
> Hello,
>
> XFS's default mount options are in most cases sub-optimal, we should try
> to have more sensible defaults, so far I'm following some quick dave-powered
> recomendations:
>
> - version 2 logs
> - attr2
> - lazy superblock counters
> - less allocation groups for single disk configs
>
> - imaxpct default can be reduced
>
> it is currently 25, what would be reasonable ?
>
> - dropping the ability to turn unwritten extents off completely
>
> please submit your pet-idea for better defaults here.
Another one for you - make the log larger. The kernel code supports
a log of up to 2GB, so mkfs could making a larger log without
requiring changes elsewhere.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 15:26 ` Eric Sandeen
2007-10-29 15:44 ` Chris Wedgwood
@ 2007-10-30 0:45 ` Timothy Shimmin
2007-10-31 11:05 ` James Braid
1 sibling, 1 reply; 52+ messages in thread
From: Timothy Shimmin @ 2007-10-30 0:45 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Niv Sardi, xfs
Eric Sandeen wrote:
> Niv Sardi wrote:
>> Hello,
>>
>> XFS's default mount options are in most cases sub-optimal, we should try
>> to have more sensible defaults, so far I'm following some quick dave-powered
>> recomendations:
>>
>> - version 2 logs
>> - attr2
>> - lazy superblock counters
>> - less allocation groups for single disk configs
>>
>> - imaxpct default can be reduced
>>
>> it is currently 25, what would be reasonable ?
>>
>> - dropping the ability to turn unwritten extents off completely
>>
>> please submit your pet-idea for better defaults here.
>
> Sorry for all the replies ;-)
>
> What would you think of a mkfs conf file like e2fsprogs has, which
> defines filesystem classes, and defaults for each? (small, news,
> largefile, etc...)
>
> -Eric
>
It might be interesting if people let us know what non-default
mkfs and mount options that they are using for their various
configurations/classes.
Didn't Russell C. have some survey years ago - can't remember if
that was for h/ware or what now.
Maybe Dave C. or others have some suggestions from performance runs
for various types of workloads. Do we have this compiled somewhere?
--Tim
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 15:07 ` Eric Sandeen
@ 2007-10-30 8:40 ` Stewart Smith
2007-10-31 4:11 ` Nathan Scott
0 siblings, 1 reply; 52+ messages in thread
From: Stewart Smith @ 2007-10-30 8:40 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Hannes Dorbath, Niv Sardi, xfs
[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]
On Mon, 2007-10-29 at 10:07 -0500, Eric Sandeen wrote:
> Hannes Dorbath wrote:
> > On 29.10.2007 15:03, Eric Sandeen wrote:
> >> Niv Sardi wrote:
> >>> XFS's default mount options are in most cases sub-optimal, we should try
> >>> to have more sensible defaults, so far I'm following some quick dave-powered
> >>> recomendations:
> >
> > Is there any reason to not set the default inode size to 512 bytes? ..as
> > suggested in:
> >
> > http://www.suse.de/~agruen/acl/linux-acls/online/
>
> attr2 should help with the problem now... unless there is some common
> case where attr2+256 still spills out a lot?
Probably SELinux+Beagle attributes?
Attribute "Beagle.Fingerprint" has a 25 byte value
Attribute "Beagle.Uid" has a 22 byte value
Attribute "Beagle.MTime" has a 14 byte value
Attribute "Beagle.Filter" has a 36 byte value
Attribute "Beagle.AttrTime" has a 14 byte value
That's 111bytes just for values...
--
Stewart Smith (stewart@flamingspork.com)
http://www.flamingspork.com/
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-30 8:40 ` Stewart Smith
@ 2007-10-31 4:11 ` Nathan Scott
2007-10-31 4:13 ` Eric Sandeen
0 siblings, 1 reply; 52+ messages in thread
From: Nathan Scott @ 2007-10-31 4:11 UTC (permalink / raw)
To: Stewart Smith; +Cc: Eric Sandeen, Hannes Dorbath, Niv Sardi, xfs
On Tue, 2007-10-30 at 19:40 +1100, Stewart Smith wrote:
>
> Probably SELinux+Beagle attributes?
>
> Attribute "Beagle.Fingerprint" has a 25 byte value
> Attribute "Beagle.Uid" has a 22 byte value
> Attribute "Beagle.MTime" has a 14 byte value
> Attribute "Beagle.Filter" has a 36 byte value
> Attribute "Beagle.AttrTime" has a 14 byte value
>
> That's 111bytes just for values...
and another ~70 bytes for the names.
--
Nathan
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-31 4:11 ` Nathan Scott
@ 2007-10-31 4:13 ` Eric Sandeen
0 siblings, 0 replies; 52+ messages in thread
From: Eric Sandeen @ 2007-10-31 4:13 UTC (permalink / raw)
To: nscott; +Cc: Stewart Smith, Hannes Dorbath, Niv Sardi, xfs
Nathan Scott wrote:
> On Tue, 2007-10-30 at 19:40 +1100, Stewart Smith wrote:
>> Probably SELinux+Beagle attributes?
>>
>> Attribute "Beagle.Fingerprint" has a 25 byte value
>> Attribute "Beagle.Uid" has a 22 byte value
>> Attribute "Beagle.MTime" has a 14 byte value
>> Attribute "Beagle.Filter" has a 36 byte value
>> Attribute "Beagle.AttrTime" has a 14 byte value
>>
>> That's 111bytes just for values...
>
> and another ~70 bytes for the names.
bleah!
Ok, so we can have a "beagle" filesystem type in mkfs.xfs.conf ;-)
-Eric
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-30 0:45 ` Timothy Shimmin
@ 2007-10-31 11:05 ` James Braid
2007-10-31 11:27 ` Justin Piszcz
` (2 more replies)
0 siblings, 3 replies; 52+ messages in thread
From: James Braid @ 2007-10-31 11:05 UTC (permalink / raw)
To: Timothy Shimmin; +Cc: xfs
On 30 Oct 2007, at 00:45, Timothy Shimmin wrote:
> It might be interesting if people let us know what non-default
> mkfs and mount options that they are using for their various
> configurations/classes.
> Didn't Russell C. have some survey years ago - can't remember if
> that was for h/ware or what now.
We have a ~100TB filesystem that was made with the default mkfs.xfs
options from memory. The only mount option we use is inode64.
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-31 11:05 ` James Braid
@ 2007-10-31 11:27 ` Justin Piszcz
2007-11-01 0:47 ` James Braid
2007-10-31 15:21 ` Eric Sandeen
2007-10-31 15:41 ` Chris Wedgwood
2 siblings, 1 reply; 52+ messages in thread
From: Justin Piszcz @ 2007-10-31 11:27 UTC (permalink / raw)
To: James Braid; +Cc: Timothy Shimmin, xfs
On Wed, 31 Oct 2007, James Braid wrote:
> On 30 Oct 2007, at 00:45, Timothy Shimmin wrote:
>> It might be interesting if people let us know what non-default
>> mkfs and mount options that they are using for their various
>> configurations/classes.
>> Didn't Russell C. have some survey years ago - can't remember if
>> that was for h/ware or what now.
>
> We have a ~100TB filesystem that was made with the default mkfs.xfs options
> from memory. The only mount option we use is inode64.
>
Impressive, what architecture do you run? ia64 or x86_64? What
performance differences did you see?
Justin.
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-31 11:05 ` James Braid
2007-10-31 11:27 ` Justin Piszcz
@ 2007-10-31 15:21 ` Eric Sandeen
2007-10-31 15:41 ` Chris Wedgwood
2 siblings, 0 replies; 52+ messages in thread
From: Eric Sandeen @ 2007-10-31 15:21 UTC (permalink / raw)
To: James Braid; +Cc: Timothy Shimmin, xfs
James Braid wrote:
> On 30 Oct 2007, at 00:45, Timothy Shimmin wrote:
>> It might be interesting if people let us know what non-default
>> mkfs and mount options that they are using for their various
>> configurations/classes.
>> Didn't Russell C. have some survey years ago - can't remember if
>> that was for h/ware or what now.
>
> We have a ~100TB filesystem that was made with the default mkfs.xfs
> options from memory. The only mount option we use is inode64.
Hm, which has been another pet peeve of mine; shouldn't inode64 flag the
SB when the first >32bit inode is created? It always bothered me that
inode64 was a mount option which appears to be something you could turn
back off, even though there may be >32bit inodes on disk already.
-Eric
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-31 11:05 ` James Braid
2007-10-31 11:27 ` Justin Piszcz
2007-10-31 15:21 ` Eric Sandeen
@ 2007-10-31 15:41 ` Chris Wedgwood
2007-11-01 0:32 ` James Braid
2 siblings, 1 reply; 52+ messages in thread
From: Chris Wedgwood @ 2007-10-31 15:41 UTC (permalink / raw)
To: James Braid; +Cc: Timothy Shimmin, xfs
On Wed, Oct 31, 2007 at 11:05:09AM +0000, James Braid wrote:
> We have a ~100TB filesystem that was made with the default mkfs.xfs
> options from memory. The only mount option we use is inode64.
Weta? Mostly very large files?
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-29 7:56 Default mount options (that suck less) Niv Sardi
` (3 preceding siblings ...)
2007-10-29 23:48 ` David Chinner
@ 2007-10-31 23:35 ` Niv Sardi
2007-10-31 23:40 ` Niv Sardi
` (3 more replies)
2007-11-13 4:10 ` RESEND(2) xaiki
5 siblings, 4 replies; 52+ messages in thread
From: Niv Sardi @ 2007-10-31 23:35 UTC (permalink / raw)
To: xfs
[-- Attachment #1: Type: text/plain, Size: 2290 bytes --]
Thanks for all your insightfull replys
Here's the state of my xfsprogs/TODO:
DONE - version 2 logs
DONE - attr2
BUG - lazy superblock counters
It looks like it's a fixed bug that should be commited soon:
>[itchy] dmesg -c
>[itchy] dd if=/dev/zero of=blah bs=1 seek=100G count=1
1+0 records in
1+0 records out
1 byte (1 B) copied, 0.00151443 s, 0.7 kB/s
# this is my patched mkfs
>[itchy] mkfs.xfs -f -l lazy-count=1 blah
meta-data=/home/xaiki/blah isize=256 agcount=8, agsize=3276800 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=26214400, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096
log =internal log bsize=4096 blocks=12800, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
>[itchy] mount -o loop blah /mnt
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
>[itchy] dmesg -c
XFS: bad version
XFS: SB validate failed
DONE - version 2 inodes
DONE - dropping the ability to turn unwritten extents off completely
DONE/ASK - imaxpct default can be reduced
> Given that 25% on a 4GB filesystem will allow about 5million inodes,
> I think it's probably reasonable to bring it down to 5% by the time we
> pass 1TB and 1% by 50TB.....
I implemented this as a simple step function, do we need something smarter ?
ASK - larger log
> Another one for you - make the log larger. The kernel code supports
> a log of up to 2GB, so mkfs could making a larger log without
> requiring changes elsewhere.
dchiner told me that we have issues with big logs, anyway, how much shall
I increase the default ?
ASK - less allocation groups for single disk configs
Again, being quite new, I'd need magnitude orders of what's reasonable, I now multiply
by 2 the AG size, witch gives me 2x less AGs.
Eric: mkfs.conf sounds like a great idea to me, but i don't think it should
be exclusive to XFS.
Please find attached the early patches, comments are welcome.
Cheers,
--
Niv
[-- Attachment #2: 0001-Default-to-log-version-2.patch --]
[-- Type: text/plain, Size: 762 bytes --]
>From af7d810cc78c541e91b712cebbfc6a0f342ac38f Mon Sep 17 00:00:00 2001
From: Niv Sardi <xaiki@itchy.(none)>
Date: Mon, 29 Oct 2007 14:56:45 +1100
Subject: [PATCH] Default to log version 2
---
xfsprogs/mkfs/xfs_mkfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 6e84a4e..5f3299d 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -686,7 +686,7 @@ main(
ilflag = imflag = ipflag = isflag = 0;
liflag = laflag = lsflag = ldflag = lvflag = 0;
loginternal = 1;
- logversion = 1;
+ logversion = 2;
logagno = logblocks = rtblocks = rtextblocks = 0;
Nflag = nlflag = nsflag = nvflag = 0;
dirblocklog = dirblocksize = dirversion = 0;
--
1.5.3.4
[-- Attachment #3: 0002-Default-to-version-2-attributes.patch --]
[-- Type: text/plain, Size: 726 bytes --]
>From 92b5a69925f10b42daadad29d2269b71d4f0f23d Mon Sep 17 00:00:00 2001
From: Niv Sardi <xaiki@itchy.(none)>
Date: Mon, 29 Oct 2007 14:57:21 +1100
Subject: [PATCH] Default to version 2 attributes.
---
xfsprogs/mkfs/xfs_mkfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 5f3299d..b378800 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -677,7 +677,7 @@ main(
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- attrversion = 0;
+ attrversion = 2;
blflag = bsflag = slflag = ssflag = lslflag = lssflag = 0;
blocklog = blocksize = 0;
sectorlog = lsectorlog = XFS_MIN_SECTORSIZE_LOG;
--
1.5.3.4
[-- Attachment #4: 0003-Drop-the-ability-to-turn-unwritten-extents-off-compl.patch --]
[-- Type: text/plain, Size: 4762 bytes --]
>From 42508704dfd2674847347c3266aebff20fae77ba Mon Sep 17 00:00:00 2001
From: Niv Sardi <xaiki@cxhome.ath.cx>
Date: Mon, 29 Oct 2007 15:23:22 +1100
Subject: [PATCH] Drop the ability to turn unwritten extents off completly
---
xfsprogs/mkfs/xfs_mkfs.c | 38 +++++++++++++-------------------------
xfsprogs/mkfs/xfs_mkfs.h | 6 +++---
2 files changed, 16 insertions(+), 28 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index b378800..3689eb7 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -56,25 +56,23 @@ char *dopts[] = {
"sunit",
#define D_SWIDTH 5
"swidth",
-#define D_UNWRITTEN 6
- "unwritten",
-#define D_AGSIZE 7
+#define D_AGSIZE 6
"agsize",
-#define D_SU 8
+#define D_SU 7
"su",
-#define D_SW 9
+#define D_SW 8
"sw",
-#define D_SECTLOG 10
+#define D_SECTLOG 9
"sectlog",
-#define D_SECTSIZE 11
+#define D_SECTSIZE 10
"sectsize",
-#define D_NOALIGN 12
+#define D_NOALIGN 11
"noalign",
-#define D_RTINHERIT 13
+#define D_RTINHERIT 12
"rtinherit",
-#define D_PROJINHERIT 14
+#define D_PROJINHERIT 13
"projinherit",
-#define D_EXTSZINHERIT 15
+#define D_EXTSZINHERIT 14
"extszinherit",
NULL
};
@@ -604,7 +602,6 @@ main(
int dsw;
int dsunit;
int dswidth;
- int extent_flagging;
int force_overwrite;
struct fsxattr fsx;
int iaflag;
@@ -697,7 +694,6 @@ main(
dsize = logsize = rtsize = rtextsize = protofile = NULL;
dsu = dsw = dsunit = dswidth = lalign = lsu = lsunit = 0;
nodsflag = norsflag = 0;
- extent_flagging = 1;
force_overwrite = 0;
worst_freelist = 0;
lazy_sb_counters = 0;
@@ -877,14 +873,6 @@ main(
D_NOALIGN);
nodsflag = 1;
break;
- case D_UNWRITTEN:
- if (!value)
- reqval('d', dopts, D_UNWRITTEN);
- c = atoi(value);
- if (c < 0 || c > 1)
- illegal(value, "d unwritten");
- extent_flagging = c;
- break;
case D_SECTLOG:
if (!value)
reqval('d', dopts, D_SECTLOG);
@@ -1990,7 +1978,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
"meta-data=%-22s isize=%-6d agcount=%lld, agsize=%lld blks\n"
" =%-22s sectsz=%-5u attr=%u\n"
"data =%-22s bsize=%-6u blocks=%llu, imaxpct=%u\n"
- " =%-22s sunit=%-6u swidth=%u blks, unwritten=%u\n"
+ " =%-22s sunit=%-6u swidth=%u blks\n"
"naming =version %-14u bsize=%-6u\n"
"log =%-22s bsize=%-6d blocks=%lld, version=%d\n"
" =%-22s sectsz=%-5u sunit=%d blks, lazy-count=%d\n"
@@ -1999,7 +1987,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
"", sectorsize, attrversion,
"", blocksize, (long long)dblocks,
imflag ? imaxpct : XFS_DFL_IMAXIMUM_PCT,
- "", dsunit, dswidth, extent_flagging,
+ "", dsunit, dswidth,
dirversion, dirversion == 1 ? blocksize : dirblocksize,
logfile, 1 << blocklog, (long long)logblocks,
logversion, "", lsectorsize, lsunit, lazy_sb_counters,
@@ -2066,7 +2054,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
}
sbp->sb_features2 = XFS_SB_VERSION2_MKFS(lazy_sb_counters, attrversion == 2, 0);
sbp->sb_versionnum = XFS_SB_VERSION_MKFS(
- iaflag, dsunit != 0, extent_flagging,
+ iaflag, dsunit != 0,
dirversion == 2, logversion == 2, attrversion == 1,
(sectorsize != BBSIZE || lsectorsize != BBSIZE),
sbp->sb_features2 != 0);
@@ -2537,7 +2525,7 @@ usage( void )
/* blocksize */ [-b log=n|size=num]\n\
/* data subvol */ [-d agcount=n,agsize=n,file,name=xxx,size=num,\n\
(sunit=value,swidth=value|su=num,sw=num),\n\
- sectlog=n|sectsize=num,unwritten=0|1]\n\
+ sectlog=n|sectsize=num\n\
/* inode size */ [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2]\n\
/* log subvol */ [-l agnum=n,internal,size=num,logdev=xxx,version=n\n\
sunit=value|su=num,sectlog=n|sectsize=num,\n\
diff --git a/xfsprogs/mkfs/xfs_mkfs.h b/xfsprogs/mkfs/xfs_mkfs.h
index 1ab85fd..f19f917 100644
--- a/xfsprogs/mkfs/xfs_mkfs.h
+++ b/xfsprogs/mkfs/xfs_mkfs.h
@@ -18,12 +18,12 @@
#ifndef __XFS_MKFS_H__
#define __XFS_MKFS_H__
-#define XFS_SB_VERSION_MKFS(ia,dia,extflag,dir2,log2,attr1,sflag,more) (\
- ((ia)||(dia)||(extflag)||(dir2)||(log2)||(attr1)||(sflag)||(more)) ? \
+#define XFS_SB_VERSION_MKFS(ia,dia,dir2,log2,attr1,sflag,more) (\
+ ((ia)||(dia)||(dir2)||(log2)||(attr1)||(sflag)||(more)) ? \
( XFS_SB_VERSION_4 | \
((ia) ? XFS_SB_VERSION_ALIGNBIT : 0) | \
((dia) ? XFS_SB_VERSION_DALIGNBIT : 0) | \
- ((extflag) ? XFS_SB_VERSION_EXTFLGBIT : 0) | \
+ (XFS_SB_VERSION_EXTFLGBIT) | \
((dir2) ? XFS_SB_VERSION_DIRV2BIT : 0) | \
((log2) ? XFS_SB_VERSION_LOGV2BIT : 0) | \
((attr1) ? XFS_SB_VERSION_ATTRBIT : 0) | \
--
1.5.3.4
[-- Attachment #5: 0004-V2-inodes-per-default-and-move-DFL-bits-to-XFS_DFL_.patch --]
[-- Type: text/plain, Size: 1484 bytes --]
>From a9b95cc4636501870155479787ec32b325afa512 Mon Sep 17 00:00:00 2001
From: Niv Sardi <xaiki@cxhome.ath.cx>
Date: Tue, 30 Oct 2007 11:15:33 +1100
Subject: [PATCH] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS,
Activate XFS_SB_VERSION_NLINKBIT per default, witch will enable V2 INODES.
refactor bits that we want everytime in XFS_DFL_SB_VERSION_BITS.
---
xfsprogs/mkfs/xfs_mkfs.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.h b/xfsprogs/mkfs/xfs_mkfs.h
index f19f917..9291e33 100644
--- a/xfsprogs/mkfs/xfs_mkfs.h
+++ b/xfsprogs/mkfs/xfs_mkfs.h
@@ -18,17 +18,19 @@
#ifndef __XFS_MKFS_H__
#define __XFS_MKFS_H__
+#define XFS_DFL_SB_VERSION_BITS XFS_SB_VERSION_NLINKBIT|XFS_SB_VERSION_EXTFLGBIT
+
#define XFS_SB_VERSION_MKFS(ia,dia,dir2,log2,attr1,sflag,more) (\
((ia)||(dia)||(dir2)||(log2)||(attr1)||(sflag)||(more)) ? \
( XFS_SB_VERSION_4 | \
((ia) ? XFS_SB_VERSION_ALIGNBIT : 0) | \
((dia) ? XFS_SB_VERSION_DALIGNBIT : 0) | \
- (XFS_SB_VERSION_EXTFLGBIT) | \
((dir2) ? XFS_SB_VERSION_DIRV2BIT : 0) | \
((log2) ? XFS_SB_VERSION_LOGV2BIT : 0) | \
((attr1) ? XFS_SB_VERSION_ATTRBIT : 0) | \
((sflag) ? XFS_SB_VERSION_SECTORBIT : 0) | \
((more) ? XFS_SB_VERSION_MOREBITSBIT : 0) | \
+ XFS_DFL_SB_VERSION_BITS | \
0 ) : XFS_SB_VERSION_1 )
#define XFS_SB_VERSION2_MKFS(lazycount, attr2, parent) (\
--
1.5.3.4
[-- Attachment #6: 0005-reduce-imaxpct-for-big-filesystems.patch --]
[-- Type: text/plain, Size: 1909 bytes --]
>From c8e590185adb8b48e6765b9de7fe7afa19c6ea20 Mon Sep 17 00:00:00 2001
From: Niv Sardi <xaiki@cxhome.ath.cx>
Date: Tue, 30 Oct 2007 12:26:35 +1100
Subject: [PATCH] reduce imaxpct for big filesystems,
imaxpct is set to 25% for FS < 1 TB,
then 5% for FS < 50 TB,
and then 1%.
It is implemented as a step function in calc_default_imaxpct()
---
xfsprogs/mkfs/xfs_mkfs.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 3689eb7..78c2c77 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -374,6 +374,21 @@ validate_log_size(__uint64_t logblocks, int blocklog, int min_logblocks)
}
}
+int
+calc_default_imaxpct(
+ int blocklog,
+ __uint64_t dblocks)
+{
+ if (dblocks < TERABYTES(1, blocklog)) {
+ return XFS_DFL_IMAXIMUM_PCT;
+ } else if (dblocks < TERABYTES(50, blocklog)) {
+ return 5;
+ }
+
+ return 1;
+}
+
+
void
calc_default_ag_geometry(
int blocklog,
@@ -1986,7 +2001,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
dfile, isize, (long long)agcount, (long long)agsize,
"", sectorsize, attrversion,
"", blocksize, (long long)dblocks,
- imflag ? imaxpct : XFS_DFL_IMAXIMUM_PCT,
+ calc_default_imaxpct(blocklog, dblocks),
"", dsunit, dswidth,
dirversion, dirversion == 1 ? blocksize : dirblocksize,
logfile, 1 << blocklog, (long long)logblocks,
@@ -2023,7 +2038,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
(__uint8_t)(rtextents ?
libxfs_highbit32((unsigned int)rtextents) : 0);
sbp->sb_inprogress = 1; /* mkfs is in progress */
- sbp->sb_imax_pct = imflag ? imaxpct : XFS_DFL_IMAXIMUM_PCT;
+ sbp->sb_imax_pct = calc_default_imaxpct(blocklog, dblocks);
sbp->sb_icount = 0;
sbp->sb_ifree = 0;
sbp->sb_fdblocks = dblocks - agcount * XFS_PREALLOC_BLOCKS(mp) -
--
1.5.3.4
[-- Attachment #7: 0006-less-AGs-for-single-disks-configs.patch --]
[-- Type: text/plain, Size: 3778 bytes --]
>From bab3fed25bc5f44aef5b02af88a8ef968d08ddcb Mon Sep 17 00:00:00 2001
From: Niv Sardi <xaiki@cxhome.ath.cx>
Date: Tue, 30 Oct 2007 12:26:35 +1100
Subject: [PATCH] less AGs for single disks configs.
This patch modifies get_subvol_stripe_wrapper() to return 0 on multi disk configs,
<0 on error, and >0 on single disk configs (Ideally I'd like it to be able to return the
count of disks or something more usefull).
it then uses the output of the new get_subvol_stripe_wrapper() in calc_default_ag_geometry()
to get bigger AGs when in single disk configs (currently only x2 bigger).
---
xfsprogs/include/volume.h | 2 +-
xfsprogs/libdisk/drivers.c | 15 ++++++++-------
xfsprogs/mkfs/xfs_mkfs.c | 18 ++++++++++++------
3 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/xfsprogs/include/volume.h b/xfsprogs/include/volume.h
index 0cc931d..e4cd26c 100644
--- a/xfsprogs/include/volume.h
+++ b/xfsprogs/include/volume.h
@@ -46,7 +46,7 @@ typedef enum sv_type_e {
SVTYPE_LAST =255
} sv_type_t;
-extern void get_subvol_stripe_wrapper (char *, sv_type_t, int *, int *, int *);
+extern int get_subvol_stripe_wrapper (char *, sv_type_t, int *, int *, int *);
extern int get_driver_block_major (const char *, int);
#endif /* __VOLUME_H__ */
diff --git a/xfsprogs/libdisk/drivers.c b/xfsprogs/libdisk/drivers.c
index 26c6ec1..9bdc270 100644
--- a/xfsprogs/libdisk/drivers.c
+++ b/xfsprogs/libdisk/drivers.c
@@ -18,7 +18,7 @@
#include "drivers.h"
-void
+int
get_subvol_stripe_wrapper(
char *dev,
sv_type_t type,
@@ -29,7 +29,7 @@ get_subvol_stripe_wrapper(
struct stat64 sb;
if (dev == NULL)
- return;
+ return -ENODEV;
if (stat64(dev, &sb)) {
fprintf(stderr, _("Cannot stat %s: %s\n"),
@@ -38,16 +38,17 @@ get_subvol_stripe_wrapper(
}
if ( dm_get_subvol_stripe(dev, type, sunit, swidth, sectalign, &sb))
- return;
+ return 0;
if ( md_get_subvol_stripe(dev, type, sunit, swidth, sectalign, &sb))
- return;
+ return 0;
if ( lvm_get_subvol_stripe(dev, type, sunit, swidth, sectalign, &sb))
- return;
+ return 0;
if ( xvm_get_subvol_stripe(dev, type, sunit, swidth, sectalign, &sb))
- return;
+ return 0;
if (evms_get_subvol_stripe(dev, type, sunit, swidth, sectalign, &sb))
- return;
+ return 0;
+ return 1;
/* ... add new device drivers here */
}
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 78c2c77..1eb8cf9 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -393,6 +393,7 @@ void
calc_default_ag_geometry(
int blocklog,
__uint64_t dblocks,
+ int dswidth,
__uint64_t *agsize,
__uint64_t *agcount)
{
@@ -428,12 +429,13 @@ calc_default_ag_geometry(
*
* This scales us up smoothly between min/max AG sizes.
*/
+
if (dblocks > GIGABYTES(512, blocklog))
- shift = 5;
+ shift = 5 - (dswidth == 0);
else if (dblocks > GIGABYTES(8, blocklog))
- shift = 4;
+ shift = 4 - (dswidth == 0);
else if (dblocks >= MEGABYTES(128, blocklog))
- shift = 3;
+ shift = 3 - (dswidth == 0);
else
ASSERT(0);
blocks = dblocks >> shift;
@@ -1771,10 +1773,14 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
agsize /= blocksize;
agcount = dblocks / agsize + (dblocks % agsize != 0);
- } else if (daflag) /* User-specified AG size */
+ } else if (daflag) /* User-specified AG count */
agsize = dblocks / agcount + (dblocks % agcount != 0);
- else
- calc_default_ag_geometry(blocklog, dblocks, &agsize, &agcount);
+ else {
+ get_subvol_stripe_wrapper(dfile, SVTYPE_DATA,
+ &xlv_dsunit, &xlv_dswidth, §oralign);
+
+ calc_default_ag_geometry(blocklog, dblocks, xlv_dswidth, &agsize, &agcount);
+ }
/*
* If the last AG is too small, reduce the filesystem size
--
1.5.3.4
^ permalink raw reply related [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-31 23:35 ` Niv Sardi
@ 2007-10-31 23:40 ` Niv Sardi
2007-11-01 1:17 ` Niv Sardi
2007-11-01 2:27 ` Eric Sandeen
` (2 subsequent siblings)
3 siblings, 1 reply; 52+ messages in thread
From: Niv Sardi @ 2007-10-31 23:40 UTC (permalink / raw)
To: xfs
[-- Attachment #1: Type: text/plain, Size: 78 bytes --]
Oops, the last patch should have been this one, sorry for the noise.
--
Niv
[-- Attachment #2: 0006-less-AGs-for-single-disks-configs.patch --]
[-- Type: text/plain, Size: 3778 bytes --]
>From 1defd8358a7ee693176875ebc3a670a347c87d11 Mon Sep 17 00:00:00 2001
From: Niv Sardi <xaiki@cxhome.ath.cx>
Date: Tue, 30 Oct 2007 12:26:35 +1100
Subject: [PATCH] less AGs for single disks configs.
This patch modifies get_subvol_stripe_wrapper() to return 0 on multi disk configs,
<0 on error, and >0 on single disk configs (Ideally I'd like it to be able to return the
count of disks or something more usefull).
it then uses the output of the new get_subvol_stripe_wrapper() in calc_default_ag_geometry()
to get bigger AGs when in single disk configs (currently only x2 bigger).
---
xfsprogs/include/volume.h | 2 +-
xfsprogs/libdisk/drivers.c | 15 ++++++++-------
xfsprogs/mkfs/xfs_mkfs.c | 18 ++++++++++++------
3 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/xfsprogs/include/volume.h b/xfsprogs/include/volume.h
index 0cc931d..e4cd26c 100644
--- a/xfsprogs/include/volume.h
+++ b/xfsprogs/include/volume.h
@@ -46,7 +46,7 @@ typedef enum sv_type_e {
SVTYPE_LAST =255
} sv_type_t;
-extern void get_subvol_stripe_wrapper (char *, sv_type_t, int *, int *, int *);
+extern int get_subvol_stripe_wrapper (char *, sv_type_t, int *, int *, int *);
extern int get_driver_block_major (const char *, int);
#endif /* __VOLUME_H__ */
diff --git a/xfsprogs/libdisk/drivers.c b/xfsprogs/libdisk/drivers.c
index 26c6ec1..9bdc270 100644
--- a/xfsprogs/libdisk/drivers.c
+++ b/xfsprogs/libdisk/drivers.c
@@ -18,7 +18,7 @@
#include "drivers.h"
-void
+int
get_subvol_stripe_wrapper(
char *dev,
sv_type_t type,
@@ -29,7 +29,7 @@ get_subvol_stripe_wrapper(
struct stat64 sb;
if (dev == NULL)
- return;
+ return -ENODEV;
if (stat64(dev, &sb)) {
fprintf(stderr, _("Cannot stat %s: %s\n"),
@@ -38,16 +38,17 @@ get_subvol_stripe_wrapper(
}
if ( dm_get_subvol_stripe(dev, type, sunit, swidth, sectalign, &sb))
- return;
+ return 0;
if ( md_get_subvol_stripe(dev, type, sunit, swidth, sectalign, &sb))
- return;
+ return 0;
if ( lvm_get_subvol_stripe(dev, type, sunit, swidth, sectalign, &sb))
- return;
+ return 0;
if ( xvm_get_subvol_stripe(dev, type, sunit, swidth, sectalign, &sb))
- return;
+ return 0;
if (evms_get_subvol_stripe(dev, type, sunit, swidth, sectalign, &sb))
- return;
+ return 0;
+ return 1;
/* ... add new device drivers here */
}
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 78c2c77..ea5cd86 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -393,6 +393,7 @@ void
calc_default_ag_geometry(
int blocklog,
__uint64_t dblocks,
+ int singled,
__uint64_t *agsize,
__uint64_t *agcount)
{
@@ -428,12 +429,13 @@ calc_default_ag_geometry(
*
* This scales us up smoothly between min/max AG sizes.
*/
+
if (dblocks > GIGABYTES(512, blocklog))
- shift = 5;
+ shift = 5 - (singled > 0);
else if (dblocks > GIGABYTES(8, blocklog))
- shift = 4;
+ shift = 4 - (singled > 0);
else if (dblocks >= MEGABYTES(128, blocklog))
- shift = 3;
+ shift = 3 - (singled > 0);
else
ASSERT(0);
blocks = dblocks >> shift;
@@ -1771,10 +1773,14 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
agsize /= blocksize;
agcount = dblocks / agsize + (dblocks % agsize != 0);
- } else if (daflag) /* User-specified AG size */
+ } else if (daflag) /* User-specified AG count */
agsize = dblocks / agcount + (dblocks % agcount != 0);
- else
- calc_default_ag_geometry(blocklog, dblocks, &agsize, &agcount);
+ else {
+ calc_default_ag_geometry(blocklog, dblocks,
+ get_subvol_stripe_wrapper(dfile, SVTYPE_DATA,
+ &xlv_dsunit, &xlv_dswidth, §oralign),
+ &agsize, &agcount);
+ }
/*
* If the last AG is too small, reduce the filesystem size
--
1.5.3.4
^ permalink raw reply related [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-31 15:41 ` Chris Wedgwood
@ 2007-11-01 0:32 ` James Braid
0 siblings, 0 replies; 52+ messages in thread
From: James Braid @ 2007-11-01 0:32 UTC (permalink / raw)
To: Chris Wedgwood; +Cc: xfs
On 31 Oct 2007, at 15:41, Chris Wedgwood wrote:
> On Wed, Oct 31, 2007 at 11:05:09AM +0000, James Braid wrote:
>
>> We have a ~100TB filesystem that was made with the default mkfs.xfs
>> options from memory. The only mount option we use is inode64.
>
> Weta? Mostly very large files?
Not weta, but another big vfx company
This particular filesystem is used for nearline backups from a bunch
of NFS servers (which run XFS as well - we love XFS). The average
file size is only about a megabyte.
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-31 11:27 ` Justin Piszcz
@ 2007-11-01 0:47 ` James Braid
0 siblings, 0 replies; 52+ messages in thread
From: James Braid @ 2007-11-01 0:47 UTC (permalink / raw)
To: Justin Piszcz; +Cc: xfs
On 31 Oct 2007, at 11:27, Justin Piszcz wrote:
> Impressive, what architecture do you run? ia64 or x86_64? What
> performance differences did you see?
It's all just commodity hardware - HP DL385 x86_64 server with a pile
of cheap Infortrend RAID arrays. Performance wise we're limited by a
single HBA to the disks, which is fine for this particular
application because we saturate the network first.
xfs_repair takes a good 36 hours or so and 16-ish GB of memory to
run. (we had to run it recently, thanks to a flakey RAID)
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-31 23:40 ` Niv Sardi
@ 2007-11-01 1:17 ` Niv Sardi
0 siblings, 0 replies; 52+ messages in thread
From: Niv Sardi @ 2007-11-01 1:17 UTC (permalink / raw)
To: xfs
[-- Attachment #1: Type: text/plain, Size: 113 bytes --]
After discussing with dave, I changed my mind about the last patch, here's the updated version:
Cheers,
--
Niv
[-- Attachment #2: 0006-less-AGs-for-single-disks-configs.patch --]
[-- Type: text/plain, Size: 2109 bytes --]
>From ce672e92543fa99199ed23fa934dedf8d678924e Mon Sep 17 00:00:00 2001
From: Niv Sardi <xaiki@cxhome.ath.cx>
Date: Tue, 30 Oct 2007 12:26:35 +1100
Subject: [PATCH] less AGs for single disks configs.
get the underlying structure with get_subvol_stripe_wrapper(),
and pass sunit | swidth as an argument to calc_default_ag_geometry().
if it is set, get the AG sizes bigger.
this also cleans up a typo:
- } else if (daflag) /* User-specified AG size */
+ } else if (daflag) /* User-specified AG count */
---
xfsprogs/mkfs/xfs_mkfs.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 78c2c77..4cf9975 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -393,6 +393,7 @@ void
calc_default_ag_geometry(
int blocklog,
__uint64_t dblocks,
+ int multidisk,
__uint64_t *agsize,
__uint64_t *agcount)
{
@@ -428,12 +429,13 @@ calc_default_ag_geometry(
*
* This scales us up smoothly between min/max AG sizes.
*/
+
if (dblocks > GIGABYTES(512, blocklog))
- shift = 5;
+ shift = 5 - (multidisk == 0);
else if (dblocks > GIGABYTES(8, blocklog))
- shift = 4;
+ shift = 4 - (multidisk == 0);
else if (dblocks >= MEGABYTES(128, blocklog))
- shift = 3;
+ shift = 3 - (multidisk == 0);
else
ASSERT(0);
blocks = dblocks >> shift;
@@ -1771,10 +1773,14 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
agsize /= blocksize;
agcount = dblocks / agsize + (dblocks % agsize != 0);
- } else if (daflag) /* User-specified AG size */
+ } else if (daflag) /* User-specified AG count */
agsize = dblocks / agcount + (dblocks % agcount != 0);
- else
- calc_default_ag_geometry(blocklog, dblocks, &agsize, &agcount);
+ else {
+ get_subvol_stripe_wrapper(dfile, SVTYPE_DATA,
+ &xlv_dsunit, &xlv_dswidth, §oralign),
+ calc_default_ag_geometry(blocklog, dblocks, xlv_dsunit | xlv_dswidth,
+ &agsize, &agcount);
+ }
/*
* If the last AG is too small, reduce the filesystem size
--
1.5.3.4
^ permalink raw reply related [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-31 23:35 ` Niv Sardi
2007-10-31 23:40 ` Niv Sardi
@ 2007-11-01 2:27 ` Eric Sandeen
2007-11-12 2:28 ` Niv Sardi
2007-11-12 3:48 ` [[PATCH, RESEND]] Default to log version 2 xaiki
3 siblings, 0 replies; 52+ messages in thread
From: Eric Sandeen @ 2007-11-01 2:27 UTC (permalink / raw)
To: Niv Sardi; +Cc: xfs
Niv Sardi wrote:
> Eric: mkfs.conf sounds like a great idea to me, but i don't think it should
> be exclusive to XFS.
It's not, ext[234] already has it :)
It'd have to be specific to each mkfs, I think, since each mkfs has its
own knobs.
-Eric
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-10-31 23:35 ` Niv Sardi
2007-10-31 23:40 ` Niv Sardi
2007-11-01 2:27 ` Eric Sandeen
@ 2007-11-12 2:28 ` Niv Sardi
2007-11-12 3:10 ` David Chinner
2007-11-12 3:48 ` [[PATCH, RESEND]] Default to log version 2 xaiki
3 siblings, 1 reply; 52+ messages in thread
From: Niv Sardi @ 2007-11-12 2:28 UTC (permalink / raw)
To: xfs
No gnus is bad news ?
Shall I interpret the lack of comments as "everything is fine, just commit the damn thing ?"
Cheers,
--
Niv
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: Default mount options (that suck less).
2007-11-12 2:28 ` Niv Sardi
@ 2007-11-12 3:10 ` David Chinner
0 siblings, 0 replies; 52+ messages in thread
From: David Chinner @ 2007-11-12 3:10 UTC (permalink / raw)
To: Niv Sardi; +Cc: xfs
On Mon, Nov 12, 2007 at 01:28:06PM +1100, Niv Sardi wrote:
> No gnus is bad news ?
>
> Shall I interpret the lack of comments as "everything is fine, just commit the damn thing ?"
Lack of comments to what?
I haven't seen whatever patches you've sent which means wither you
didn't tag the email as "[PATCH N/M]..." or "[REVIEW]..." and I
didn't notice the attachments (nope, I see no patches in my archives
of this thread) or, more likely, a spam filter along the way ate
them. If you get no answer you resend the patches with [PATCH,
RESEND] in the title....
Can you please resend all the patches you want reviewed as a patch
per email?
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 52+ messages in thread
* [[PATCH, RESEND]] Default to log version 2
2007-10-31 23:35 ` Niv Sardi
` (2 preceding siblings ...)
2007-11-12 2:28 ` Niv Sardi
@ 2007-11-12 3:48 ` xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] Default to version 2 attributes xaiki
2007-11-12 6:23 ` [[PATCH, RESEND]] Default to log version 2 David Chinner
3 siblings, 2 replies; 52+ messages in thread
From: xaiki @ 2007-11-12 3:48 UTC (permalink / raw)
To: xfs; +Cc: Niv Sardi
From: Niv Sardi <xaiki@sgi.com>
---
xfsprogs/mkfs/xfs_mkfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 6e84a4e..5f3299d 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -686,7 +686,7 @@ main(
ilflag = imflag = ipflag = isflag = 0;
liflag = laflag = lsflag = ldflag = lvflag = 0;
loginternal = 1;
- logversion = 1;
+ logversion = 2;
logagno = logblocks = rtblocks = rtextblocks = 0;
Nflag = nlflag = nsflag = nvflag = 0;
dirblocklog = dirblocksize = dirversion = 0;
--
1.5.3.5
^ permalink raw reply related [flat|nested] 52+ messages in thread
* [[PATCH, RESEND]] Default to version 2 attributes.
2007-11-12 3:48 ` [[PATCH, RESEND]] Default to log version 2 xaiki
@ 2007-11-12 3:48 ` xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] Drop the ability to turn unwritten extents off completly xaiki
2007-11-12 6:24 ` [[PATCH, RESEND]] Default to version 2 attributes David Chinner
2007-11-12 6:23 ` [[PATCH, RESEND]] Default to log version 2 David Chinner
1 sibling, 2 replies; 52+ messages in thread
From: xaiki @ 2007-11-12 3:48 UTC (permalink / raw)
To: xfs; +Cc: Niv Sardi
From: Niv Sardi <xaiki@sgi.com>
---
xfsprogs/mkfs/xfs_mkfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 5f3299d..b378800 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -677,7 +677,7 @@ main(
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- attrversion = 0;
+ attrversion = 2;
blflag = bsflag = slflag = ssflag = lslflag = lssflag = 0;
blocklog = blocksize = 0;
sectorlog = lsectorlog = XFS_MIN_SECTORSIZE_LOG;
--
1.5.3.5
^ permalink raw reply related [flat|nested] 52+ messages in thread
* [[PATCH, RESEND]] Drop the ability to turn unwritten extents off completly
2007-11-12 3:48 ` [[PATCH, RESEND]] Default to version 2 attributes xaiki
@ 2007-11-12 3:48 ` xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, xaiki
2007-11-12 6:27 ` [[PATCH, RESEND]] Drop the ability to turn unwritten extents off completly David Chinner
2007-11-12 6:24 ` [[PATCH, RESEND]] Default to version 2 attributes David Chinner
1 sibling, 2 replies; 52+ messages in thread
From: xaiki @ 2007-11-12 3:48 UTC (permalink / raw)
To: xfs; +Cc: Niv Sardi
From: Niv Sardi <xaiki@sgi.com>
---
xfsprogs/mkfs/xfs_mkfs.c | 38 +++++++++++++-------------------------
xfsprogs/mkfs/xfs_mkfs.h | 6 +++---
2 files changed, 16 insertions(+), 28 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index b378800..3689eb7 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -56,25 +56,23 @@ char *dopts[] = {
"sunit",
#define D_SWIDTH 5
"swidth",
-#define D_UNWRITTEN 6
- "unwritten",
-#define D_AGSIZE 7
+#define D_AGSIZE 6
"agsize",
-#define D_SU 8
+#define D_SU 7
"su",
-#define D_SW 9
+#define D_SW 8
"sw",
-#define D_SECTLOG 10
+#define D_SECTLOG 9
"sectlog",
-#define D_SECTSIZE 11
+#define D_SECTSIZE 10
"sectsize",
-#define D_NOALIGN 12
+#define D_NOALIGN 11
"noalign",
-#define D_RTINHERIT 13
+#define D_RTINHERIT 12
"rtinherit",
-#define D_PROJINHERIT 14
+#define D_PROJINHERIT 13
"projinherit",
-#define D_EXTSZINHERIT 15
+#define D_EXTSZINHERIT 14
"extszinherit",
NULL
};
@@ -604,7 +602,6 @@ main(
int dsw;
int dsunit;
int dswidth;
- int extent_flagging;
int force_overwrite;
struct fsxattr fsx;
int iaflag;
@@ -697,7 +694,6 @@ main(
dsize = logsize = rtsize = rtextsize = protofile = NULL;
dsu = dsw = dsunit = dswidth = lalign = lsu = lsunit = 0;
nodsflag = norsflag = 0;
- extent_flagging = 1;
force_overwrite = 0;
worst_freelist = 0;
lazy_sb_counters = 0;
@@ -877,14 +873,6 @@ main(
D_NOALIGN);
nodsflag = 1;
break;
- case D_UNWRITTEN:
- if (!value)
- reqval('d', dopts, D_UNWRITTEN);
- c = atoi(value);
- if (c < 0 || c > 1)
- illegal(value, "d unwritten");
- extent_flagging = c;
- break;
case D_SECTLOG:
if (!value)
reqval('d', dopts, D_SECTLOG);
@@ -1990,7 +1978,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
"meta-data=%-22s isize=%-6d agcount=%lld, agsize=%lld blks\n"
" =%-22s sectsz=%-5u attr=%u\n"
"data =%-22s bsize=%-6u blocks=%llu, imaxpct=%u\n"
- " =%-22s sunit=%-6u swidth=%u blks, unwritten=%u\n"
+ " =%-22s sunit=%-6u swidth=%u blks\n"
"naming =version %-14u bsize=%-6u\n"
"log =%-22s bsize=%-6d blocks=%lld, version=%d\n"
" =%-22s sectsz=%-5u sunit=%d blks, lazy-count=%d\n"
@@ -1999,7 +1987,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
"", sectorsize, attrversion,
"", blocksize, (long long)dblocks,
imflag ? imaxpct : XFS_DFL_IMAXIMUM_PCT,
- "", dsunit, dswidth, extent_flagging,
+ "", dsunit, dswidth,
dirversion, dirversion == 1 ? blocksize : dirblocksize,
logfile, 1 << blocklog, (long long)logblocks,
logversion, "", lsectorsize, lsunit, lazy_sb_counters,
@@ -2066,7 +2054,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
}
sbp->sb_features2 = XFS_SB_VERSION2_MKFS(lazy_sb_counters, attrversion == 2, 0);
sbp->sb_versionnum = XFS_SB_VERSION_MKFS(
- iaflag, dsunit != 0, extent_flagging,
+ iaflag, dsunit != 0,
dirversion == 2, logversion == 2, attrversion == 1,
(sectorsize != BBSIZE || lsectorsize != BBSIZE),
sbp->sb_features2 != 0);
@@ -2537,7 +2525,7 @@ usage( void )
/* blocksize */ [-b log=n|size=num]\n\
/* data subvol */ [-d agcount=n,agsize=n,file,name=xxx,size=num,\n\
(sunit=value,swidth=value|su=num,sw=num),\n\
- sectlog=n|sectsize=num,unwritten=0|1]\n\
+ sectlog=n|sectsize=num\n\
/* inode size */ [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2]\n\
/* log subvol */ [-l agnum=n,internal,size=num,logdev=xxx,version=n\n\
sunit=value|su=num,sectlog=n|sectsize=num,\n\
diff --git a/xfsprogs/mkfs/xfs_mkfs.h b/xfsprogs/mkfs/xfs_mkfs.h
index 1ab85fd..f19f917 100644
--- a/xfsprogs/mkfs/xfs_mkfs.h
+++ b/xfsprogs/mkfs/xfs_mkfs.h
@@ -18,12 +18,12 @@
#ifndef __XFS_MKFS_H__
#define __XFS_MKFS_H__
-#define XFS_SB_VERSION_MKFS(ia,dia,extflag,dir2,log2,attr1,sflag,more) (\
- ((ia)||(dia)||(extflag)||(dir2)||(log2)||(attr1)||(sflag)||(more)) ? \
+#define XFS_SB_VERSION_MKFS(ia,dia,dir2,log2,attr1,sflag,more) (\
+ ((ia)||(dia)||(dir2)||(log2)||(attr1)||(sflag)||(more)) ? \
( XFS_SB_VERSION_4 | \
((ia) ? XFS_SB_VERSION_ALIGNBIT : 0) | \
((dia) ? XFS_SB_VERSION_DALIGNBIT : 0) | \
- ((extflag) ? XFS_SB_VERSION_EXTFLGBIT : 0) | \
+ (XFS_SB_VERSION_EXTFLGBIT) | \
((dir2) ? XFS_SB_VERSION_DIRV2BIT : 0) | \
((log2) ? XFS_SB_VERSION_LOGV2BIT : 0) | \
((attr1) ? XFS_SB_VERSION_ATTRBIT : 0) | \
--
1.5.3.5
^ permalink raw reply related [flat|nested] 52+ messages in thread
* [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS,
2007-11-12 3:48 ` [[PATCH, RESEND]] Drop the ability to turn unwritten extents off completly xaiki
@ 2007-11-12 3:48 ` xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] reduce imaxpct for big filesystems, xaiki
2007-11-12 6:31 ` [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, David Chinner
2007-11-12 6:27 ` [[PATCH, RESEND]] Drop the ability to turn unwritten extents off completly David Chinner
1 sibling, 2 replies; 52+ messages in thread
From: xaiki @ 2007-11-12 3:48 UTC (permalink / raw)
To: xfs; +Cc: Niv Sardi
From: Niv Sardi <xaiki@sgi.com>
Activate XFS_SB_VERSION_NLINKBIT per default, witch will enable V2 INODES.
refactor bits that we want everytime in XFS_DFL_SB_VERSION_BITS.
---
xfsprogs/mkfs/xfs_mkfs.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.h b/xfsprogs/mkfs/xfs_mkfs.h
index f19f917..9291e33 100644
--- a/xfsprogs/mkfs/xfs_mkfs.h
+++ b/xfsprogs/mkfs/xfs_mkfs.h
@@ -18,17 +18,19 @@
#ifndef __XFS_MKFS_H__
#define __XFS_MKFS_H__
+#define XFS_DFL_SB_VERSION_BITS XFS_SB_VERSION_NLINKBIT|XFS_SB_VERSION_EXTFLGBIT
+
#define XFS_SB_VERSION_MKFS(ia,dia,dir2,log2,attr1,sflag,more) (\
((ia)||(dia)||(dir2)||(log2)||(attr1)||(sflag)||(more)) ? \
( XFS_SB_VERSION_4 | \
((ia) ? XFS_SB_VERSION_ALIGNBIT : 0) | \
((dia) ? XFS_SB_VERSION_DALIGNBIT : 0) | \
- (XFS_SB_VERSION_EXTFLGBIT) | \
((dir2) ? XFS_SB_VERSION_DIRV2BIT : 0) | \
((log2) ? XFS_SB_VERSION_LOGV2BIT : 0) | \
((attr1) ? XFS_SB_VERSION_ATTRBIT : 0) | \
((sflag) ? XFS_SB_VERSION_SECTORBIT : 0) | \
((more) ? XFS_SB_VERSION_MOREBITSBIT : 0) | \
+ XFS_DFL_SB_VERSION_BITS | \
0 ) : XFS_SB_VERSION_1 )
#define XFS_SB_VERSION2_MKFS(lazycount, attr2, parent) (\
--
1.5.3.5
^ permalink raw reply related [flat|nested] 52+ messages in thread
* [[PATCH, RESEND]] reduce imaxpct for big filesystems,
2007-11-12 3:48 ` [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, xaiki
@ 2007-11-12 3:48 ` xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] less AGs for single disks configs xaiki
2007-11-12 6:33 ` [[PATCH, RESEND]] reduce imaxpct for big filesystems, David Chinner
2007-11-12 6:31 ` [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, David Chinner
1 sibling, 2 replies; 52+ messages in thread
From: xaiki @ 2007-11-12 3:48 UTC (permalink / raw)
To: xfs; +Cc: Niv Sardi
From: Niv Sardi <xaiki@sgi.com>
imaxpct is set to 25% for FS < 1 TB,
then 5% for FS < 50 TB,
and then 1%.
It is implemented as a step function in calc_default_imaxpct()
---
xfsprogs/mkfs/xfs_mkfs.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 3689eb7..78c2c77 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -374,6 +374,21 @@ validate_log_size(__uint64_t logblocks, int blocklog, int min_logblocks)
}
}
+int
+calc_default_imaxpct(
+ int blocklog,
+ __uint64_t dblocks)
+{
+ if (dblocks < TERABYTES(1, blocklog)) {
+ return XFS_DFL_IMAXIMUM_PCT;
+ } else if (dblocks < TERABYTES(50, blocklog)) {
+ return 5;
+ }
+
+ return 1;
+}
+
+
void
calc_default_ag_geometry(
int blocklog,
@@ -1986,7 +2001,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
dfile, isize, (long long)agcount, (long long)agsize,
"", sectorsize, attrversion,
"", blocksize, (long long)dblocks,
- imflag ? imaxpct : XFS_DFL_IMAXIMUM_PCT,
+ calc_default_imaxpct(blocklog, dblocks),
"", dsunit, dswidth,
dirversion, dirversion == 1 ? blocksize : dirblocksize,
logfile, 1 << blocklog, (long long)logblocks,
@@ -2023,7 +2038,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
(__uint8_t)(rtextents ?
libxfs_highbit32((unsigned int)rtextents) : 0);
sbp->sb_inprogress = 1; /* mkfs is in progress */
- sbp->sb_imax_pct = imflag ? imaxpct : XFS_DFL_IMAXIMUM_PCT;
+ sbp->sb_imax_pct = calc_default_imaxpct(blocklog, dblocks);
sbp->sb_icount = 0;
sbp->sb_ifree = 0;
sbp->sb_fdblocks = dblocks - agcount * XFS_PREALLOC_BLOCKS(mp) -
--
1.5.3.5
^ permalink raw reply related [flat|nested] 52+ messages in thread
* [[PATCH, RESEND]] less AGs for single disks configs.
2007-11-12 3:48 ` [[PATCH, RESEND]] reduce imaxpct for big filesystems, xaiki
@ 2007-11-12 3:48 ` xaiki
2007-11-12 9:01 ` David Chinner
2007-11-12 6:33 ` [[PATCH, RESEND]] reduce imaxpct for big filesystems, David Chinner
1 sibling, 1 reply; 52+ messages in thread
From: xaiki @ 2007-11-12 3:48 UTC (permalink / raw)
To: xfs; +Cc: Niv Sardi
From: Niv Sardi <xaiki@sgi.com>
get the underlying structure with get_subvol_stripe_wrapper(),
and pass sunit | swidth as an argument to calc_default_ag_geometry().
if it is set, get the AG sizes bigger.
this also cleans up a typo:
- } else if (daflag) /* User-specified AG size */
+ } else if (daflag) /* User-specified AG count */
---
xfsprogs/mkfs/xfs_mkfs.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 78c2c77..4cf9975 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -393,6 +393,7 @@ void
calc_default_ag_geometry(
int blocklog,
__uint64_t dblocks,
+ int multidisk,
__uint64_t *agsize,
__uint64_t *agcount)
{
@@ -428,12 +429,13 @@ calc_default_ag_geometry(
*
* This scales us up smoothly between min/max AG sizes.
*/
+
if (dblocks > GIGABYTES(512, blocklog))
- shift = 5;
+ shift = 5 - (multidisk == 0);
else if (dblocks > GIGABYTES(8, blocklog))
- shift = 4;
+ shift = 4 - (multidisk == 0);
else if (dblocks >= MEGABYTES(128, blocklog))
- shift = 3;
+ shift = 3 - (multidisk == 0);
else
ASSERT(0);
blocks = dblocks >> shift;
@@ -1771,10 +1773,14 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
agsize /= blocksize;
agcount = dblocks / agsize + (dblocks % agsize != 0);
- } else if (daflag) /* User-specified AG size */
+ } else if (daflag) /* User-specified AG count */
agsize = dblocks / agcount + (dblocks % agcount != 0);
- else
- calc_default_ag_geometry(blocklog, dblocks, &agsize, &agcount);
+ else {
+ get_subvol_stripe_wrapper(dfile, SVTYPE_DATA,
+ &xlv_dsunit, &xlv_dswidth, §oralign),
+ calc_default_ag_geometry(blocklog, dblocks, xlv_dsunit | xlv_dswidth,
+ &agsize, &agcount);
+ }
/*
* If the last AG is too small, reduce the filesystem size
--
1.5.3.5
^ permalink raw reply related [flat|nested] 52+ messages in thread
* Re: [[PATCH, RESEND]] Default to log version 2
2007-11-12 3:48 ` [[PATCH, RESEND]] Default to log version 2 xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] Default to version 2 attributes xaiki
@ 2007-11-12 6:23 ` David Chinner
1 sibling, 0 replies; 52+ messages in thread
From: David Chinner @ 2007-11-12 6:23 UTC (permalink / raw)
To: xaiki; +Cc: xfs
On Mon, Nov 12, 2007 at 02:48:44PM +1100, xaiki@sgi.com wrote:
> From: Niv Sardi <xaiki@sgi.com>
>
Description?
> ---
> xfsprogs/mkfs/xfs_mkfs.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
> index 6e84a4e..5f3299d 100644
> --- a/xfsprogs/mkfs/xfs_mkfs.c
> +++ b/xfsprogs/mkfs/xfs_mkfs.c
> @@ -686,7 +686,7 @@ main(
> ilflag = imflag = ipflag = isflag = 0;
> liflag = laflag = lsflag = ldflag = lvflag = 0;
> loginternal = 1;
> - logversion = 1;
> + logversion = 2;
> logagno = logblocks = rtblocks = rtextblocks = 0;
> Nflag = nlflag = nsflag = nvflag = 0;
> dirblocklog = dirblocksize = dirversion = 0;
ok.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: [[PATCH, RESEND]] Default to version 2 attributes.
2007-11-12 3:48 ` [[PATCH, RESEND]] Default to version 2 attributes xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] Drop the ability to turn unwritten extents off completly xaiki
@ 2007-11-12 6:24 ` David Chinner
1 sibling, 0 replies; 52+ messages in thread
From: David Chinner @ 2007-11-12 6:24 UTC (permalink / raw)
To: xaiki; +Cc: xfs
On Mon, Nov 12, 2007 at 02:48:45PM +1100, xaiki@sgi.com wrote:
> From: Niv Sardi <xaiki@sgi.com>
>
Description?
> ---
> xfsprogs/mkfs/xfs_mkfs.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
> index 5f3299d..b378800 100644
> --- a/xfsprogs/mkfs/xfs_mkfs.c
> +++ b/xfsprogs/mkfs/xfs_mkfs.c
> @@ -677,7 +677,7 @@ main(
> bindtextdomain(PACKAGE, LOCALEDIR);
> textdomain(PACKAGE);
>
> - attrversion = 0;
> + attrversion = 2;
> blflag = bsflag = slflag = ssflag = lslflag = lssflag = 0;
> blocklog = blocksize = 0;
> sectorlog = lsectorlog = XFS_MIN_SECTORSIZE_LOG;
ok.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: [[PATCH, RESEND]] Drop the ability to turn unwritten extents off completly
2007-11-12 3:48 ` [[PATCH, RESEND]] Drop the ability to turn unwritten extents off completly xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, xaiki
@ 2007-11-12 6:27 ` David Chinner
1 sibling, 0 replies; 52+ messages in thread
From: David Chinner @ 2007-11-12 6:27 UTC (permalink / raw)
To: xaiki; +Cc: xfs
On Mon, Nov 12, 2007 at 02:48:46PM +1100, xaiki@sgi.com wrote:
> From: Niv Sardi <xaiki@sgi.com>
>
This needs a good description for why it's being removed and
the man pages need updating. (e.g. mkfs.xfs)
The code looks good, but NACK until the man page updates is done
as well.
Cheers,
dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS,
2007-11-12 3:48 ` [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] reduce imaxpct for big filesystems, xaiki
@ 2007-11-12 6:31 ` David Chinner
2007-11-13 0:51 ` Niv Sardi
1 sibling, 1 reply; 52+ messages in thread
From: David Chinner @ 2007-11-12 6:31 UTC (permalink / raw)
To: xaiki; +Cc: xfs
On Mon, Nov 12, 2007 at 02:48:47PM +1100, xaiki@sgi.com wrote:
> From: Niv Sardi <xaiki@sgi.com>
>
> Activate XFS_SB_VERSION_NLINKBIT per default, witch will enable V2 INODES.
> refactor bits that we want everytime in XFS_DFL_SB_VERSION_BITS.
Yay! A description ;)
s/witch/which/
> ---
> xfsprogs/mkfs/xfs_mkfs.h | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/xfsprogs/mkfs/xfs_mkfs.h b/xfsprogs/mkfs/xfs_mkfs.h
> index f19f917..9291e33 100644
> --- a/xfsprogs/mkfs/xfs_mkfs.h
> +++ b/xfsprogs/mkfs/xfs_mkfs.h
> @@ -18,17 +18,19 @@
> #ifndef __XFS_MKFS_H__
> #define __XFS_MKFS_H__
>
> +#define XFS_DFL_SB_VERSION_BITS XFS_SB_VERSION_NLINKBIT|XFS_SB_VERSION_EXTFLGBIT
> +
I suggest splitting this over multiple lines and calling it
XFS_DEFAULT_SB_VERSION_BITS.
#define XFS_DEFAULT_SB_VERSION_BITS \
(XFS_SB_VERSION_NLINKBIT | \
XFS_SB_VERSION_EXTFLGBIT)
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: [[PATCH, RESEND]] reduce imaxpct for big filesystems,
2007-11-12 3:48 ` [[PATCH, RESEND]] reduce imaxpct for big filesystems, xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] less AGs for single disks configs xaiki
@ 2007-11-12 6:33 ` David Chinner
1 sibling, 0 replies; 52+ messages in thread
From: David Chinner @ 2007-11-12 6:33 UTC (permalink / raw)
To: xaiki; +Cc: xfs
On Mon, Nov 12, 2007 at 02:48:48PM +1100, xaiki@sgi.com wrote:
> From: Niv Sardi <xaiki@sgi.com>
>
> imaxpct is set to 25% for FS < 1 TB,
> then 5% for FS < 50 TB,
> and then 1%.
>
> It is implemented as a step function in calc_default_imaxpct()
> ---
> xfsprogs/mkfs/xfs_mkfs.c | 19 +++++++++++++++++--
> 1 files changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
> index 3689eb7..78c2c77 100644
> --- a/xfsprogs/mkfs/xfs_mkfs.c
> +++ b/xfsprogs/mkfs/xfs_mkfs.c
> @@ -374,6 +374,21 @@ validate_log_size(__uint64_t logblocks, int blocklog, int min_logblocks)
> }
> }
>
> +int
> +calc_default_imaxpct(
static int
> + int blocklog,
> + __uint64_t dblocks)
> +{
> + if (dblocks < TERABYTES(1, blocklog)) {
> + return XFS_DFL_IMAXIMUM_PCT;
> + } else if (dblocks < TERABYTES(50, blocklog)) {
> + return 5;
> + }
> +
> + return 1;
> +}
Comment explaining what it is doing? (i.e. what I had to explain to
you in the first place ;).
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: [[PATCH, RESEND]] less AGs for single disks configs.
2007-11-12 3:48 ` [[PATCH, RESEND]] less AGs for single disks configs xaiki
@ 2007-11-12 9:01 ` David Chinner
2007-11-12 14:57 ` Justin Piszcz
0 siblings, 1 reply; 52+ messages in thread
From: David Chinner @ 2007-11-12 9:01 UTC (permalink / raw)
To: xaiki; +Cc: xfs
On Mon, Nov 12, 2007 at 02:48:49PM +1100, xaiki@sgi.com wrote:
> From: Niv Sardi <xaiki@sgi.com>
>
> get the underlying structure with get_subvol_stripe_wrapper(),
> and pass sunit | swidth as an argument to calc_default_ag_geometry().
>
> if it is set, get the AG sizes bigger.
>
> this also cleans up a typo:
> - } else if (daflag) /* User-specified AG size */
> + } else if (daflag) /* User-specified AG count */
No need to mention that you are cleaning up a typo in the description ;)
> ---
> xfsprogs/mkfs/xfs_mkfs.c | 18 ++++++++++++------
> 1 files changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
> index 78c2c77..4cf9975 100644
> --- a/xfsprogs/mkfs/xfs_mkfs.c
> +++ b/xfsprogs/mkfs/xfs_mkfs.c
> @@ -393,6 +393,7 @@ void
> calc_default_ag_geometry(
> int blocklog,
> __uint64_t dblocks,
> + int multidisk,
> __uint64_t *agsize,
> __uint64_t *agcount)
> {
> @@ -428,12 +429,13 @@ calc_default_ag_geometry(
> *
> * This scales us up smoothly between min/max AG sizes.
> */
> +
> if (dblocks > GIGABYTES(512, blocklog))
> - shift = 5;
> + shift = 5 - (multidisk == 0);
> else if (dblocks > GIGABYTES(8, blocklog))
> - shift = 4;
> + shift = 4 - (multidisk == 0);
> else if (dblocks >= MEGABYTES(128, blocklog))
> - shift = 3;
> + shift = 3 - (multidisk == 0);
> else
> ASSERT(0);
Ok, so now we end up with half the number of allocation groups
at these different sizes. That's not exactly what I had in mind.
basically, what you've done works out as:
> 512GB old = 32 AGs, new = 16AGs
> 8 GB old = 16 AGs, new = 8AGs
> 128MB old = 8 AGs, new = 4AGs
on an 8Gb filesystem we still get 8 AGs, which is far too many.
on a 750GB disk, we still get 16AGs, which to far too many.
A single spindle, regardless of it's size, will have similar
seek characteristics so scaling the number of AGs with size
is the wrong thing to do - you don't get better parallelism
out of a single spindle, just more seeks and lower performance.
hence keeping the number of AGs fixed up to the point where
the AG size tops out (i.e. 4TB) seems like a better scaling
factor to me. i.e. something like:
if (!multidisk) {
if (dblocks >= TERABYTES(4, blocklog)) {
blocks = XFS_AG_MAX_BLOCKS(blocklog);
goto done;
}
agcount = 4;
/* work out ag size here */
goto done;
}
I'd also like to see some test results showing the mkfs output
for the different configurations to confirm it works correctly
(i.e. that the corner cases work correctly).
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: [[PATCH, RESEND]] less AGs for single disks configs.
2007-11-12 9:01 ` David Chinner
@ 2007-11-12 14:57 ` Justin Piszcz
2007-11-12 20:31 ` David Chinner
0 siblings, 1 reply; 52+ messages in thread
From: Justin Piszcz @ 2007-11-12 14:57 UTC (permalink / raw)
To: David Chinner; +Cc: xaiki, xfs
On Mon, 12 Nov 2007, David Chinner wrote:
> On Mon, Nov 12, 2007 at 02:48:49PM +1100, xaiki@sgi.com wrote:
>> From: Niv Sardi <xaiki@sgi.com>
>>
>> get the underlying structure with get_subvol_stripe_wrapper(),
>> and pass sunit | swidth as an argument to calc_default_ag_geometry().
>>
>> if it is set, get the AG sizes bigger.
>>
>> this also cleans up a typo:
>> - } else if (daflag) /* User-specified AG size */
>> + } else if (daflag) /* User-specified AG count */
>
> No need to mention that you are cleaning up a typo in the description ;)
>
>> ---
>> xfsprogs/mkfs/xfs_mkfs.c | 18 ++++++++++++------
>> 1 files changed, 12 insertions(+), 6 deletions(-)
>>
>> diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
>> index 78c2c77..4cf9975 100644
>> --- a/xfsprogs/mkfs/xfs_mkfs.c
>> +++ b/xfsprogs/mkfs/xfs_mkfs.c
>> @@ -393,6 +393,7 @@ void
>> calc_default_ag_geometry(
>> int blocklog,
>> __uint64_t dblocks,
>> + int multidisk,
>> __uint64_t *agsize,
>> __uint64_t *agcount)
>> {
>> @@ -428,12 +429,13 @@ calc_default_ag_geometry(
>> *
>> * This scales us up smoothly between min/max AG sizes.
>> */
>> +
>> if (dblocks > GIGABYTES(512, blocklog))
>> - shift = 5;
>> + shift = 5 - (multidisk == 0);
>> else if (dblocks > GIGABYTES(8, blocklog))
>> - shift = 4;
>> + shift = 4 - (multidisk == 0);
>> else if (dblocks >= MEGABYTES(128, blocklog))
>> - shift = 3;
>> + shift = 3 - (multidisk == 0);
>> else
>> ASSERT(0);
>
> Ok, so now we end up with half the number of allocation groups
> at these different sizes. That's not exactly what I had in mind.
> basically, what you've done works out as:
>
> > 512GB old = 32 AGs, new = 16AGs
> > 8 GB old = 16 AGs, new = 8AGs
> > 128MB old = 8 AGs, new = 4AGs
>
> on an 8Gb filesystem we still get 8 AGs, which is far too many.
> on a 750GB disk, we still get 16AGs, which to far too many.
>
> A single spindle, regardless of it's size, will have similar
> seek characteristics so scaling the number of AGs with size
> is the wrong thing to do - you don't get better parallelism
> out of a single spindle, just more seeks and lower performance.
> hence keeping the number of AGs fixed up to the point where
> the AG size tops out (i.e. 4TB) seems like a better scaling
> factor to me. i.e. something like:
>
>
> if (!multidisk) {
> if (dblocks >= TERABYTES(4, blocklog)) {
> blocks = XFS_AG_MAX_BLOCKS(blocklog);
> goto done;
> }
> agcount = 4;
> /* work out ag size here */
> goto done;
> }
>
> I'd also like to see some test results showing the mkfs output
> for the different configurations to confirm it works correctly
> (i.e. that the corner cases work correctly).
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> Principal Engineer
> SGI Australian Software Group
>
>
Dave, when this is put into place do you recommend people re-format their
XFS partitions for those with a 750GiB drive -or- with a < 2TB RAID5
array, would one see any increase in speed?
Justin.
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: [[PATCH, RESEND]] less AGs for single disks configs.
2007-11-12 14:57 ` Justin Piszcz
@ 2007-11-12 20:31 ` David Chinner
0 siblings, 0 replies; 52+ messages in thread
From: David Chinner @ 2007-11-12 20:31 UTC (permalink / raw)
To: Justin Piszcz; +Cc: xaiki, xfs
On Mon, Nov 12, 2007 at 09:57:21AM -0500, Justin Piszcz wrote:
> On Mon, 12 Nov 2007, David Chinner wrote:
> >A single spindle, regardless of it's size, will have similar
> >seek characteristics so scaling the number of AGs with size
> >is the wrong thing to do - you don't get better parallelism
> >out of a single spindle, just more seeks and lower performance.
> >hence keeping the number of AGs fixed up to the point where
> >the AG size tops out (i.e. 4TB) seems like a better scaling
> >factor to me. i.e. something like:
> >
> >
> > if (!multidisk) {
> > if (dblocks >= TERABYTES(4, blocklog)) {
> > blocks = XFS_AG_MAX_BLOCKS(blocklog);
> > goto done;
> > }
> > agcount = 4;
> > /* work out ag size here */
> > goto done;
> > }
> >
> >I'd also like to see some test results showing the mkfs output
> >for the different configurations to confirm it works correctly
> >(i.e. that the corner cases work correctly).
>
> Dave, when this is put into place do you recommend people re-format their
> XFS partitions for those with a 750GiB drive -or- with a < 2TB RAID5
> array,
No. If you are having performance problems, then changing the way the
filesystem is laid out *may* improve performance but if everything
is working fine then don't change it.
> would one see any increase in speed?
On a single disk, yes. On RAID5 - who knows. There are so many other
variables to raid5 performance (esp software raid) that such single disk
optimisations could degrade performance. On other RAID hardware, it
might improve - it really depends on the RAID implementation....
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 52+ messages in thread
* Re: [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS,
2007-11-12 6:31 ` [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, David Chinner
@ 2007-11-13 0:51 ` Niv Sardi
0 siblings, 0 replies; 52+ messages in thread
From: Niv Sardi @ 2007-11-13 0:51 UTC (permalink / raw)
To: David Chinner; +Cc: xfs
* David Chinner <dgc@sgi.com> [2007-11-12 17:31:36 +1100]:
> On Mon, Nov 12, 2007 at 02:48:47PM +1100, xaiki@sgi.com wrote:
> I suggest splitting this over multiple lines and calling it
> XFS_DEFAULT_SB_VERSION_BITS.
The rest of the file labels defaults as DFL, I feel it's better to keep it that way.
--
Niv
^ permalink raw reply [flat|nested] 52+ messages in thread
* RESEND(2)
2007-10-29 7:56 Default mount options (that suck less) Niv Sardi
` (4 preceding siblings ...)
2007-10-31 23:35 ` Niv Sardi
@ 2007-11-13 4:10 ` xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 1/6] Default to log version 2 xaiki
2007-11-13 4:47 ` RESEND(2) David Chinner
5 siblings, 2 replies; 52+ messages in thread
From: xaiki @ 2007-11-13 4:10 UTC (permalink / raw)
To: xfs
Added descriptions to first patches,
Added extended description for unwritten extents, updated manpages.
Refactored XFS_DFL_SB_VERSION_BITS as suggested by dave.
Added in-code description for reduced imaxpct for big filesystems.
made calc_default_imaxpct stati, as suggested by dave.
Removed mention to cleaning typos ;)
implemented new logics as suggested by dave.
^ permalink raw reply [flat|nested] 52+ messages in thread
* [PATCH TAKE 2 1/6] Default to log version 2
2007-11-13 4:10 ` RESEND(2) xaiki
@ 2007-11-13 4:10 ` xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 2/6] Default to version 2 attributes xaiki
2007-11-13 4:47 ` RESEND(2) David Chinner
1 sibling, 1 reply; 52+ messages in thread
From: xaiki @ 2007-11-13 4:10 UTC (permalink / raw)
To: xfs; +Cc: Niv Sardi
From: Niv Sardi <xaiki@sgi.com>
Change logversion to 2 in xfs_mkfs.c
---
xfsprogs/mkfs/xfs_mkfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 6e84a4e..5f3299d 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -686,7 +686,7 @@ main(
ilflag = imflag = ipflag = isflag = 0;
liflag = laflag = lsflag = ldflag = lvflag = 0;
loginternal = 1;
- logversion = 1;
+ logversion = 2;
logagno = logblocks = rtblocks = rtextblocks = 0;
Nflag = nlflag = nsflag = nvflag = 0;
dirblocklog = dirblocksize = dirversion = 0;
--
1.5.3.5
^ permalink raw reply related [flat|nested] 52+ messages in thread
* [PATCH TAKE 2 2/6] Default to version 2 attributes.
2007-11-13 4:10 ` [PATCH TAKE 2 1/6] Default to log version 2 xaiki
@ 2007-11-13 4:10 ` xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 3/6] Drop the ability to turn unwritten extents off completly xaiki
0 siblings, 1 reply; 52+ messages in thread
From: xaiki @ 2007-11-13 4:10 UTC (permalink / raw)
To: xfs; +Cc: Niv Sardi
From: Niv Sardi <xaiki@sgi.com>
Change attrversion from 0 to 2 in xfs_mkfs.c
---
xfsprogs/mkfs/xfs_mkfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 5f3299d..b378800 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -677,7 +677,7 @@ main(
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- attrversion = 0;
+ attrversion = 2;
blflag = bsflag = slflag = ssflag = lslflag = lssflag = 0;
blocklog = blocksize = 0;
sectorlog = lsectorlog = XFS_MIN_SECTORSIZE_LOG;
--
1.5.3.5
^ permalink raw reply related [flat|nested] 52+ messages in thread
* [PATCH TAKE 2 3/6] Drop the ability to turn unwritten extents off completly
2007-11-13 4:10 ` [PATCH TAKE 2 2/6] Default to version 2 attributes xaiki
@ 2007-11-13 4:10 ` xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 4/6] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, xaiki
0 siblings, 1 reply; 52+ messages in thread
From: xaiki @ 2007-11-13 4:10 UTC (permalink / raw)
To: xfs; +Cc: Niv Sardi
From: Niv Sardi <xaiki@sgi.com>
unwritten extents on linux are generally a bad idea, this option
should not be used.
Remove the mount option from xfs_mkfs.c:
remove it from option list,
remove it from mkfs output.
Update xfs.mkfs manpage.
---
xfsprogs/doc/CHANGES | 1 +
xfsprogs/growfs/xfs_growfs.c | 11 ++++-------
xfsprogs/man/man8/mkfs.xfs.8 | 16 ----------------
xfsprogs/man/man8/xfs_admin.8 | 3 ++-
xfsprogs/mkfs/xfs_mkfs.c | 38 +++++++++++++-------------------------
xfsprogs/mkfs/xfs_mkfs.h | 6 +++---
6 files changed, 23 insertions(+), 52 deletions(-)
diff --git a/xfsprogs/doc/CHANGES b/xfsprogs/doc/CHANGES
index 1858a87..5a3e165 100644
--- a/xfsprogs/doc/CHANGES
+++ b/xfsprogs/doc/CHANGES
@@ -5,6 +5,7 @@ xfsprogs-2.9.x
warning in certain device sizes.
- Man page fixes. Thanks to Utako Kusaka <u-kusaka@wm.jp.nec.com>
for this.
+ - Disable the ability to turn off unwritten extents in mkfs.
xfsprogs-2.9.4 (7 Sep 2007)
- Fixed xfs_repair segfaulting with directory block size different
diff --git a/xfsprogs/growfs/xfs_growfs.c b/xfsprogs/growfs/xfs_growfs.c
index b029e1b..5767f10 100644
--- a/xfsprogs/growfs/xfs_growfs.c
+++ b/xfsprogs/growfs/xfs_growfs.c
@@ -58,7 +58,6 @@ report_info(
int isint,
char *logname,
char *rtname,
- int unwritten,
int lazycount,
int dirversion,
int logversion,
@@ -68,7 +67,7 @@ report_info(
"meta-data=%-22s isize=%-6u agcount=%u, agsize=%u blks\n"
" =%-22s sectsz=%-5u attr=%u\n"
"data =%-22s bsize=%-6u blocks=%llu, imaxpct=%u\n"
- " =%-22s sunit=%-6u swidth=%u blks, unwritten=%u\n"
+ " =%-22s sunit=%-6u swidth=%u blks"
"naming =version %-14u bsize=%-6u\n"
"log =%-22s bsize=%-6u blocks=%u, version=%u\n"
" =%-22s sectsz=%-5u sunit=%u blks, lazy-count=%u\n"
@@ -78,7 +77,7 @@ report_info(
"", geo.sectsize, attrversion,
"", geo.blocksize, (unsigned long long)geo.datablocks,
geo.imaxpct,
- "", geo.sunit, geo.swidth, unwritten,
+ "", geo.sunit, geo.swidth,
dirversion, geo.dirblocksize,
isint ? _("internal") : logname ? logname : _("external"),
geo.blocksize, geo.logblocks, logversion,
@@ -115,7 +114,6 @@ main(int argc, char **argv)
xfs_fsop_geom_t ngeo; /* new fs geometry */
int rflag; /* -r flag */
long long rsize; /* new rt size in fs blocks */
- int unwritten; /* unwritten extent flag */
int lazycount; /* lazy superblock counters */
int xflag; /* -x flag */
char *fname; /* mount point name */
@@ -236,7 +234,6 @@ main(int argc, char **argv)
}
}
isint = geo.logstart > 0;
- unwritten = geo.flags & XFS_FSOP_GEOM_FLAGS_EXTFLG ? 1 : 0;
lazycount = geo.flags & XFS_FSOP_GEOM_FLAGS_LAZYSB ? 1 : 0;
dirversion = geo.flags & XFS_FSOP_GEOM_FLAGS_DIRV2 ? 2 : 1;
logversion = geo.flags & XFS_FSOP_GEOM_FLAGS_LOGV2 ? 2 : 1;
@@ -245,7 +242,7 @@ main(int argc, char **argv)
if (nflag) {
report_info(geo, datadev, isint, logdev, rtdev,
- unwritten, lazycount, dirversion, logversion,
+ lazycount, dirversion, logversion,
attrversion);
exit(0);
}
@@ -282,7 +279,7 @@ main(int argc, char **argv)
}
report_info(geo, datadev, isint, logdev, rtdev,
- unwritten, lazycount, dirversion, logversion,
+ lazycount, dirversion, logversion,
attrversion);
ddsize = xi.dsize;
diff --git a/xfsprogs/man/man8/mkfs.xfs.8 b/xfsprogs/man/man8/mkfs.xfs.8
index 0d27901..b6024c3 100644
--- a/xfsprogs/man/man8/mkfs.xfs.8
+++ b/xfsprogs/man/man8/mkfs.xfs.8
@@ -240,22 +240,6 @@ will automatically query the logical volume for appropriate
and
.B swidth
values.
-.TP
-.BI unwritten[= value ]
-This is used to specify whether unwritten extents are flagged as such,
-or not.
-The
-.I value
-is either 0 or 1, with 1 signifying that unwritten
-extent flagging should occur.
-If the suboption is omitted, unwritten extent flagging is enabled.
-If unwritten extents are flagged, filesystem write performance
-will be negatively affected for preallocated file extents, since
-extra filesystem transactions are required to convert extent flags
-for the range of the file written.
-This suboption should be disabled if the filesystem
-needs to be used on operating system versions which do not support the
-flagging capability.
.RE
.TP
.B \-f
diff --git a/xfsprogs/man/man8/xfs_admin.8 b/xfsprogs/man/man8/xfs_admin.8
index c0017b9..c38a942 100644
--- a/xfsprogs/man/man8/xfs_admin.8
+++ b/xfsprogs/man/man8/xfs_admin.8
@@ -31,7 +31,8 @@ command.
.TP
.B \-e
Enables unwritten extent support on a filesystem that does not
-already have this enabled.
+already have this enabled (for legacy filesystems, it can't be
+disabled anymore at mkfs time).
.TP
.B \-f
Specifies that the filesystem image to be processed is stored in a
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index b378800..3689eb7 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -56,25 +56,23 @@ char *dopts[] = {
"sunit",
#define D_SWIDTH 5
"swidth",
-#define D_UNWRITTEN 6
- "unwritten",
-#define D_AGSIZE 7
+#define D_AGSIZE 6
"agsize",
-#define D_SU 8
+#define D_SU 7
"su",
-#define D_SW 9
+#define D_SW 8
"sw",
-#define D_SECTLOG 10
+#define D_SECTLOG 9
"sectlog",
-#define D_SECTSIZE 11
+#define D_SECTSIZE 10
"sectsize",
-#define D_NOALIGN 12
+#define D_NOALIGN 11
"noalign",
-#define D_RTINHERIT 13
+#define D_RTINHERIT 12
"rtinherit",
-#define D_PROJINHERIT 14
+#define D_PROJINHERIT 13
"projinherit",
-#define D_EXTSZINHERIT 15
+#define D_EXTSZINHERIT 14
"extszinherit",
NULL
};
@@ -604,7 +602,6 @@ main(
int dsw;
int dsunit;
int dswidth;
- int extent_flagging;
int force_overwrite;
struct fsxattr fsx;
int iaflag;
@@ -697,7 +694,6 @@ main(
dsize = logsize = rtsize = rtextsize = protofile = NULL;
dsu = dsw = dsunit = dswidth = lalign = lsu = lsunit = 0;
nodsflag = norsflag = 0;
- extent_flagging = 1;
force_overwrite = 0;
worst_freelist = 0;
lazy_sb_counters = 0;
@@ -877,14 +873,6 @@ main(
D_NOALIGN);
nodsflag = 1;
break;
- case D_UNWRITTEN:
- if (!value)
- reqval('d', dopts, D_UNWRITTEN);
- c = atoi(value);
- if (c < 0 || c > 1)
- illegal(value, "d unwritten");
- extent_flagging = c;
- break;
case D_SECTLOG:
if (!value)
reqval('d', dopts, D_SECTLOG);
@@ -1990,7 +1978,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
"meta-data=%-22s isize=%-6d agcount=%lld, agsize=%lld blks\n"
" =%-22s sectsz=%-5u attr=%u\n"
"data =%-22s bsize=%-6u blocks=%llu, imaxpct=%u\n"
- " =%-22s sunit=%-6u swidth=%u blks, unwritten=%u\n"
+ " =%-22s sunit=%-6u swidth=%u blks\n"
"naming =version %-14u bsize=%-6u\n"
"log =%-22s bsize=%-6d blocks=%lld, version=%d\n"
" =%-22s sectsz=%-5u sunit=%d blks, lazy-count=%d\n"
@@ -1999,7 +1987,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
"", sectorsize, attrversion,
"", blocksize, (long long)dblocks,
imflag ? imaxpct : XFS_DFL_IMAXIMUM_PCT,
- "", dsunit, dswidth, extent_flagging,
+ "", dsunit, dswidth,
dirversion, dirversion == 1 ? blocksize : dirblocksize,
logfile, 1 << blocklog, (long long)logblocks,
logversion, "", lsectorsize, lsunit, lazy_sb_counters,
@@ -2066,7 +2054,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
}
sbp->sb_features2 = XFS_SB_VERSION2_MKFS(lazy_sb_counters, attrversion == 2, 0);
sbp->sb_versionnum = XFS_SB_VERSION_MKFS(
- iaflag, dsunit != 0, extent_flagging,
+ iaflag, dsunit != 0,
dirversion == 2, logversion == 2, attrversion == 1,
(sectorsize != BBSIZE || lsectorsize != BBSIZE),
sbp->sb_features2 != 0);
@@ -2537,7 +2525,7 @@ usage( void )
/* blocksize */ [-b log=n|size=num]\n\
/* data subvol */ [-d agcount=n,agsize=n,file,name=xxx,size=num,\n\
(sunit=value,swidth=value|su=num,sw=num),\n\
- sectlog=n|sectsize=num,unwritten=0|1]\n\
+ sectlog=n|sectsize=num\n\
/* inode size */ [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2]\n\
/* log subvol */ [-l agnum=n,internal,size=num,logdev=xxx,version=n\n\
sunit=value|su=num,sectlog=n|sectsize=num,\n\
diff --git a/xfsprogs/mkfs/xfs_mkfs.h b/xfsprogs/mkfs/xfs_mkfs.h
index 1ab85fd..f19f917 100644
--- a/xfsprogs/mkfs/xfs_mkfs.h
+++ b/xfsprogs/mkfs/xfs_mkfs.h
@@ -18,12 +18,12 @@
#ifndef __XFS_MKFS_H__
#define __XFS_MKFS_H__
-#define XFS_SB_VERSION_MKFS(ia,dia,extflag,dir2,log2,attr1,sflag,more) (\
- ((ia)||(dia)||(extflag)||(dir2)||(log2)||(attr1)||(sflag)||(more)) ? \
+#define XFS_SB_VERSION_MKFS(ia,dia,dir2,log2,attr1,sflag,more) (\
+ ((ia)||(dia)||(dir2)||(log2)||(attr1)||(sflag)||(more)) ? \
( XFS_SB_VERSION_4 | \
((ia) ? XFS_SB_VERSION_ALIGNBIT : 0) | \
((dia) ? XFS_SB_VERSION_DALIGNBIT : 0) | \
- ((extflag) ? XFS_SB_VERSION_EXTFLGBIT : 0) | \
+ (XFS_SB_VERSION_EXTFLGBIT) | \
((dir2) ? XFS_SB_VERSION_DIRV2BIT : 0) | \
((log2) ? XFS_SB_VERSION_LOGV2BIT : 0) | \
((attr1) ? XFS_SB_VERSION_ATTRBIT : 0) | \
--
1.5.3.5
^ permalink raw reply related [flat|nested] 52+ messages in thread
* [PATCH TAKE 2 4/6] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS,
2007-11-13 4:10 ` [PATCH TAKE 2 3/6] Drop the ability to turn unwritten extents off completly xaiki
@ 2007-11-13 4:10 ` xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 5/6] reduce imaxpct for big filesystems, xaiki
0 siblings, 1 reply; 52+ messages in thread
From: xaiki @ 2007-11-13 4:10 UTC (permalink / raw)
To: xfs; +Cc: Niv Sardi
From: Niv Sardi <xaiki@sgi.com>
Activate XFS_SB_VERSION_NLINKBIT per default, which will enable V2 INODES.
refactor bits that we want everytime in XFS_DFL_SB_VERSION_BITS.
---
xfsprogs/mkfs/xfs_mkfs.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.h b/xfsprogs/mkfs/xfs_mkfs.h
index f19f917..5cc841c 100644
--- a/xfsprogs/mkfs/xfs_mkfs.h
+++ b/xfsprogs/mkfs/xfs_mkfs.h
@@ -18,17 +18,21 @@
#ifndef __XFS_MKFS_H__
#define __XFS_MKFS_H__
+#define XFS_DFL_SB_VERSION_BITS \
+ (XFS_SB_VERSION_NLINKBIT | \
+ XFS_SB_VERSION_EXTFLGBIT)
+
#define XFS_SB_VERSION_MKFS(ia,dia,dir2,log2,attr1,sflag,more) (\
((ia)||(dia)||(dir2)||(log2)||(attr1)||(sflag)||(more)) ? \
( XFS_SB_VERSION_4 | \
((ia) ? XFS_SB_VERSION_ALIGNBIT : 0) | \
((dia) ? XFS_SB_VERSION_DALIGNBIT : 0) | \
- (XFS_SB_VERSION_EXTFLGBIT) | \
((dir2) ? XFS_SB_VERSION_DIRV2BIT : 0) | \
((log2) ? XFS_SB_VERSION_LOGV2BIT : 0) | \
((attr1) ? XFS_SB_VERSION_ATTRBIT : 0) | \
((sflag) ? XFS_SB_VERSION_SECTORBIT : 0) | \
((more) ? XFS_SB_VERSION_MOREBITSBIT : 0) | \
+ XFS_DFL_SB_VERSION_BITS | \
0 ) : XFS_SB_VERSION_1 )
#define XFS_SB_VERSION2_MKFS(lazycount, attr2, parent) (\
--
1.5.3.5
^ permalink raw reply related [flat|nested] 52+ messages in thread
* [PATCH TAKE 2 5/6] reduce imaxpct for big filesystems,
2007-11-13 4:10 ` [PATCH TAKE 2 4/6] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, xaiki
@ 2007-11-13 4:10 ` xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 6/6] less AGs for single disks configs xaiki
0 siblings, 1 reply; 52+ messages in thread
From: xaiki @ 2007-11-13 4:10 UTC (permalink / raw)
To: xfs; +Cc: Niv Sardi
From: Niv Sardi <xaiki@sgi.com>
imaxpct is set to 25% (XFS_DFL_IMAXIMUM_PCT) for FS < 1 TB,
then 5% for FS < 50 TB,
and then (over 50 TB) 1%.
It is implemented as a simple step function in calc_default_imaxpct()
---
xfsprogs/mkfs/xfs_mkfs.c | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index 3689eb7..a8af6e2 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -374,6 +374,29 @@ validate_log_size(__uint64_t logblocks, int blocklog, int min_logblocks)
}
}
+static int
+calc_default_imaxpct(
+ int blocklog,
+ __uint64_t dblocks)
+{
+ /*
+ * This returns the % of the disk space that is used for
+ * inodes, it changes relatively to the FS size:
+ * - over 50 TB, use 1%,
+ * - 1TB - 50 TB, use 5%,
+ * - under 1 TB, use XFS_DFL_IMAXIMUM_PCT (25%).
+ */
+
+ if (dblocks < TERABYTES(1, blocklog)) {
+ return XFS_DFL_IMAXIMUM_PCT;
+ } else if (dblocks < TERABYTES(50, blocklog)) {
+ return 5;
+ }
+
+ return 1;
+}
+
+
void
calc_default_ag_geometry(
int blocklog,
@@ -1986,7 +2009,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
dfile, isize, (long long)agcount, (long long)agsize,
"", sectorsize, attrversion,
"", blocksize, (long long)dblocks,
- imflag ? imaxpct : XFS_DFL_IMAXIMUM_PCT,
+ calc_default_imaxpct(blocklog, dblocks),
"", dsunit, dswidth,
dirversion, dirversion == 1 ? blocksize : dirblocksize,
logfile, 1 << blocklog, (long long)logblocks,
@@ -2023,7 +2046,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
(__uint8_t)(rtextents ?
libxfs_highbit32((unsigned int)rtextents) : 0);
sbp->sb_inprogress = 1; /* mkfs is in progress */
- sbp->sb_imax_pct = imflag ? imaxpct : XFS_DFL_IMAXIMUM_PCT;
+ sbp->sb_imax_pct = calc_default_imaxpct(blocklog, dblocks);
sbp->sb_icount = 0;
sbp->sb_ifree = 0;
sbp->sb_fdblocks = dblocks - agcount * XFS_PREALLOC_BLOCKS(mp) -
--
1.5.3.5
^ permalink raw reply related [flat|nested] 52+ messages in thread
* [PATCH TAKE 2 6/6] less AGs for single disks configs.
2007-11-13 4:10 ` [PATCH TAKE 2 5/6] reduce imaxpct for big filesystems, xaiki
@ 2007-11-13 4:10 ` xaiki
0 siblings, 0 replies; 52+ messages in thread
From: xaiki @ 2007-11-13 4:10 UTC (permalink / raw)
To: xfs; +Cc: Niv Sardi
From: Niv Sardi <xaiki@sgi.com>
get the underlying structure with get_subvol_stripe_wrapper(),
and pass sunit | swidth as an argument to calc_default_ag_geometry().
if it is set, we are in single disk, get XFS_AG_MAX_BLOCKS for FS >= 4TB,
and calculate ag numbers regarding to that.
get 4 AGs for FS < 4TB.
we calculate according to blocks or count if we have them, add an assert to
ensure we have one of the 2.
---
xfsprogs/mkfs/xfs_mkfs.c | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/xfsprogs/mkfs/xfs_mkfs.c b/xfsprogs/mkfs/xfs_mkfs.c
index a8af6e2..e15d667 100644
--- a/xfsprogs/mkfs/xfs_mkfs.c
+++ b/xfsprogs/mkfs/xfs_mkfs.c
@@ -401,10 +401,11 @@ void
calc_default_ag_geometry(
int blocklog,
__uint64_t dblocks,
+ int multidisk,
__uint64_t *agsize,
__uint64_t *agcount)
{
- __uint64_t blocks;
+ __uint64_t blocks = 0;
__uint64_t count = 0;
int shift = 0;
@@ -436,6 +437,17 @@ calc_default_ag_geometry(
*
* This scales us up smoothly between min/max AG sizes.
*/
+
+ if (!multidisk) {
+ if (dblocks >= TERABYTES(4, blocklog)) {
+ blocks = XFS_AG_MAX_BLOCKS(blocklog);
+ goto done;
+ }
+ count = 4;
+
+ goto done;
+ }
+
if (dblocks > GIGABYTES(512, blocklog))
shift = 5;
else if (dblocks > GIGABYTES(8, blocklog))
@@ -447,8 +459,12 @@ calc_default_ag_geometry(
blocks = dblocks >> shift;
done:
+ ASSERT (count || blocks);
if (!count)
count = dblocks / blocks + (dblocks % blocks != 0);
+ if (!blocks)
+ blocks = dblocks / count;
+
*agsize = blocks;
*agcount = count;
}
@@ -1779,10 +1795,14 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
agsize /= blocksize;
agcount = dblocks / agsize + (dblocks % agsize != 0);
- } else if (daflag) /* User-specified AG size */
+ } else if (daflag) /* User-specified AG count */
agsize = dblocks / agcount + (dblocks % agcount != 0);
- else
- calc_default_ag_geometry(blocklog, dblocks, &agsize, &agcount);
+ else {
+ get_subvol_stripe_wrapper(dfile, SVTYPE_DATA,
+ &xlv_dsunit, &xlv_dswidth, §oralign),
+ calc_default_ag_geometry(blocklog, dblocks, xlv_dsunit | xlv_dswidth,
+ &agsize, &agcount);
+ }
/*
* If the last AG is too small, reduce the filesystem size
--
1.5.3.5
^ permalink raw reply related [flat|nested] 52+ messages in thread
* Re: RESEND(2)
2007-11-13 4:10 ` RESEND(2) xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 1/6] Default to log version 2 xaiki
@ 2007-11-13 4:47 ` David Chinner
1 sibling, 0 replies; 52+ messages in thread
From: David Chinner @ 2007-11-13 4:47 UTC (permalink / raw)
To: xaiki; +Cc: xfs
On Tue, Nov 13, 2007 at 03:10:51PM +1100, xaiki@sgi.com wrote:
>
> Added descriptions to first patches,
> Added extended description for unwritten extents, updated manpages.
> Refactored XFS_DFL_SB_VERSION_BITS as suggested by dave.
> Added in-code description for reduced imaxpct for big filesystems.
> made calc_default_imaxpct stati, as suggested by dave.
> Removed mention to cleaning typos ;)
> implemented new logics as suggested by dave.
All looks ok now, Niv. Good work.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 52+ messages in thread
end of thread, other threads:[~2007-11-13 4:47 UTC | newest]
Thread overview: 52+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-29 7:56 Default mount options (that suck less) Niv Sardi
2007-10-29 8:55 ` David Chinner
2007-10-29 10:44 ` nscott
2007-10-29 14:01 ` Eric Sandeen
2007-10-29 21:26 ` David Chinner
2007-10-29 14:03 ` Eric Sandeen
2007-10-29 15:05 ` Hannes Dorbath
2007-10-29 15:07 ` Eric Sandeen
2007-10-30 8:40 ` Stewart Smith
2007-10-31 4:11 ` Nathan Scott
2007-10-31 4:13 ` Eric Sandeen
2007-10-29 21:05 ` David Chinner
2007-10-29 15:26 ` Eric Sandeen
2007-10-29 15:44 ` Chris Wedgwood
2007-10-29 15:51 ` Eric Sandeen
2007-10-30 0:45 ` Timothy Shimmin
2007-10-31 11:05 ` James Braid
2007-10-31 11:27 ` Justin Piszcz
2007-11-01 0:47 ` James Braid
2007-10-31 15:21 ` Eric Sandeen
2007-10-31 15:41 ` Chris Wedgwood
2007-11-01 0:32 ` James Braid
2007-10-29 23:48 ` David Chinner
2007-10-31 23:35 ` Niv Sardi
2007-10-31 23:40 ` Niv Sardi
2007-11-01 1:17 ` Niv Sardi
2007-11-01 2:27 ` Eric Sandeen
2007-11-12 2:28 ` Niv Sardi
2007-11-12 3:10 ` David Chinner
2007-11-12 3:48 ` [[PATCH, RESEND]] Default to log version 2 xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] Default to version 2 attributes xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] Drop the ability to turn unwritten extents off completly xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] reduce imaxpct for big filesystems, xaiki
2007-11-12 3:48 ` [[PATCH, RESEND]] less AGs for single disks configs xaiki
2007-11-12 9:01 ` David Chinner
2007-11-12 14:57 ` Justin Piszcz
2007-11-12 20:31 ` David Chinner
2007-11-12 6:33 ` [[PATCH, RESEND]] reduce imaxpct for big filesystems, David Chinner
2007-11-12 6:31 ` [[PATCH, RESEND]] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, David Chinner
2007-11-13 0:51 ` Niv Sardi
2007-11-12 6:27 ` [[PATCH, RESEND]] Drop the ability to turn unwritten extents off completly David Chinner
2007-11-12 6:24 ` [[PATCH, RESEND]] Default to version 2 attributes David Chinner
2007-11-12 6:23 ` [[PATCH, RESEND]] Default to log version 2 David Chinner
2007-11-13 4:10 ` RESEND(2) xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 1/6] Default to log version 2 xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 2/6] Default to version 2 attributes xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 3/6] Drop the ability to turn unwritten extents off completly xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 4/6] V2 inodes per default, and move DFL bits to XFS_DFL_SB_VERSION_BITS, xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 5/6] reduce imaxpct for big filesystems, xaiki
2007-11-13 4:10 ` [PATCH TAKE 2 6/6] less AGs for single disks configs xaiki
2007-11-13 4:47 ` RESEND(2) David Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox