From: Andrew Clayton <andrew@digital-domain.net>
To: linux-fsdevel@vger.kernel.org
Subject: XFS regression?
Date: Wed, 10 Oct 2007 15:27:42 +0100 [thread overview]
Message-ID: <20071010152742.1b2a7bce@zeus.pccl.info> (raw)
Hi,
(Seeing as I haven't been able to subscribe or post to the XFS mailing
list, I'll try here)
I'll try not to flood with information on the first post.
In trying to track down this issue here:
http://www.spinics.net/lists/raid/msg17195.html
I think I'm seeing a regression in XFS
If I run the following program (This was on an Athlon XP, Seagate IDE,
with a 2.6.23-rc9-git2)
/* fslattest.c */
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <string.h>
int main(int argc, char *argv[])
{
char file[255];
if (argc < 2) {
printf("Usage: fslattest file\n");
exit(1);
}
strncpy(file, argv[1], 254);
printf("Opening %s\n", file);
while (1) {
int testfd = open(file,
O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE,
0600);
close(testfd);
unlink(file);
sleep(1);
}
exit(0);
}
e.g $ strace -T -e open fslattest test
And then after a few seconds run
$ dd if=/dev/zero of=bigfile bs=1M count=500
I see the following
Before dd kicks in
open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3
<0.005043> open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE,
0600) = 3 <0.000212> open("test",
O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3 <0.016844>
while dd is running
open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3
<2.000348> open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE,
0600) = 3 <1.594441> open("test",
O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3 <2.224636>
open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3
<1.074615>
dd stopped
open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3
<0.013224> open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE,
0600) = 3 <0.007109> open("test",
O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3 <0.007108>
Doing the same thing with ext3 shows no such stalls. e.g before, during
and after the above dd
open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3
<0.015423> open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE,
0600) = 3 <0.000092> open("test",
O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3 <0.000093>
open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3
<0.000088> open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE,
0600) = 3 <0.000103> open("test",
O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3 <0.000096>
open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3
<0.000094> open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE,
0600) = 3 <0.000114> open("test",
O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3 <0.000091>
open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE, 0600) = 3
<0.000274> open("test", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_LARGEFILE,
0600) = 3 <0.000107>
I have found a machine in the office to do more testing on and that can
run older kernels.
It seems this problem was introduced between 2.6.18 and 2.6.19.
The other thing I've found is that if I do the dd to an ext3 fs (on
the same disk at least) while running the test in the XFS fs then I
also see the latencies.
I can replicate this behaviour on at least 4 different machines so far.
Just ask it you'd like more details.
Cheers,
Andrew
next reply other threads:[~2007-10-10 17:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-10 14:27 Andrew Clayton [this message]
2007-10-11 1:01 ` XFS regression? David Chinner
2007-10-11 9:05 ` Andrew Clayton
2007-10-11 14:15 ` Andrew Clayton
2007-10-11 21:53 ` David Chinner
2007-10-12 0:26 ` David Chinner
2007-10-12 11:36 ` Andrew Clayton
2007-10-12 13:28 ` Andrew Clayton
[not found] ` <cc7060690710130635u2a85bc28we36b344c0987b691@mail.gmail.com>
2007-10-14 23:09 ` David Chinner
2007-10-15 9:58 ` Bhagi rathi
2007-10-15 11:57 ` David Chinner
2007-10-14 23:19 ` David Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071010152742.1b2a7bce@zeus.pccl.info \
--to=andrew@digital-domain.net \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).