mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@arcor.de>
To: Paul P Komkoff Jr <i@stingr.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [STUPID TESTCASE] ext3 htree vs. reiserfs on 2.5.40-mm1
Date: Tue, 1 Oct 2002 23:27:50 +0200	[thread overview]
Message-ID: <E17wUYa-0006Dl-00@starship> (raw)
In-Reply-To: <20021001195914.GC6318@stingr.net>

[-- Attachment #1: Type: text/plain, Size: 1525 bytes --]

On Tuesday 01 October 2002 21:59, Paul P Komkoff Jr wrote:
> This is the stupidiest testcase I've done but it worth seeing (maybe)
> 
> We create 300000 files

How big are the files?

> named from 00000000 to 000493E0 in one directory, then delete it in order.

You probably want to try creating the files in random order as well.  A
program to do that is attached, use in the form:

    randfiles <basename> <count> y

where 'y' means 'print the names', for debugging purposes.

What did your delete command look like, "rm -rf" or "echo * | xargs rm"?

> Tests taken on ext3+htree and reiserfs. ext3 w/o htree hadn't
> evaluated because it will take long long time ...
> 
> both filesystems was mounted with noatime,nodiratime and ext3 was
> data=writeback to be somewhat fair ...
> 
> 	       	real 	      	user  		sys
> reiserfs:
> Creating: 	3m13.208s	0m4.412s	2m54.404s
> Deleting:	4m41.250s	0m4.206s	4m17.926s
> 
> Ext3:
> Creating:	4m9.331s	0m3.927s	2m21.757s
> Deleting:	9m14.838s	0m3.446s	1m39.508s
> 
> htree improved this a much but it still beaten by reiserfs. seems odd
> to me - deleting taking twice time then creating ...

Only 300,000 files, you haven't got enough to cause inode table thrashing,
though some kernels shrink the inode cache too agressively and that can
cause thrashing at lower numbers.  Maybe a bottleneck in the journal?

Not that anybody is going to complain about any of the above - it's still
running less than 1 ms/create, 2 ms/delete.  Still, it's slower than I'm
used to.

-- 
Daniel

[-- Attachment #2: randfiles.c --]
[-- Type: text/x-c, Size: 539 bytes --]

#include <stdlib.h>

#define swap(x, y) do { typeof(x) z = x; x = y; y = z; } while (0)

int main (int argc, char *argv[])
{
	int n = (argc > 2)? strtol(argv[2], 0, 10): 0;
	int i, size = 50, show = argc > 3 && !strncmp(argv[3], "y", 1);
	char name[size];
	int choose[n];

	for (i = 0; i < n; i++) choose[i] = i;
	for (i = n; i; i--) swap(choose[i-1], choose[rand() % i]);
	for (i = 0; i < n; i++)
	{
		snprintf(name, size, "%s%i", argv[1], choose[i]);
		if (show) printf("create %s\n", name);
		close(open(name, 0100));
	}
	return 0;
}



  parent reply	other threads:[~2002-10-01 21:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-01 19:59 Paul P Komkoff Jr
2002-10-01 20:43 ` Hans Reiser
2002-10-01 20:49   ` Hans Reiser
2002-10-01 21:17     ` Rik van Riel
2002-10-01 21:31     ` Daniel Phillips
2002-10-01 20:43 ` Andreas Dilger
2002-10-01 21:19   ` Hans Reiser
2002-10-02 10:48   ` Paul P Komkoff Jr
2002-10-02 16:54     ` Andreas Dilger
2002-10-03  0:37       ` [Ext2-devel] " Theodore Ts'o
2002-10-03 12:04         ` Hans Reiser
2002-10-03 19:40           ` Theodore Ts'o
2002-10-03 19:44             ` Hans Reiser
2002-10-04 15:53   ` Oleg Drokin
2002-10-04 17:09     ` [Ext2-devel] " Andreas Dilger
2002-10-07  6:54       ` Oleg Drokin
2002-10-10  0:27       ` Daniel Phillips
2002-10-01 21:27 ` Daniel Phillips [this message]
2002-10-02 16:38   ` Paul P Komkoff Jr
2002-10-02  6:39 ` Nikita Danilov

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=E17wUYa-0006Dl-00@starship \
    --to=phillips@arcor.de \
    --cc=i@stingr.net \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®