[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SAGE] simple database problem




On Jan 3, 2005, at 1:33 PM, Jon maddog Hall wrote:
>
> Is this machine dedicated to the database (I have a feeling it is not, 
> since
> the buffer cache seems to be trashed by other "things" running)?
	no. there is a lot going on.
>
>> performance is significantly helped by simply running 'wc db.dbm'
>
> How much real memory does this machine have?  Could you sustain the 
> entire
> database in real memory while also running these other programs?  
> mlock(2)
> might fix your problems.
	we have plenty of memory (4GB). the database is modest in size (20MB
	of data; 160MB on disk). mlock won't work because it is not a server
	based program; rather, each time the access program runs, it opens
	the gdbm database and does its business.

>> apparently because of the random seeking around in the database file.
>
> I assume that you have the sources to the database, so you could make 
> changes
> to it.  Is it easy to read the database serially, tossing away records
> that are not active, rather than randomly, for your "print all"?
	i use the standard gdbm traverse function (first and next); i know
	of no other way to traverse a gdbm-style database. all records are
	active. i presumably can get the gdbm sources; i;m not sure i
	want to invest the necessary effort to "fix" them.
>
> Thanks,
> maddog

----
Andrew Hume  (best -> Telework) +1 732-886-1886
andrew@research.att.com  (Work) +1 973-360-8651
AT&T Labs - Research; member of USENIX and SAGE