4 ms·
I'm intrigued by disadvantage 3 from http://www.sqlite.org/mmap.html http://www.sqlite.org/mmap.html : The operating system must have a unified buffer cache in
by mooism2 13y ago
I'm intrigued by disadvantage 3 from http://www.sqlite.org/mmap.html http://www.sqlite.org/mmap.html :
The operating system must have a unified buffer cache in order for the memory-mapped I/O extension to work correctly, especially in situations where two processes are accessing the same database file and one process is using memory-mapped I/O while the other is not. Not all operating systems have a unified buffer cache. In some operating systems that claim to have a unified buffer cache, the implementation is buggy and can lead to corrupt databases.
Which commonly-used operating systems lack a bug-free unified buffer cache?
- jamesaguilar 13y agoNot sure, but there are references to proven incidents of fsync bugs in the docs. If you get that wrong, it is not hard to believe that the buffer cache could be wrong too.
- glurgh 13y agohttp://sqlite.1065341.n5.nabble.com/SQLite-3-7-17-preview-2x-faster-td68021.html http://sqlite.1065341.n5.nabble.com/SQLite-3-7-17-preview-2x... Seems like one where they had trouble was OpenBSD.
- lysium 13y agoLater on, the say mmapped I/O is always disabled on OpenBSD because of a buggy unified buffer cache.
- X-Istence 13y agos/buggy/non-existent/
- lysium 13y agoTrue, my bad!
- brongondwana 13y agoWe have exactly the same issue in Cyrus IMAPd. That said, we have a test for it during configure, and either compile with full mmap support or with dodgy fake mmap support (which is shit - it just reads the entire file into real memory every time)