* Is it possible to change sunit of log section post-mkfs
@ 2015-11-03 12:18 Michael Weissenbacher
2015-11-03 13:02 ` Brian Foster
2015-11-03 19:11 ` Dave Chinner
0 siblings, 2 replies; 7+ messages in thread
From: Michael Weissenbacher @ 2015-11-03 12:18 UTC (permalink / raw)
To: xfs
Hi!
I have a XFS file system which lies on a 10-disk RAID-6 device that was
created with Chunk Size = 1MiB.
On mkfs.xfs time this was - as far as i know - specified with "-d
su=1m,sw=8".
xfs_info shows the following:
meta-data=/dev/sdb1 isize=256 agcount=15,
agsize=268435200 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=3905945088, imaxpct=5
= sunit=256 swidth=2048 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=521728, version=2
= sectsz=512 sunit=8 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
Interestingly, the sunit value of the log seems to be incorrect - as it
should be 256 too, like the sunit value of the data. I am pretty sure
the reason is that the log sunit cannot be 256 blks (=1024KiB) and
because of this mkfs.xfs did fall back to the default of 8 blks
(=32KiB). I found evidence of this in the following thread:
http://oss.sgi.com/archives/xfs/2012-06/msg00431.html
What i want to achieve is to set the log sunit to the maximum possible
of 64 blks (=256KiB).
- Is that even possible without doing mkfs.xfs (and losing all data)?
- Would it be an improvement performance-wise?
- Would changing to an external log help?
tia,
Michael
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Is it possible to change sunit of log section post-mkfs
2015-11-03 12:18 Is it possible to change sunit of log section post-mkfs Michael Weissenbacher
@ 2015-11-03 13:02 ` Brian Foster
2015-11-03 19:22 ` Michael Weissenbacher
2015-11-03 19:11 ` Dave Chinner
1 sibling, 1 reply; 7+ messages in thread
From: Brian Foster @ 2015-11-03 13:02 UTC (permalink / raw)
To: Michael Weissenbacher; +Cc: xfs
On Tue, Nov 03, 2015 at 01:18:53PM +0100, Michael Weissenbacher wrote:
> Hi!
> I have a XFS file system which lies on a 10-disk RAID-6 device that was
> created with Chunk Size = 1MiB.
> On mkfs.xfs time this was - as far as i know - specified with "-d
> su=1m,sw=8".
>
> xfs_info shows the following:
> meta-data=/dev/sdb1 isize=256 agcount=15,
> agsize=268435200 blks
> = sectsz=512 attr=2
> data = bsize=4096 blocks=3905945088, imaxpct=5
> = sunit=256 swidth=2048 blks
> naming =version 2 bsize=4096 ascii-ci=0
> log =internal bsize=4096 blocks=521728, version=2
> = sectsz=512 sunit=8 blks, lazy-count=1
> realtime =none extsz=4096 blocks=0, rtextents=0
>
> Interestingly, the sunit value of the log seems to be incorrect - as it
> should be 256 too, like the sunit value of the data. I am pretty sure
> the reason is that the log sunit cannot be 256 blks (=1024KiB) and
> because of this mkfs.xfs did fall back to the default of 8 blks
> (=32KiB). I found evidence of this in the following thread:
> http://oss.sgi.com/archives/xfs/2012-06/msg00431.html
>
> What i want to achieve is to set the log sunit to the maximum possible
> of 64 blks (=256KiB).
>
> - Is that even possible without doing mkfs.xfs (and losing all data)?
> - Would it be an improvement performance-wise?
> - Would changing to an external log help?
>
I don't believe there's any supported way to do this. Out of curiosity,
I just tried an experiment to modify the superblock logsunit via xfs_db
and run repair to zero the log. That seemed to work in terms of taking
effect on the subsequent mount, but that's certainly not something I
would suggest to do in production. Note that mkfs aligns the physical
log based on the stripe unit as well, so it wouldn't really have the
same effect anyways.
Brian
> tia,
> Michael
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Is it possible to change sunit of log section post-mkfs
2015-11-03 12:18 Is it possible to change sunit of log section post-mkfs Michael Weissenbacher
2015-11-03 13:02 ` Brian Foster
@ 2015-11-03 19:11 ` Dave Chinner
2015-11-03 19:32 ` Michael Weissenbacher
1 sibling, 1 reply; 7+ messages in thread
From: Dave Chinner @ 2015-11-03 19:11 UTC (permalink / raw)
To: Michael Weissenbacher; +Cc: xfs
On Tue, Nov 03, 2015 at 01:18:53PM +0100, Michael Weissenbacher wrote:
> Hi!
> I have a XFS file system which lies on a 10-disk RAID-6 device that was
> created with Chunk Size = 1MiB.
> On mkfs.xfs time this was - as far as i know - specified with "-d
> su=1m,sw=8".
>
> xfs_info shows the following:
> meta-data=/dev/sdb1 isize=256 agcount=15,
> agsize=268435200 blks
> = sectsz=512 attr=2
> data = bsize=4096 blocks=3905945088, imaxpct=5
> = sunit=256 swidth=2048 blks
> naming =version 2 bsize=4096 ascii-ci=0
> log =internal bsize=4096 blocks=521728, version=2
> = sectsz=512 sunit=8 blks, lazy-count=1
> realtime =none extsz=4096 blocks=0, rtextents=0
>
> Interestingly, the sunit value of the log seems to be incorrect - as it
> should be 256 too, like the sunit value of the data. I am pretty sure
> the reason is that the log sunit cannot be 256 blks (=1024KiB) and
> because of this mkfs.xfs did fall back to the default of 8 blks
> (=32KiB). I found evidence of this in the following thread:
> http://oss.sgi.com/archives/xfs/2012-06/msg00431.html
>
> What i want to achieve is to set the log sunit to the maximum possible
> of 64 blks (=256KiB).
Why? Is there a performance problem with the default setting?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Is it possible to change sunit of log section post-mkfs
2015-11-03 13:02 ` Brian Foster
@ 2015-11-03 19:22 ` Michael Weissenbacher
2015-11-03 19:39 ` Brian Foster
0 siblings, 1 reply; 7+ messages in thread
From: Michael Weissenbacher @ 2015-11-03 19:22 UTC (permalink / raw)
To: Brian Foster; +Cc: xfs
Hi Brian!
On 2015-11-03 14:02, Brian Foster wrote:
> I don't believe there's any supported way to do this.
Well, at least i didn't miss anything in the documentation :-)
On 2015-11-03 14:02, Brian Foster wrote:
> Out of curiosity,
> I just tried an experiment to modify the superblock logsunit via xfs_db
> and run repair to zero the log. That seemed to work in terms of taking
> effect on the subsequent mount, but that's certainly not something I
> would suggest to do in production.
Ok, so it would definitely be too risky for a production system.
On 2015-11-03 14:02, Brian Foster wrote:
> Note that mkfs aligns the physical
> log based on the stripe unit as well, so it wouldn't really have the
> same effect anyways.
TBH, i didn't quite understand that part :-)
Are you saying, even if i would modify the log's sunit size using
xfs_db, it would still not be aligned correctly?
thanks,
Michael
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Is it possible to change sunit of log section post-mkfs
2015-11-03 19:11 ` Dave Chinner
@ 2015-11-03 19:32 ` Michael Weissenbacher
2015-11-03 19:48 ` Dave Chinner
0 siblings, 1 reply; 7+ messages in thread
From: Michael Weissenbacher @ 2015-11-03 19:32 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
Hi Dave!
>>
>> What i want to achieve is to set the log sunit to the maximum possible
>> of 64 blks (=256KiB).
On 2015-11-03 20:11, Dave Chinner wrote:
>
> Why? Is there a performance problem with the default setting?
>
I am seeing very bad performance of "rm" on this file system. Of course
I know that RAID-6 is kind of a worst case setup for that workload. But
I was hoping that aligning the log correctly plus increasing the stripe
size would help. Wouldn't the file system write more of the log at once
with a bigger sunit size; resulting in fewer RMW cycles?
I am already using delaylog, inode64, nobarrier to mount the fs;
lazy-count=1.
Maybe moving to an external log would be the best option?
tia,
Michael
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Is it possible to change sunit of log section post-mkfs
2015-11-03 19:22 ` Michael Weissenbacher
@ 2015-11-03 19:39 ` Brian Foster
0 siblings, 0 replies; 7+ messages in thread
From: Brian Foster @ 2015-11-03 19:39 UTC (permalink / raw)
To: Michael Weissenbacher; +Cc: xfs
On Tue, Nov 03, 2015 at 08:22:33PM +0100, Michael Weissenbacher wrote:
> Hi Brian!
>
> On 2015-11-03 14:02, Brian Foster wrote:
> > I don't believe there's any supported way to do this.
> Well, at least i didn't miss anything in the documentation :-)
>
> On 2015-11-03 14:02, Brian Foster wrote:
> > Out of curiosity,
> > I just tried an experiment to modify the superblock logsunit via xfs_db
> > and run repair to zero the log. That seemed to work in terms of taking
> > effect on the subsequent mount, but that's certainly not something I
> > would suggest to do in production.
> Ok, so it would definitely be too risky for a production system.
>
> On 2015-11-03 14:02, Brian Foster wrote:
> > Note that mkfs aligns the physical
> > log based on the stripe unit as well, so it wouldn't really have the
> > same effect anyways.
> TBH, i didn't quite understand that part :-)
> Are you saying, even if i would modify the log's sunit size using
> xfs_db, it would still not be aligned correctly?
>
Yes, exactly. mkfs uses the log stripe unit to decide where to put the
log on disk. If the log itself is not aligned, then there's little use
in aligning the writes to the log.
Brian
> thanks,
> Michael
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Is it possible to change sunit of log section post-mkfs
2015-11-03 19:32 ` Michael Weissenbacher
@ 2015-11-03 19:48 ` Dave Chinner
0 siblings, 0 replies; 7+ messages in thread
From: Dave Chinner @ 2015-11-03 19:48 UTC (permalink / raw)
To: Michael Weissenbacher; +Cc: xfs
On Tue, Nov 03, 2015 at 08:32:14PM +0100, Michael Weissenbacher wrote:
> Hi Dave!
>
> >>
> >> What i want to achieve is to set the log sunit to the maximum possible
> >> of 64 blks (=256KiB).
> On 2015-11-03 20:11, Dave Chinner wrote:
> >
> > Why? Is there a performance problem with the default setting?
> >
> I am seeing very bad performance of "rm" on this file system. Of course
> I know that RAID-6 is kind of a worst case setup for that workload. But
> I was hoping that aligning the log correctly plus increasing the stripe
> size would help. Wouldn't the file system write more of the log at once
> with a bigger sunit size; resulting in fewer RMW cycles?
"rm is slow" could be many, many thingsr. Generally rm is limited
by directory/inode read speed, not log IO. You need to find out
exactly what is "slow" in rm before going knob twiddling. Is there
iowait time? If so, what IO is generating the iowait? Is rm CPU bound?
Is the log sleeping waiting for buffer space? is the log tail
pushing? etc, etc.
> I am already using delaylog, inode64, nobarrier to mount the fs;
> lazy-count=1.
IOWs, the defaults.
> Maybe moving to an external log would be the best option?
You haven't even determined that there's a problem with the log yet.
Twiddling knobs does not solve problems. Analyse the problem first,
understand where the "slowness" is coming from, and that
understanding will tell you is there's a knob that you can twiddle
to alleviate the problem.
Keep in mind that if you have lots of inodes, small files and/or
metadata intensive workloads, then it's very likely the RAID setup
is the problem, not the filesystem.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-11-03 19:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 12:18 Is it possible to change sunit of log section post-mkfs Michael Weissenbacher
2015-11-03 13:02 ` Brian Foster
2015-11-03 19:22 ` Michael Weissenbacher
2015-11-03 19:39 ` Brian Foster
2015-11-03 19:11 ` Dave Chinner
2015-11-03 19:32 ` Michael Weissenbacher
2015-11-03 19:48 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox