This content has been marked as final. Show 1 reply
That patch is required. After discussion with the openldap developers, Oracle decided not to integrate this change with Berkeley DB. Firstly, in general we don't know at compile time what Linux kernel will be used at runtime, so while it may be reasonable in many cases to make a build-time assumption about the virtual memory page size, we can't do so in all cases. Further, as far as we know, there is no easy way to work out at runtime what alignment is required.
Lastly, even if we could work out the right page size, it is not clear how useful this really is anyway, since it is wasting quite a lot of space in the Berkeley DB cache in order to save space in the Linux filesystem cache. This is due to Berkeley DB's layout of data structures in shared memory, which is something we have considered changing so that buffers are naturally aligned to page boundaries, but that is a large piece of work that is not currently scheduled.
The advice we have had is that setting swappiness to zero on Linux is usually a better solution that trying to make Berkeley DB use O_DIRECT. See http://kerneltrap.org/node/3000 for details and discussion.
Michael Cahill, Oracle Berkeley DB.