Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > use berkeley-db with flash disk
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 25th February 18:25
yliu
External User
 
Posts: 1
Default use berkeley-db with flash disk


Hi there,

I am considering using Berkeley-DB to build a transactional database
on a flash disk within VxWorks. This application is special in that we
only need to read the database at the startup of the system; later on
we only need to write data changes to the database. The BDB manuals
recommend separately store database files and log files in different
hard drives for higher performance, while we only have one flash in
the system. If I make the in-memory buffer large enough to contain the
whole database, will this achieve the similar results as putting
database and logs to diff disks?

Another question about transaction and replication. Suppose I have a
master and a client database env.. Is the replication process also
protected in the same transaction as writing to local disk? Is the
replication to client failed, will the whole transaction fail? Or the
replication can be configured inside the transaction protection and
outside of it?

Thanks

yliu
  Reply With Quote


  sponsored links


2 25th February 18:25
bostic
External User
 
Posts: 1
Default use berkeley-db with flash disk


Yes.

Berkeley DB only writes to the database files when a checkpoint
is done (see the DbEnv::txn_checkpoint method for more
information), the application specifically requests it (using
the Db::sync or memory cache methods), or when there is
insufficient room in the database cache for the application's
working set, and pages have to be swapped between the cache and the stable storage.


I don't understand what you mean by this question, could you
please explain it further?

No. It is not possible to abort transactions after the application's
send function has been called, as the master may have already written
the commit log records to disk, and so abort is no longer an option.

For more information, please see the "Transactional guarantees"
section of the Berkeley DB Reference Guide, included in your
download package and also available at:

http://www.sleepycat.com/docs/ref/rep/trans.html

Regards,
--keith

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic bostic@sleepycat.com
Sleepycat Software Inc. keithbosticim (ymsgid)
118 Tower Rd. +1-781-259-3139
Lincoln, MA 01773 http://www.sleepycat.com
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666