[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200701241621.44923.dada1@cosmosbay.com>
Date: Wed, 24 Jan 2007 16:21:44 +0100
From: Eric Dumazet <dada1@...mosbay.com>
To: Jeff Layton <jlayton@...hat.com>
Cc: Andrew Morton <akpm@...l.org>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/3] i_ino uniqueness: alternate approach -- hash the inodes
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists