Kevin,

 

I’ve been experimenting running with the transactions shut off. Even with transactions shut off it seems like the db file never gets written to unless I call commit on the RecordManager. Is this the expected behavior?

 

Your description gave me the impression that the cached updates would be periodically written to the database file by jdbm and that there was no reason to call commit on the RecordManager directly.

 

 

Eric

 


From: jdbm-general-admin@lists.sourceforge.net [mailto:jdbm-general-admin@lists.sourceforge.net] On Behalf Of Kevin Day
Sent: Monday, January 16, 2006 4:23 PM
To: JDBM General listserv
Subject: re[2]: [Jdbm-general] Transaction memory size

 

Eric-

 

No - when transactions are disabled, they are cached and commited to disk periodically (behind the scenes, we manage the size of the uncomitted page load and write to disk as necessary).  When Tx are off, writes go to only one file (the db file), instead of writing to the log, then to the db file.

 

Because writes to the log are actually synced to the phyiscal disk they are usually considerably slower than non-transactional writes.

 

Running without transactions should be several times faster than running with them (at the risk of corrupting the database file in the event of a crash, of course).

 

- K

 

 

 

>
Kevin,
 
Thanks for such a quick response. The main reason I was trying to avoid committing was because committing seems to be relatively slow. If I disable transactions will things be written to disk immediately? Will this writing be faster thena commit?

Eric
 


From: Kevin Day [mailto:kevin@trumpetinc.com]
Sent: Monday, January 16, 2006 4:02 PM
To: Rosenberg, Eric
Subject: re: [Jdbm-general] Transaction memory size
 

Eric-

 

This is a limitation in the current jdbm transaction manager (there is a group of us working on an alternate technique that will support arbitrarily large transactions, but that's a long way off).

 

The recommended approach at this point is to either:

 

A.  Commit your transactions periodically

 

or

 

B.  Run with transcations disabled for large inserts (understand that this will open you up to potential file corruption, so you only want to run without transactions when it is OK to lose the entire database - i.e. during initial data population).

 

 

Cheers,

 

- Kevin

 

  

 
> If I add / update a bunch of objects in JDBM during a transaction is
everything kept in memory until I do a commit?

I am trying to add an arbitrary number of objects to JDBM and am
wondering if it is safe to add them all from a single transaction or if
I need to commit periodically to ensure that I don't run out of memory.

Thanks,
Eric


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op└ick
_______________________________________________
Jdbm-general mailing list
Jdbm-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jdbm-general

<
<

 

------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Jdbm-general mailing list Jdbm-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jdbm-general