All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul P Komkoff Jr <i@stingr.net>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [STUPID TESTCASE] ext3 htree vs. reiserfs on 2.5.40-mm1
Date: Wed, 2 Oct 2002 20:38:21 +0400	[thread overview]
Message-ID: <20021002163820.GG6318@stingr.net> (raw)
In-Reply-To: <E17wUYa-0006Dl-00@starship>

Replying to Daniel Phillips:
> How big are the files?

0.

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>

main(int argc, char* argv[]) {

	int i, j, k = atoi(argv[1]);
	char t[128];

	for (i = 0; i < k; i++) {
		snprintf(t, 127, "%08X", i);
		if (-1 == (j = creat(t, S_IRWXU))) {
			perror("Create file");
			printf("no: %d\n", i);
			return;
		}
		close(j);
	}

}


> 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.

this will be the next series of tests :)

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

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>

main(int argc, char* argv[]) {

	int i, j, k = atoi(argv[1]);
	char t[128];

	for (i = 0; i < k; i++) {
		snprintf(t, 127, "%08X", i);
		if (-1 == unlink(t)) {
			perror("unlink");
			printf("no: %d\n", i);
			return;
		}
	}

}

> 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?

Yes, increasing journal to fit the whole directory in it (as Andreas
Dilger said) improved results by 1/4. But. Initially my test was
1000000 files. /dev/sda4 in my tests 1882844. And I am quickly hitting
inode limit on -t news ext3 filesystem so I need to artificially
increase it at mke2fs time, but I decided to not do so (yet).

> 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.

I just trying to write a caching proxy-like application and not
reinvent the wheel (aka design my own filesystem and store it in a big
file just because some filesystem is so slow on large
directories/cannot make more than N empty objects etc).

-- 
Paul P 'Stingray' Komkoff 'Greatest' Jr /// (icq)23200764 /// (http)stingr.net
  When you're invisible, the only one really watching you is you (my keychain)

  reply	other threads:[~2002-10-02 16:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-01 19:59 [STUPID TESTCASE] ext3 htree vs. reiserfs on 2.5.40-mm1 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
2002-10-02 16:38   ` Paul P Komkoff Jr [this message]
2002-10-02  6:39 ` Nikita Danilov
  -- strict thread matches above, loose matches on Subject: below --
2002-10-04 20:54 Dieter Nützel

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=20021002163820.GG6318@stingr.net \
    --to=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 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.