All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Labute <dan@discreet.com>
To: Andreas Dilger <adilger@clusterfs.com>
Cc: reiserfs-list@namesys.com
Subject: Re: Creating large numbers of files
Date: Tue, 11 Jan 2005 16:34:24 -0500	[thread overview]
Message-ID: <41E44660.6090603@discreet.com> (raw)
In-Reply-To: <20050110231853.GB8098@schnapps.adilger.int>

Andreas Dilger wrote:
> On Jan 10, 2005  17:34 -0500, Dan Labute wrote:
> 
>>I'm a developer trying to create large numbers of *empty* files 
>>(~100000).  What is the fastest way to perform such an operation other 
>>than a simple open().  Will using multiple threads to perform concurrent 
>>operations help significantly, or am I just awell-off using a single thread?
> 

> If you call 'mknod("/path/to/file", S_IFREG | 0666, 0)' from a program
> it avoids the overhead of doing both an open and a close.

Thanks Andreas.  I just the change and had minimal results.  Regardless, 
it's the right call to make.

I also tried to use multiple threads (from separate test programs), and 
found that the performance went downhill.  I'm assuming that this would 
indicate that multi-threading the mknod() operations within the same 
executable would yield similar results.  I'm surprised that the combined 
performance was actually worse.

As for link() and unlink() (and mknod), I see no options but to use 
filesystem-specific ioctl() calls.  Does ReiserFS provide any 
batch-operation calls that would yield better performance?
If not, would it be worthwhile to invest in a plug-in?

Any thoughts from the Reiser crew?

Regards,

Dan


      reply	other threads:[~2005-01-11 21:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1105395827.2871.ezmlm@namesys.com>
2005-01-10 22:34 ` Creating large numbers of files Dan Labute
2005-01-10 23:18   ` Andreas Dilger
2005-01-11 21:34     ` Dan Labute [this message]

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=41E44660.6090603@discreet.com \
    --to=dan@discreet.com \
    --cc=adilger@clusterfs.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.