>> Vitaly Zuevsky wrote: >> Memory pressure isn't my problem. I see 2-15 major faults a second in the >> event loop of the reader thread, which can effectively stall the loop for >> anything between 1-400ms (I measure iowait jiffies of the pid). I understand >> the faults result from the writer thread, actively modifying the file mmaped >> by the reader. I assume writes to the file invalidate corresponding pages of >> the reader, and those invalid pages only get updated (via major faults) on >> first access by the reader. If not locking, perhaps madvise/willneed >> combination could help, what you think? >> > I think if this is your concern you should just use WRITEMAP and forget about > it. > > -- > -- Howard Chu
Thanks for pointing me out to writemap option https://lmdb.readthedocs.io/en/release/#lmdb.Environment Re ACID implications it will have - metasync=True, sync=True, map_async=False, mode=493, create=True, readahead=True, writemap=True will this ensure integrity on disk after every write? What sequence of events (contrasted with writemap=False) could lead to data corruption here?
