From: Alexander Zarochentsev <zam@namesys.com>
To: reiserfs-list@namesys.com
Cc: "Alec H. Peterson" <ahp@hilander.com>, Hans Reiser <reiser@namesys.com>
Subject: Re: Reiser4 unlink performance
Date: Wed, 1 Mar 2006 18:27:54 +0300 [thread overview]
Message-ID: <200603011827.55282.zam@namesys.com> (raw)
In-Reply-To: <5630744B-8F94-4B23-A228-999F04BD3E58@hilander.com>
On Tuesday 28 February 2006 22:19, Alec H. Peterson wrote:
> Hi Hans,
>
> On Feb 28, 2006, at 12:11, Hans Reiser wrote:
> > Please describe it in more detail.
>
> Well, the error I'm getting is this:
>
> Feb 21 13:10:22 ecbuild-10 kernel: WARNING: Flushing like mad: 16384
>
> The C program I'm running to do the test is this:
All files created by the program below have zero lentgh, correct?
Is it the same program as which triggered 'flushing like mad' ?
>
> main(int argc, char **argv)
> {
> char buf[1024];
> char dir[1024];
> int i,j,k;
> int ret;
> int fd;
> int *sequence;
> struct timeval start, unlinktime, end;
>
> if(argc != 2)
> {
> fprintf(stderr, "Usage: %s <base directory>\n", argv[0]);
> exit(1);
> }
>
> strncpy(dir, argv[1], 1024);
>
> if(chdir(dir))
> {
> perror("chdir");
> exit(1);
> }
>
> for(i = 0; i < 256; i++)
> {
> snprintf(buf, 1024, "%d", i);
> ret = mkdir(buf, S_IRWXU);
> if(ret && (errno != EEXIST))
> {
> perror("mkdir");
> exit(1);
> }
> }
>
>
> {
> sequence = sequence20000;
> gettimeofday(&start, NULL);
> fprintf(stderr, "Starting %d run %d.%d.\n",
> 256 * 20000, start.tv_sec, start.tv_usec);
>
> for(i = 0; i < 256; i++)
> {
> for(j = 0; j < 20000; j++)
> {
> snprintf(buf, 1024, "%d/%d", i, j);
> fd = open(buf, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
> if(fd == -1)
> {
> perror("open");
> exit(1);
> }
> close(fd);
> }
> fprintf(stderr, "Done %d\n", i);
> }
>
> gettimeofday(&unlinktime, NULL);
> fprintf(stderr, "Starting %d unlink %d.%d, elapsed time was
> %d.\n", 256 * 20000, unlinktime.tv_sec, unlinktime.tv_usec,
> unlinktime.tv_sec - start.tv_sec);
>
> for(i = 0; i < 20000; i++)
> {
> for(j = 0; j < 256; j++)
> {
> snprintf(buf, 1024, "%d/%d", j, sequence[i]);
> unlink(buf);
> if(fd == -1)
> {
> perror("unlink");
> exit(1);
> }
> }
> fprintf(stderr, "Done %d\n", i);
> }
>
> gettimeofday(&end, NULL);
> fprintf(stderr, "Done with %d unlink %d.%d, elapsed time was %d.
> \n",
> 20000 * 256, end.tv_sec, end.tv_usec,
> end.tv_sec - unlinktime.tv_sec);
> }
>
> exit(0);
> }
>
> sequence20000 is an array which contains a sequence from 1 to 20000
> randomly ordered.
>
> Alec
>
--
Alex.
next prev parent reply other threads:[~2006-03-01 15:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-22 14:33 Reiser4 unlink performance Alec H. Peterson
[not found] ` <200602262342.23069.zam@namesys.com>
2006-02-28 14:51 ` Alec H. Peterson
2006-02-28 19:11 ` Hans Reiser
2006-02-28 19:19 ` Alec H. Peterson
2006-02-28 19:43 ` Hans Reiser
2006-03-01 15:27 ` Alexander Zarochentsev [this message]
2006-03-01 15:34 ` Alec H. Peterson
2006-02-28 19:48 ` Alexander Zarochentsev
2006-02-28 19:56 ` Hans Reiser
2006-02-28 20:06 ` Alexander Zarochentsev
2006-02-28 20:42 ` Hans Reiser
2006-02-28 21:22 ` Alexander Zarochentsev
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=200603011827.55282.zam@namesys.com \
--to=zam@namesys.com \
--cc=ahp@hilander.com \
--cc=reiser@namesys.com \
--cc=reiserfs-list@namesys.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.