$Date: 1999/01/24 11:43:45 $

Subject: Memorandum for patched pks-0.9.3db2test.
Author: Hironobu SUZUKI <hironobu@h2np.suginami.tokyo.jp>
Date: 1999/Jan/24


How to use this
===============

pks-0.9.3db2test.tar.gz and db-2.6.4.tar.gz are required.  db-2.6.4 is
available from http://www.sleepycat.com.



HOW TO COMPILE
===============

Example (under Linux)

$ tar zxvf pks-0.9.3db2test.tar.gz
$ cd pks-0.9.3db2test
$ rm -fr db2-sleepycat
$ tar zxf ../db-2.6.4.tar.gz 
$ mv db-2.6.4 db2-sleepycat
$ cp ../multidb_and_worddb/* .
$ patch -p < patch_to_pks-0.9.3db2test 
$ ./configure
$ make
....
gcc -o pksdctl pksdctl.o  
sh mkpksdconf > pksd.conf
h2nppc$ 

---


CHANGES
=======

1) Keydb is splited.

keydb is splited. Older version of pksd used one "keydb" file for key
database. this version use 3 splited keydbs (keydb000, keydb001 and
keydb002).

 $ pksclient ./db create
 $ ls  db
 keydb000  keydb001  keydb002  timedb	worddb

2) db I/O become efficient.

worddb and timedb database element increasing algorithm was changed
and become more efficent. But still slow when database is initialized
by huge keyring.

3) Time-stamp Logging Format

logging message for STDERR was changed. Message printed with
time-stamp.

ex) 

 $ pksclient ./db create
 [Sun Jan 24 20:06:05 1999] kd_create: flags=0
 [Sun Jan 24 20:06:05 1999] kd_create: completed successfully
 ...


4) soft_err and more.

2 patch was added. Patches was posted in pgp-keyserver-folk@flame.org
by Marcel Waldvogel <mwa@tik.ee.ethz.ch> at 17/Jun/98 and 21/Jun/98.


---


Configuration TIPS: 


Need more splited keydb
=======================

Default is 3. If you need more splited file, change DB_ARRAY_SIZE as
4, 5 or more. Remember file open limit when you change it.

kd_generic_multi.h:

/*
 * number of keydb files 
 * prime number would be good for DB_ARRAY_SIZE.
 */
#define DB_ARRAY_SIZE 3




Value of ASSIGNED_MEMORY_UNIT
=============================

ASSIGNED_MEMORY_UNIT value controls db cache size and alloc size of
worddb.  This size depends on your machine configure.  Default size is
'8'.  If ASSIGNED_MEMORY_UNIT is assinged bigger, more memory size is
required but little bit faster than small size.  If you have a lot of
physical memory, you'd better to make it bigger.  For example, my
machine have 128Mbyte physical memory and ASSIGNED_MEMORY_UNIT is 16.
I estimate maximum limit will be 32.

memory_config.h
.....

/*
 * Memory size for one DB element.
 */

#define ASSIGNED_MEMORY_UNIT  8

/*
#define ASSIGNED_MEMORY_UNIT  16
#define ASSIGNED_MEMORY_UNIT  24
#define ASSIGNED_MEMORY_UNIT  32
*/
....



EPROTO error under FreeBSD 
===========================

I you encounter this compile error, change EPROTO to EPROTOTYPE in
www.c

gcc -Wall -pedantic -g -O -Idb2-sleepycat/dist -DDEBUG  -DHAVE_SYS_SELECT_H=1 -\
DHAVE_MMAP=1 -DHAVE_MADVISE=1 -c www.c
www.c: In function `listener':
www.c:407: `EPROTO' undeclared (first use this function)
www.c:407: (Each undeclared identifier is reported only once
www.c:407: for each function it appears in.)
*** Error code 1

=====

