[BDB 11gR2 Beta] Berkeley DB 11gR2 Beta release -- Mike Owens [#18275]
Dave Segleau
dave.segleau at oracle.com
Sat Mar 20 23:18:11 PDT 2010
Michael/Alex,
Can you comment on Mike Owen's observations and questions below?
Thanks,
Dave
On 3/20/2010 8:01 PM, Mike Owens wrote:
> I should have the article ready by next Monday 29th. I've got my test
> code together and have some things that I am not quite clear on.
>
> I guess the relates to both the article and the tech eval. I can't
> quite figure out what PRAGMA synchronous means in BDB. This is an
> important comparison and when I run some benchmarks I get better
> performance with synchronous=1 than with synchronous=0 in BDB, which
> is counterintuitive with SQLite.
>
> I see some comments in sql/adaptor/btree.c that suggest that perhaps
> the numbers don't mean the same things:
>
> /*
> ** Change the way data is synced to disk in order to increase or
> decrease how
> ** well the database resists damage due to OS crashes and power failures.
> ** Level 1 is the same as asynchronous (no syncs() occur and there is
> a high
> ** probability of damage) Level 2 is the default. There is a very
> low but
> ** non-zero probability of damage. Level 3 reduces the probability of
> damage
> ** to near zero but with a write performance reduction.
> **
> ** Berkeley DB always does the equivalent of "fullSync".
> */
> int sqlite3BtreeSetSafetyLevel(Btree *p, int level, int fullSync)
> {
> BtShared *pBt;
> log_msg(LOG_VERBOSE,
> "sqlite3BtreeSetSafetyLevel(%p, %u, %u)", p, level, fullSync);
>
> pBt = p->pBt;
> if (GET_DURABLE(p->pBt)) {
> pDbEnv->set_flags(pDbEnv, DB_TXN_NOSYNC, (level == 1));
> pDbEnv->set_flags(pDbEnv, DB_TXN_WRITE_NOSYNC, (level == 2));
> }
> return SQLITE_OK;
> }
>
> For SQLite levels, 0=OFF, 1=NORMAL, 2=FULL (there is no 3).
>
> In the code above, it seems that 1=OFF and 2=NORMAL and I don't see
> any code that sets FULL (unless this is 3 in BDB and equates to the
> default "fullSync").
>
> The BDB code that parses this PRAGMA is identical to SQLite's (in
> sqlite/src/pragma.c which both code bases share identically) in that
> it associates whatever integer value is passed in through SQL is
> associated with the DB/btree.
>
> The problem here is that if this is true, then BDB's values are
> different from SQLite's. And if a programmer were going for SQLite's
> synchronous value of 1, it would mean that the sme code running
> against BDB would not be durable (nosyncs) -- something they would not
> expect.
>
> Can you confirm this for me?
>
> If this is true, then perhaps the above code should be (in part)
>
> if (GET_DURABLE(p->pBt)) {
> pDbEnv->set_flags(pDbEnv, DB_TXN_NOSYNC, (level == 0));
> pDbEnv->set_flags(pDbEnv, DB_TXN_WRITE_NOSYNC, (level == 1));
> }
>
> And at least 0 and 1 would match up with SQLite. Still not sure about
> 2 (unless again it maps to BDB's level which is default fullSync).
>
> Thanks,
>
> Mike
>
> On Fri, Mar 19, 2010 at 1:54 PM, Dave Segleau <dave.segleau at oracle.com
> <mailto:dave.segleau at oracle.com>> wrote:
>
> Hello Mike,
>
> Thank you very much for the quote earlier this week.
>
> I wanted to let you know that the final Beta Release snapshot is
> now available here:
>
> http://download.oracle.com/otn/beta/bdb/db-5.0.13.zip
> http://download.oracle.com/otn/beta/bdb/db-5.0.13.tar.gz
>
> This is the last planned Berkeley DB 11gR2 beta snapshot. This
> snapshot contains bug fixes, documentation updates and a cleaned
> up build process. We're on target for a production release on
> March 31st. Please provide any feedback or major issues by end of
> day, Monday March 22nd.
>
> I'm looking forward to seeing your article. When do to you think
> that you'll have a draft.
>
> Also, I'm working with Jonathan to get OSCON on "marketing
> program" map. Is there anyone at OSCON that I can speak with to
> get an understanding of typical attendance and profile of the
> attendees?
>
> Thank you very much for your participation in the Beta program.
> Your evaluation and feedback about the product is very valuable to
> us.
>
> Regards,
>
> Dave
>
--
Oracle <http://www.oracle.com>
David Segleau | Director Product Management - Berkeley DB
Phone: +1 425 945 8533 | Mobile: +1 408 420 7350
Oracle Database Engineering
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to
developing practices and products that help protect the environment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/bdb-beta-feedback/attachments/20100320/2afa986b/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oracle_sig_logo.gif
Type: image/gif
Size: 658 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/bdb-beta-feedback/attachments/20100320/2afa986b/attachment.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: green-for-email-sig_0.gif
Type: image/gif
Size: 356 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/bdb-beta-feedback/attachments/20100320/2afa986b/attachment-0001.gif
More information about the BDB-BETA-FEEDBACK
mailing list