From: Eric Dumazet <dada1@cosmosbay.com>
To: Jeff Layton <jlayton@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] i_ino uniqueness: alternate approach -- hash the inodes
Date: Wed, 24 Jan 2007 16:21:44 +0100 [thread overview]
Message-ID: <200701241621.44923.dada1@cosmosbay.com> (raw)
In-Reply-To: <45B76BAC.4040408@redhat.com>
On Wednesday 24 January 2007 15:22, Jeff Layton wrote:
> Andrew Morton wrote:
> > What is the additional overhead, expressed in relative terms? ie: as a
> > percentage?
>
> Short answer: ~3-4% in a not very scientific test.
>
> Long answer: I timed 3 different runs of a program that created and then
> closed a pipe 10 million times on a patched and unpatched kernel. I then
> added up the "system" times for each and divided them:
Do you mean this program ?
int count, pfd[2];
for (count = 0 ; count < 10000000 ; count++) {
pipe(pfd);
close(pfd[0]);
close(pfd[1]);
}
The problem is you wont see the overhead of insert/delete the inode in a
global tree, since you keep hot caches.
To have a better estimate of the overhead, I suggest you try to use more
active pipes like :
#include <unistd.h>
#define SIZE 16384
int fds[SIZE];
int main(int argc, char *argv[])
{
unsigned int i , count ;
for (i = 0 ; i < SIZE ; i += 2)
pipe(fds + i);
i = 0;
for (count = 0 ; count < 10000000 ; count++) {
close(fds[i]);
close(fds[i + 1]);
pipe(fds + i);
i = (i + 2) % SIZE;
}
return 0;
}
# ulimit -n 20000
# time ./pipebench
Eric
next prev parent reply other threads:[~2007-01-24 15:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-16 18:57 [PATCH 0/3] i_ino uniqueness: alternate approach -- hash the inodes Jeff Layton
2007-01-24 4:46 ` Andrew Morton
2007-01-24 14:22 ` Jeff Layton
2007-01-24 15:21 ` Eric Dumazet [this message]
2007-01-24 16:57 ` Jeff Layton
-- strict thread matches above, loose matches on Subject: below --
2007-01-08 20:46 Jeff Layton
2007-01-10 20:58 ` Eric Sandeen
2006-12-29 19:10 Jeff Layton
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=200701241621.44923.dada1@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=akpm@osdl.org \
--cc=jlayton@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).