dbTalk Databases Forums  

In-memory transactional databases

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss In-memory transactional databases in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Florian Weimer
 
Posts: n/a

Default In-memory transactional databases - 01-09-2006 , 11:04 AM






Is it possible to create in-memory databases with full transaction
support? I tried in the past, but I couldn't find the magic
combination of flags which entirely suppressed the creation of on-disk
region and log files.

Reply With Quote
  #2  
Old   
Ron
 
Posts: n/a

Default Re: In-memory transactional databases - 01-09-2006 , 04:31 PM






Hi Florian,

Yes you can create an in-memory database with full transaction
support. If you want to use in-memory logs, you can still have
transaction support but without durability unless you are using
replication.

If you use DB_SYSTEM_MEM then you will still have
a __db.001 file which will be around 8 bytes in length. That will
be stored in local storage somewhere. This (and flag settings)
are described here:

http://www.sleepycat.com/docs/ref/program/ram.html

You can avoid the region files altogether if you use DB_PRIVATE.

In-memory databases will overflow to temporary disk space if the cache
is not large enough unless you set the DB_MPOOL_NOFILE flag to not
allow that.

If you configure an in-memory database with transactions and with an
in-memory log using DB_LOG_INMEMORY then you will have transactions but
without durability (unless replication is used)

Let us know if you have any problems after you try it.

Ron


Reply With Quote
  #3  
Old   
Florian Weimer
 
Posts: n/a

Default Re: In-memory transactional databases - 01-11-2006 , 03:33 PM



Quote:
If you use DB_SYSTEM_MEM then you will still have
a __db.001 file which will be around 8 bytes in length. That will
be stored in local storage somewhere. This (and flag settings)
are described here:

http://www.sleepycat.com/docs/ref/program/ram.html
Ah, this sounds clear enough. I'm going to try to reproduce the
issues I saw, and report back.

To be on the safe side, I could of course create a temporary directory
and use it to store the environment, just to make sure that I don't
pick up a stray DB_CONFIG file or some other environment files.


Reply With Quote
  #4  
Old   
Florian Weimer
 
Posts: n/a

Default Re: In-memory transactional databases - 01-19-2006 , 06:01 AM



Quote:
Let us know if you have any problems after you try it.
I've now tried to reproduce my earlier problems, and it seems that
Berkeley DB does invoke the stat syscall on a couple of region files
(even if DB_PRIVATE and DB_LOG_INMEMORY have been specified), but does
not try to join an existing environment.

So just to play safe, I'm going to specify /var/empty (the de facto
standard empty directory) as the environment directory, which should
sidestep all potential issues.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.