Re: [PATCH 0/3] i_ino uniqueness: alternate approach -- hash the inodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux