dbTalk Databases Forums  

Berkeley DB recoverability on Linux

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


Discuss Berkeley DB recoverability on Linux in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bernard Normier
 
Posts: n/a

Default Berkeley DB recoverability on Linux - 01-08-2004 , 12:15 PM






I am trying to understand how to apply
http://www.sleepycat.com/docs/ref/tr.../reclimit.html to a Linux x86
system.

My file system has the typical block size (4096), and I don't tweak the
Berkeley DB page size ... so it's also 4096 on this file system.
strace(1) shows that Berkeley DB writes to my database file in chunks of
4096 [using pwrite(2)], and to the log files in variable-size chunks
[using write(2)].

Now, are these 4096-bytes Berkeley DB pages written atomically?

First, I suspect each pwrite(...., 4096) will always write a single fs
block, not several partial blocks. Is this correct?

Next, whether or not the OS can write each block atomically depends on
the underlying controller and disk drive. Each fs block is written on
a number of sectors on my hard drive. With a sector size of 512 bytes,
that's 8 sectors per file system block.
On my IDE disk, `hdparm -m /dev/hda` returns 16. Does this guarantee
that up to 16 sectors will be written atomically by the OS?
Is there anything equivalent with a SCSI disk? Or do I need to use
512-bytes file system blocks to ensure atomicity?

A related question is which Linux file system is best suited for
Berkeley DB databases and log files. Is it useful to use a journaled
file system? Journal just the metadata or the data as well (with
ext3's journal_data option)?

Thanks for any info!

Bernard





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 - 2013, Jelsoft Enterprises Ltd.