Hi,
We are trying to create a DBM file of 40,000 records. Each record
will have a 'value' length of around 200-300 bytes. The 'key' is a
sequential number, starting at 1 which is converted to a string,
and incremented until 40,000. We are using the ndbm(3) routines.
The problems are:
1) get a 'file too large' error after creating 30,000 records. We
get the following error message:
make_dbm: Fatal error - errno=27,
Can't insert key-value in DBM file: File too large
2) the file size is huge! Both the .dir and .pag files are huge.
'ls' command shows:
/home/users/pzm/temp>ls -al
total 12519
drwxr-xr-x 2 pzm users 8192 Aug 5 17:11 .
drwxr-xr-x 6 pzm users 8192 Aug 5 08:36 ..
-rwxr--r-- 1 pzm users 896 Jul 31 10:01 compile.sh
-rwxr-xr-x 1 pzm users 32768 Jul 31 10:02 dump_dbm
-rwxr-xr-x 1 pzm users 1385 Jul 31 10:01 dump_dbm.c
-rw-r--r-- 1 pzm users 1708277760 Aug 5 17:12 icrc_db.dir
-rw-r--r-- 1 pzm users 13994205837312 Aug 5 17:12
icrc_db.pag
-rwxr-xr-x 1 pzm users 32768 Aug 5 16:47 make_dbm
-rw-r--r-- 1 pzm users 2033 Aug 5 16:57 make_dbm.c
-rwxr-xr-x 1 pzm users 32768 Aug 5 14:12 make_dbm_rev
-rw-r--r-- 1 pzm users 2032 Aug 5 14:12 make_dbm_rev.c
3) BUT the file system has barely increased in size:
/home/users/pzm/temp>df -k
Filesystem 1024-blocks Used Avail Capacity Mounted
on
/dev/re0a 63567 37096 20114 65% /
/proc 0 0 0 100% /proc
usr_domain#usr 3991552 1657065 2300472 42% /usr
home_domain#home 4188160 2680084 1363920 66% /home
/dev/re0e 3940334 1089084 2457216 31% /news
info_domain#info 2055240 68307 1975248 3%
/usr/nlc/info
nlc_domain#nlc 4188160 24 4183376 0% /nlc
A 'dump' of the file shows large gaps of empty (zeroed) blocks.
I am not sure where the problem is except that maybe it has to do with
the nature of DBM files or a Unix bug.
I also ran the command 'wc -c' to count the bytes in the files and got
the following numbers:
File 'icrc_db.dir' had 1,708,277,760 bytes. (??)
File 'icrc_db.pag' had 13,994,205,837,312 bytes. (??)
The /home partition is sitting on a 4.3GB drive which is 66% full.
It is an AdvFs file system partition. What gives?
I am looking at 'gdbm' to see if it is better. But it seems to me we
have a Unix bug here with either DBM or the file systems.
I placed a call with DEC, but 24hrs later still nothing. So I'm hoping
this list can help.
Thanks in advance!
--
----------------------------------------------------------------------
Yvon Lauriault, National Library of Canada, Telecommunications Support
Phone: (819) 994-6981, Fax: (819) 994-6835
Internet: Yvon_at_infoserv.nlc-bnc.ca
X400: /c=ca/a=govmt.canada/p=gc+nlc.bnc/s=lauriault/g=yvon
Received on Tue Aug 06 1996 - 22:02:23 NZST