[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: MDB v2: Replace meta pages with "meta position" word



Howard Chu writes:
>Hallvard Breien Furuseth wrote:
>> Then I'm not sure what's the point of so many speedup options like it
>> has now.
> 
> MDB_NOSYNC is perfectly safe on some filesystems like ZFS that guarantee write 
> order.

Nice.  Should tweak the doc a bit, then.

Do you mean safe without MDB_WRITEMAP - i.e. it orders write system
calls correctly?  Or even with MDB_WRITEMAP - notices the order of
updates to mmap pages?  I imagine the latter would be rather tough.

Sounds like this needs yet another mode for best performance, though:
Sync after but not before writing the meta page.

> Some apps want the ability to return immediately from txn_commit while 
> performing syncs in a background thread. MAPASYNC lets us do that.

Only with MDB_WRITEMAP and if you do not care about consistency after
a system crash, as mentioned in my other mail.  Unless on ZFS and
(MDB_NOSYNC & MDB_WRITEMAP) is safe, as above.

> What you're talking about may also do that. I just want to be clear
> about the motivation and the expected benefit.
> 
> Using variably positioned meta pages seems like something we would try to cut 
> down on seek overhead, but looking closer it doesn't appear that it can do that.

Right, default mode will still write the file header every time.  Hm,
and it'll be a bit slower since some commits will need one more page:
When none of the committed pages have room for the MDB_meta.

Fewer seeks would only be a side effect of choosing fewer syncs.

-- 
Hallvard