* XFS filesystem performance drop in kernels 2.6.16+
@ 2006-11-09 17:30 Igor A. Valcov
2006-11-09 17:44 ` Eric Sandeen
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Igor A. Valcov @ 2006-11-09 17:30 UTC (permalink / raw)
To: linux-kernel
Hello,
For one of our projects we have a test program that measures file
system performance by writing up to 1000 files simultaneously. After
installing kernel v2.6.16 we noticed that XFS performance dropped by a
factor of 5 (tests that took around 4 minutes on kernel 2.6.15 now
take around 20 minutes to complete). We then checked all kernels
starting from 2.6.16 up to 2.6.19-rc5 with the same unpleasant result.
The funny thing about all this is that we chose XFS for that
particular project specifically because it was about 5 times faster
with the tests than the other file systems. Now they all take about
the same time.
I also noticed that I/O barriers were introduced in v2.6.16 and
thought they may be the cause, but mounting the file system with
'nobarrier' doesn't seem to affect the performance in any way.
Any thoughts on the matter are appreciated.
Thanks in advance,
--
Igor A. Valcov
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: XFS filesystem performance drop in kernels 2.6.16+
2006-11-09 17:30 XFS filesystem performance drop in kernels 2.6.16+ Igor A. Valcov
@ 2006-11-09 17:44 ` Eric Sandeen
2006-11-09 18:08 ` Russell Cattelan
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ messages in thread
From: Eric Sandeen @ 2006-11-09 17:44 UTC (permalink / raw)
To: Igor A. Valcov; +Cc: linux-kernel
Igor A. Valcov wrote:
> Hello,
>
> For one of our projects we have a test program that measures file
> system performance by writing up to 1000 files simultaneously. After
> installing kernel v2.6.16 we noticed that XFS performance dropped by a
> factor of 5 (tests that took around 4 minutes on kernel 2.6.15 now
> take around 20 minutes to complete).
Ouch.
> We then checked all kernels
> starting from 2.6.16 up to 2.6.19-rc5 with the same unpleasant result.
> The funny thing about all this is that we chose XFS for that
> particular project specifically because it was about 5 times faster
> with the tests than the other file systems. Now they all take about
> the same time.
>
> I also noticed that I/O barriers were introduced in v2.6.16 and
> thought they may be the cause, but mounting the file system with
> 'nobarrier' doesn't seem to affect the performance in any way.
>
> Any thoughts on the matter are appreciated.
Can you provide the test?
-Eric
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: XFS filesystem performance drop in kernels 2.6.16+
2006-11-09 17:30 XFS filesystem performance drop in kernels 2.6.16+ Igor A. Valcov
2006-11-09 17:44 ` Eric Sandeen
@ 2006-11-09 18:08 ` Russell Cattelan
2006-11-10 1:10 ` David Chinner
2006-11-10 3:36 ` Eric Sandeen
2006-11-13 20:05 ` Tom Vier
3 siblings, 1 reply; 12+ messages in thread
From: Russell Cattelan @ 2006-11-09 18:08 UTC (permalink / raw)
To: Igor A. Valcov; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]
On Thu, 2006-11-09 at 20:30 +0300, Igor A. Valcov wrote:
> Hello,
>
> For one of our projects we have a test program that measures file
> system performance by writing up to 1000 files simultaneously. After
> installing kernel v2.6.16 we noticed that XFS performance dropped by a
> factor of 5 (tests that took around 4 minutes on kernel 2.6.15 now
> take around 20 minutes to complete). We then checked all kernels
> starting from 2.6.16 up to 2.6.19-rc5 with the same unpleasant result.
> The funny thing about all this is that we chose XFS for that
> particular project specifically because it was about 5 times faster
> with the tests than the other file systems. Now they all take about
> the same time.
>
> I also noticed that I/O barriers were introduced in v2.6.16 and
> thought they may be the cause, but mounting the file system with
> 'nobarrier' doesn't seem to affect the performance in any way.
>
> Any thoughts on the matter are appreciated.
I would try verifying the problem on a non ide disk just
to confirm the write barrier theory.
Also file a bug.
http://oss/sgi.com/bugzilla
include test case and hard description if possible.
>
> Thanks in advance,
--
Russell Cattelan <cattelan@thebarn.com>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: XFS filesystem performance drop in kernels 2.6.16+
2006-11-09 18:08 ` Russell Cattelan
@ 2006-11-10 1:10 ` David Chinner
0 siblings, 0 replies; 12+ messages in thread
From: David Chinner @ 2006-11-10 1:10 UTC (permalink / raw)
To: Russell Cattelan; +Cc: Igor A. Valcov, linux-kernel, xfs
On Thu, Nov 09, 2006 at 12:08:35PM -0600, Russell Cattelan wrote:
> On Thu, 2006-11-09 at 20:30 +0300, Igor A. Valcov wrote:
> > Hello,
> >
> > For one of our projects we have a test program that measures file
> > system performance by writing up to 1000 files simultaneously. After
> > installing kernel v2.6.16 we noticed that XFS performance dropped by a
> > factor of 5 (tests that took around 4 minutes on kernel 2.6.15 now
> > take around 20 minutes to complete). We then checked all kernels
> > starting from 2.6.16 up to 2.6.19-rc5 with the same unpleasant result.
> > The funny thing about all this is that we chose XFS for that
> > particular project specifically because it was about 5 times faster
> > with the tests than the other file systems. Now they all take about
> > the same time.
> >
> > I also noticed that I/O barriers were introduced in v2.6.16 and
> > thought they may be the cause, but mounting the file system with
> > 'nobarrier' doesn't seem to affect the performance in any way.
> >
> > Any thoughts on the matter are appreciated.
> I would try verifying the problem on a non ide disk just
> to confirm the write barrier theory.
>
> Also file a bug.
> http://oss/sgi.com/bugzilla
> include test case and hard description if possible.
and cc xfs@oss.sgi.com on XFS bug reports ;)
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: XFS filesystem performance drop in kernels 2.6.16+
2006-11-09 17:30 XFS filesystem performance drop in kernels 2.6.16+ Igor A. Valcov
2006-11-09 17:44 ` Eric Sandeen
2006-11-09 18:08 ` Russell Cattelan
@ 2006-11-10 3:36 ` Eric Sandeen
2006-11-10 11:59 ` Jan Engelhardt
2006-11-13 20:05 ` Tom Vier
3 siblings, 1 reply; 12+ messages in thread
From: Eric Sandeen @ 2006-11-10 3:36 UTC (permalink / raw)
To: Igor A. Valcov; +Cc: linux-kernel, xfs
Igor A. Valcov wrote:
> I also noticed that I/O barriers were introduced in v2.6.16 and
> thought they may be the cause, but mounting the file system with
> 'nobarrier' doesn't seem to affect the performance in any way.
did this happen to be a remount with nobarrier, or a fresh mount?
-Eric
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: XFS filesystem performance drop in kernels 2.6.16+
2006-11-10 3:36 ` Eric Sandeen
@ 2006-11-10 11:59 ` Jan Engelhardt
2006-11-10 13:16 ` Igor A. Valcov
0 siblings, 1 reply; 12+ messages in thread
From: Jan Engelhardt @ 2006-11-10 11:59 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Igor A. Valcov, linux-kernel, xfs
>> I also noticed that I/O barriers were introduced in v2.6.16 and
>> thought they may be the cause, but mounting the file system with
>> 'nobarrier' doesn't seem to affect the performance in any way.
>
>
> did this happen to be a remount with nobarrier, or a fresh mount?
For the barrier stuff, see
http://lkml.org/lkml/2006/5/19/33
-`J'
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: XFS filesystem performance drop in kernels 2.6.16+
2006-11-10 11:59 ` Jan Engelhardt
@ 2006-11-10 13:16 ` Igor A. Valcov
2006-11-10 14:44 ` Igor A. Valcov
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Igor A. Valcov @ 2006-11-10 13:16 UTC (permalink / raw)
To: linux-kernel, xfs
Below is a simplified version of the test program, and results of
testing different kernels/filesystems/mount options. The results are a
little different from the ones described in the initial post (this
time performance decreased "only" 2 times), but the general tendency
is clearly the same.
============ 2.6.19-rc5-git2 ============
mount -t xfs -o noatime,barrier /dev/sdc1 /mnt/disc
real 16m40.516s
user 0m17.989s
sys 9m36.320s
mount -t xfs -o noatime,nobarrier /dev/sdc1 /mnt/disc
real 15m40.212s
user 0m17.549s
sys 9m29.692s
mount -t ext3 -o noatime /dev/sdc1 /mnt/disc
real 49m44.728s
user 0m27.678s
sys 14m15.689s
============ 2.6.14.6 ============
mount -t xfs -o noatime /dev/sdc1 /mnt/disc
real 9m58.974s
user 0m17.373s
sys 8m4.850s
mount -t ext3 -o noatime /dev/sdc1 /mnt/disc
real 49m7.526s
user 0m26.278s
sys 12m37.627s
========================================
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#define __BYTES 8192
#define __FILES 1000
char buf [__BYTES];
int main ()
{
char fname [1024];
int nFiles [__FILES];
int f, i;
/* Fill buf */
for (i = 0; i < __BYTES; i++)
buf [i] = i % 128;
/* Create and open files */
for (f = 0; f < __FILES; f++) {
sprintf (fname, "/mnt/disc/storage/file-%d", f);
nFiles [f] = open (fname, O_WRONLY | O_CREAT | O_TRUNC, 0644);
}
for (i = 0; i < 262144; i++) {
/* Write data to a big file */
write (nFiles [0], buf, __BYTES);
/* Write data to small files */
for (f = 1; f < __FILES; f++)
write (nFiles [f], &f, sizeof (f));
}
for (f = 0; f < __FILES; f++) {
fsync (nFiles [f]);
close (nFiles [f]);
}
return 0;
}
========================================
--
Igor A. Valcov
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: XFS filesystem performance drop in kernels 2.6.16+
2006-11-10 13:16 ` Igor A. Valcov
@ 2006-11-10 14:44 ` Igor A. Valcov
2006-11-10 17:14 ` Eric Sandeen
2006-11-11 6:52 ` Andrew Morton
2 siblings, 0 replies; 12+ messages in thread
From: Igor A. Valcov @ 2006-11-10 14:44 UTC (permalink / raw)
To: linux-kernel
Is a same test on ext4dev
============ 2.6.19-rc5-git2 ============
mount -t ext4dev -o extents /dev/sdc1 /mnt/disc
real 41m55.445s
user 0m24.242s
sys 14m20.302s
--
Igor A. Valcov
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: XFS filesystem performance drop in kernels 2.6.16+
2006-11-10 13:16 ` Igor A. Valcov
2006-11-10 14:44 ` Igor A. Valcov
@ 2006-11-10 17:14 ` Eric Sandeen
2006-11-11 6:52 ` Andrew Morton
2 siblings, 0 replies; 12+ messages in thread
From: Eric Sandeen @ 2006-11-10 17:14 UTC (permalink / raw)
To: Igor A. Valcov; +Cc: linux-kernel, xfs
Igor A. Valcov wrote:
> Below is a simplified version of the test program, and results of
> testing different kernels/filesystems/mount options. The results are a
> little different from the ones described in the initial post (this
> time performance decreased "only" 2 times), but the general tendency
> is clearly the same.
I imagine that I know the answer, but to be sure you might put some time
checks into your test app to see -which- portion of the test is taking
the bulk of the time.
-Eric
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: XFS filesystem performance drop in kernels 2.6.16+
2006-11-10 13:16 ` Igor A. Valcov
2006-11-10 14:44 ` Igor A. Valcov
2006-11-10 17:14 ` Eric Sandeen
@ 2006-11-11 6:52 ` Andrew Morton
2006-11-11 10:55 ` Jan Engelhardt
2 siblings, 1 reply; 12+ messages in thread
From: Andrew Morton @ 2006-11-11 6:52 UTC (permalink / raw)
To: Igor A. Valcov; +Cc: linux-kernel, xfs
On Fri, 10 Nov 2006 16:16:27 +0300
"Igor A. Valcov" <viaprog@gmail.com> wrote:
> Below is a simplified version of the test program,
Boy, I hope not. The results of this test program are of very little interest.
> for (i = 0; i < 262144; i++) {
> /* Write data to a big file */
> write (nFiles [0], buf, __BYTES);
>
> /* Write data to small files */
> for (f = 1; f < __FILES; f++)
> write (nFiles [f], &f, sizeof (f));
> }
This sits in a loop doing write(fd, buf, 4). This is wildly inefficient -
you'd get a 10x throughput benefit and maybe 100x reduction in CPU cost
simply by switching to fwrite().
I suspect something went wrong here.
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: XFS filesystem performance drop in kernels 2.6.16+
2006-11-11 6:52 ` Andrew Morton
@ 2006-11-11 10:55 ` Jan Engelhardt
0 siblings, 0 replies; 12+ messages in thread
From: Jan Engelhardt @ 2006-11-11 10:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: Igor A. Valcov, linux-kernel, xfs
>> for (i = 0; i < 262144; i++) {
>> /* Write data to a big file */
>> write (nFiles [0], buf, __BYTES);
>>
>> /* Write data to small files */
>> for (f = 1; f < __FILES; f++)
>> write (nFiles [f], &f, sizeof (f));
>> }
>
>This sits in a loop doing write(fd, buf, 4). This is wildly inefficient -
>you'd get a 10x throughput benefit and maybe 100x reduction in CPU cost
>simply by switching to fwrite().
Well yes and no. The problem here is the syscall overhead. fwrite
buffers things, so needless syscalls are avoided.
The same could be done by changing the program logic and increasing the
size argument to read/write.
>I suspect something went wrong here.
Design error. :)
-`J'
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: XFS filesystem performance drop in kernels 2.6.16+
2006-11-09 17:30 XFS filesystem performance drop in kernels 2.6.16+ Igor A. Valcov
` (2 preceding siblings ...)
2006-11-10 3:36 ` Eric Sandeen
@ 2006-11-13 20:05 ` Tom Vier
3 siblings, 0 replies; 12+ messages in thread
From: Tom Vier @ 2006-11-13 20:05 UTC (permalink / raw)
To: linux-kernel
On Thu, Nov 09, 2006 at 08:30:23PM +0300, Igor A. Valcov wrote:
> I also noticed that I/O barriers were introduced in v2.6.16 and
> thought they may be the cause, but mounting the file system with
> 'nobarrier' doesn't seem to affect the performance in any way.
I don't know if it's related, but i played with a few fs'es a few months ago
and both xfs and reiser4 were very slow. iirc, they both took about 45min
longer than reiserfs and jfs to copy 70 or 80gigs of files from another
drive.
I suspected delayed allocation was the culprit (both r4 and xfs use DA).
Never really looked into it much, however.
--
Tom Vier <tmv@comcast.net>
DSA Key ID 0x15741ECE
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2006-11-13 20:05 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-09 17:30 XFS filesystem performance drop in kernels 2.6.16+ Igor A. Valcov
2006-11-09 17:44 ` Eric Sandeen
2006-11-09 18:08 ` Russell Cattelan
2006-11-10 1:10 ` David Chinner
2006-11-10 3:36 ` Eric Sandeen
2006-11-10 11:59 ` Jan Engelhardt
2006-11-10 13:16 ` Igor A. Valcov
2006-11-10 14:44 ` Igor A. Valcov
2006-11-10 17:14 ` Eric Sandeen
2006-11-11 6:52 ` Andrew Morton
2006-11-11 10:55 ` Jan Engelhardt
2006-11-13 20:05 ` Tom Vier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox