[MUD-Dev] TECH: AmigaMud DB questions

Jon Lambert tychomud at ix.netcom.com
Fri Apr 27 11:27:36 New Zealand Standard Time 2001

Bruce wrote:
> Chris Gray wrote:
> Agreed.  This is roughly what I tell people when they ask "But why
> don't you just use Berkeley DB for all of your storage?"  I was
> unable to get BDB to insert a couple million -small- and constant
> sized records in anything approaching acceptable lengths of time
> unless I through a large cache at the DB. (About 145M seems to work
> fine.)  That bloats my process size though beyond what most people
> are willing to accept, and I hadn't even tested storing large or
> randomly sized objects in there. But maybe I was missing something
> wrt tuning BDB.  (I still see a high cost for our index operations
> that do use BDB currently, since it was faster than DBM.)

Has anyone asked ....

  "But why don't you use GDBM 1.8.0 for all of your storage?" 

I think it performs much better than BDB.

I've noticed that both of these seem to operate best (for me at least)
at a pagesize of 4K, which I don't think is a coincidence since it
happens to match my OS page size.

There are problems with large page sizes in NDBM and very small
key/value pairs.  While a large page size may minimize writes at
database creation time, too many objects on a page makes for longer
search times.  Then again the value size limits make NDBM pretty much
unusable anyways as a complete solution, which is why the whole whole
bitmap/block file is needed.

Also doesn't Cold actually store 2 database records per object,
symbol->objnum and objnum->seekaddr?  Then requires yet another seek
and write to that bitmapped/block file.

"I hadn't even tested storing large or randomly sized objects in

In your test then, you are still saddled with the I/O overhead of
maintaining the "objects" file that your objnum->seekaddr provides the
pointer into.  So doesn't Cold actually do 3 times more I/O than might
be necessary?  Or am I missing something there?

--* Jon A. Lambert - TychoMUD        Email:jlsysinc at ix.netcom.com *--
--* Mud Server Developer's Page <http://tychomud.home.netcom.com> *--
--* If I had known it was harmless, I would have killed it myself.*--
MUD-Dev mailing list
MUD-Dev at kanga.nu

More information about the MUD-Dev mailing list