[news.software.b] latest dbz vs. ndbm?

bernhold@qtp.ufl.edu (David E. Bernholdt) (11/13/89)

I run B-news on a Sun with OS4.0.1 which has ndbm.  Can anyone tell me
how dbz compares to this (as opposed to plain old dbm)?  Does ndbm
include any speedups over old dbm?  Should I be using ndbm or dbz?

Thanks in advance.
-- 
David Bernholdt			bernhold@qtp.ufl.edu
Quantum Theory Project		bernhold@ufpine.bitnet
University of Florida
Gainesville, FL  32611		904/392 6365

wayne@dsndata.uucp (Wayne Schlitt) (11/14/89)

In article <779@orange19.qtp.ufl.edu> bernhold@qtp.ufl.edu (David E. Bernholdt) writes:
> 
> I run B-news on a Sun with OS4.0.1 which has ndbm.  Can anyone tell me
> how dbz compares to this (as opposed to plain old dbm)?  Does ndbm
> include any speedups over old dbm?  Should I be using ndbm or dbz?

well, i am still running bnews and i just installed the version of dbz
that just went across the net.  i got about a factor of 4 speed
increase on my expires.  the size of my history.pag also dropped in
size by a factor of 4.  i tried using the incore option, but it looks
like bnews patchlevel 14 doesnt call dbmclose, so it didnt work...

i am not sure how much of this speed increase is because the files now
fit mostly in my disk cache, but for me it was worth it.


-wayne

henry@utzoo.uucp (Henry Spencer) (11/16/89)

In article <779@orange19.qtp.ufl.edu> bernhold@orange19 (David E. Bernholdt) writes:
>I run B-news on a Sun with OS4.0.1 which has ndbm.  Can anyone tell me
>how dbz compares to this (as opposed to plain old dbm)?  Does ndbm
>include any speedups over old dbm?  Should I be using ndbm or dbz?

If performance is your concern, you should *probably* be using dbz.  It
is heavily specialized for news, but as a result is almost certainly
faster than the more general-purpose dbm's.  I don't think ndbm is lots
faster than dbm.
-- 
A bit of tolerance is worth a  |     Henry Spencer at U of Toronto Zoology
megabyte of flaming.           | uunet!attcan!utzoo!henry henry@zoo.toronto.edu

icsu6000@caesar (Jaye Mathisen) (11/16/89)

In article <WAYNE.89Nov14062831@dsndata.uucp> wayne@dsndata.uucp (Wayne Schlitt) writes:
-->
-->In article <779@orange19.qtp.ufl.edu> bernhold@qtp.ufl.edu (David E. Bernholdt) writes:
-->> 
-->> I run B-news on a Sun with OS4.0.1 which has ndbm.  Can anyone tell me
-->> how dbz compares to this (as opposed to plain old dbm)?  Does ndbm
-->> include any speedups over old dbm?  Should I be using ndbm or dbz?
-->
-->well, i am still running bnews and i just installed the version of dbz
-->that just went across the net.  i got about a factor of 4 speed
-->increase on my expires.  the size of my history.pag also dropped in
-->size by a factor of 4.  i tried using the incore option, but it looks
-->like bnews patchlevel 14 doesnt call dbmclose, so it didnt work...

I tried installing dbz with -DINCORE set, on News 2.11.19, on a MicroVAX
II, running Ultrix 3.0.

It was easy to install, and my history files dropped to about 25% of
normal size.

I riffled through the code to expire, and inews to add the dbmclose() call
that's needed, but I didn't get it to work.  Expire worked fine (REAL FAST),
but inews didn't seem to be adding stuff to the history file.

I'm going to play with it some more and see if I can figure out where I went
wrong.

If anybody has gotten it working, I'd like to hear from them.





Jaye Mathisen
icsu6000@caesar.cs.montana.edu
--
+-----------------------------------------------------------------------------+
| Jaye Mathisen,systems manager       Internet: icsu6000@caesar.cs.montana.edu|
| 410 Roberts Hall                      BITNET: icsu6000@mtsunix1.bitnet      |
| Dept. of Computer Science	   	UUCP: utah-gr!mts-cs!icsu6000         |

zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) (11/16/89)

>well, i am still running bnews and i just installed the version of dbz
>that just went across the net.  i got about a factor of 4 speed
>increase on my expires.  the size of my history.pag also dropped in
>size by a factor of 4.  i tried using the incore option, but it looks
>like bnews patchlevel 14 doesnt call dbmclose, so it didnt work...

It's true, neither B News or C News call dbmclose() before exiting.  
It's worth adding though.  The change for C News is simple, just look 
for the exit() calls in expire and mkdbm and add dbmclose() before 
them.  You probably don't want INCORE defined for the dbz you link 
with relaynews.  

Can anyone post patches to add dbmclose() to B News expire?  It's probably
quite simple.

-- 
Jon Zeeff    Branch Technology  <zeeff@b-tech.ann-arbor.mi.us>
Fax:         (313) 995-1931     <zeeff%b-tech@iti.org>

coolidge@brutus.cs.uiuc.edu (John Coolidge) (11/17/89)

icsu6000@caesar (Jaye Mathisen) writes:
>I tried installing dbz with -DINCORE set, on News 2.11.19, on a MicroVAX
>II, running Ultrix 3.0.

Same idea, except that I'm on a Sun 3/160, SunOS 4.0.3, C News 13-Nov-89.

>It was easy to install, and my history files dropped to about 25% of
>normal size.

Fairly easy to understand, except for some code in expire that
expects .dir's to always exist. DBZ doesn't use them, and I decided
that that getting rid of them would be a good idea. So in went the
#ifdef DBZ's :-).

I didn't get quite that much downsizing, but 50% is probably a good
estimate.

>I riffled through the code to expire, and inews to add the dbmclose() call
>that's needed, but I didn't get it to work.  Expire worked fine (REAL FAST),
>but inews didn't seem to be adding stuff to the history file.

Total failure here too. INCORE simply never seemed to actually write
things back. The 'history' file changed, and 'history.pag' seemed to
change (file times, etc), but no lookup-visable data got added. I put
in printf's to make sure the write was actually occurring (it was)
and that the sizes were right (they were). I have no idea what's causing
the problem, but INCORE didn't work at all for me. On the other hand,
DBZ without INCORE is running just fine for me right now.

--John

--------------------------------------------------------------------------
John L. Coolidge     Internet:coolidge@cs.uiuc.edu   UUCP:uiucdcs!coolidge
Of course I don't speak for the U of I (or anyone else except myself)
Copyright 1989 John L. Coolidge. Copying allowed if (and only if) attributed.
You may redistribute this article if and only if your recipients may as well.
New NNTP connections always available! Send mail if you're interested.

zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) (11/17/89)

>I tried installing dbz with -DINCORE set, on News 2.11.19, on a MicroVAX
>II, running Ultrix 3.0.
>
>It was easy to install, and my history files dropped to about 25% of
>normal size.
>
>I riffled through the code to expire, and inews to add the dbmclose() call
>that's needed, but I didn't get it to work.  Expire worked fine (REAL FAST),
>but inews didn't seem to be adding stuff to the history file.

That's ok.  You probably don't want to have INCORE defined on the copy 
you link with inews.  INCORE is a big win only when you are doing many 
dbm operations per program invocation (like expire).  









-- 
Jon Zeeff    		<zeeff@b-tech.ann-arbor.mi.us>
Branch Technology 	<zeeff%b-tech@iti.org>