Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Aug 2005 10:33:20 +0200
From:      Divacky Roman <xdivac02@stud.fit.vutbr.cz>
To:        Giorgos Keramidas <keramida@freebsd.org>
Cc:        freebsd-current@freebsd.org, Kris Kennaway <kris@obsecurity.org>
Subject:   Re: [PATCH]: fdalloc optimization
Message-ID:  <20050822083320.GA32668@stud.fit.vutbr.cz>
In-Reply-To: <20050822074932.GA2264@beatrix.daedalusnetworks.priv>
References:  <20050821084546.GA77111@stud.fit.vutbr.cz> <20050821175406.GA36164@xor.obsecurity.org> <20050822074002.GA31176@stud.fit.vutbr.cz> <20050822074932.GA2264@beatrix.daedalusnetworks.priv>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 22, 2005 at 10:49:32AM +0300, Giorgos Keramidas wrote:
> On 2005-08-22 09:40, Divacky Roman <xdivac02@stud.fit.vutbr.cz> wrote:
> >On Sun, Aug 21, 2005 at 01:54:06PM -0400, Kris Kennaway wrote:
> >>On Sun, Aug 21, 2005 at 10:45:46AM +0200, Divacky Roman wrote:
> >>> I made a patch for fdalloc which could speed it up a bit, its stored under
> >>> kern/85176 or http://hysteria.sk/~neologism/kern_descrip.patch
> >>
> >> That's all nice and everything, but *does* it speed it up a bit? :-)
> >
> > ie. its never slower but I think this is insignificant. on the other hand -
> > buildkernel is not that fdalloc sensitive. dont know how to measure it ;(
> 
> By running an application that opens (and keeps open) many files, i.e.
> a program that creates many temporary files, keeps them open and then
> closes them all at once before exiting?

I did:

gettimeofday(&t1, NULL);
   for (; i>0; i--) {
            if (open("/dev/null", O_RDONLY) == -1) {
		perror(NULL);
		break;
	    }
  }
gettimeofday(&t2, NULL);

tested by:

#!/bin/csh

set i=100;

while ($i > 0)
      @ i--
      rtprio 10 ./a.out
end

and ministat showed:

x /tmp/old_kernel
+ /tmp/new_kernel
+--------------------------------------------------------------------------+
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +                                                               |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          +x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                              |
|          *x                                                             x|
|          *x                                                             x|
|          *x                                                             *|
|          *x                                                             *|
|          *x                                                             *|
|||________MMA_A________|___|                                              |
+--------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x 100         39957        959570         41444      87169.69     201011.84
+ 100         37786        962107         38766      66353.09     158258.74
No difference proven at 95.0% confidence


anyway - commenting out duplicate code MUST speed it up, maybe insignificantly
but still ;)

roman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050822083320.GA32668>