in-memory db & cache -
07-28-2007
, 02:03 PM
I'm using Berkeley DB in a client-server fashion with RPC. I need to have at
the server side a in-memory db. To obtain it the client calls the open
method with the file parameter set to NULL. The environment, needed when
using RPC, is configured to have shared memory regions in system shared
memory, and so db cache is in shared memory.
My doubt regards the role of db cache with in-memory db. Inserted data are
first stored in the cache and periodically "flushed" to server process
private memory (intending that returned by malloc), or in case of in-memory
db data are always inserted in process private memory, and the cache is not
used ? I noticed, doing some tests, that storing an amount of data greater
than cache dimension is successfull, so that means that at least some part
of data must be stored in process private memory.
Thanks |