Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jan 1995 22:37:30 -0800 (PST)
From:      Poul-Henning Kamp <phk@ref.tfs.com>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        CVS-commiters@freefall.cdrom.com, cvs-usrsbin@freefall.cdrom.com, phk@freefall.cdrom.com
Subject:   Re: cvs commit: src/usr.sbin/kvm_mkdb kvm_mkdb.c nlist.c
Message-ID:  <199501110637.WAA26340@ref.tfs.com>
In-Reply-To: <199501102142.IAA25273@godzilla.zeta.org.au> from "Bruce Evans" at Jan 11, 95 08:42:53 am

next in thread | previous in thread | raw e-mail | index | archive | help
> >  Modified:    usr.sbin/kvm_mkdb kvm_mkdb.c nlist.c
> >  Log:
> >  Speed kvm_mkdb up by a factor 5 or thereabout.  Rewrote all the fseek/fread
> >  nonsense to use a mmap'ed file instead and told the DB/hash what we are up to.
> >  
> >  dev_mkdb could maybe benefit from the same treatment.
> 
> I speeded it up by a factor of 10 or thereabouts by removing write-through
> of full blocks in ufs.  (kvm, and potentially anything that does a lot of
> random access, writes to the same blocks many times.)  Your fix works
> because there is no way to tell when an mmap'ed block is full, so the
> write-through pessimization cannot be applied.

Nice try Bruce :-)
I thought so too.  The real speedup came because I changed the defaults
to the dbopen call to have a intelligent pagesize and a decent cachesize.
I only realized this after having done all the mmap changes, so I left them
in.

-- 
Poul-Henning Kamp <phk@login.dknet.dk>
TRW Financial Systems, Inc.
FreeBSD has, until now, not one single time had an undetected error. :-)



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