Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Active log flushing when using DB_TXN_NOSYNC

779930Jan 26 2011 — edited Jan 26 2011
Hi!

My application using btree compressed database (page size 4096) in transactional environment, which is opened with flag DB_TXN_NOSYNC. Application from time to time is inserting records:
1. Inserting each record use separate transaction.
2. Record key is 64-4096 bytes long, value is 4-12 bytes long.
3. Each inserting record has key bigger, than any record already stored in database

When records keys are small (512 bytes or less) performance is very good. but when records keys size is big (for example 2048 bytes), performance degrades in about 100 times.

I examined output iostat, db_stat -m and db_log -l and found, that database log is flushing very often. When record keys are big, "Total log file I/O writes" is almost equal to "Total log file flushes", when records keys are small, "Total log file I/O writes" is about 100 times bigger than "Total log file flushes". I tried to increase log buffer size from default 32kb to 1mb - this doesn't help.

Anyone can explain this behaviour? Why Berkeley DB actively flushing database log in this usage scenario and DB_TXN_NOSYNC doesn't help?

Thanks for help!

PS: sorry for my bad english
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 23 2011
Added on Jan 26 2011
2 comments
188 views