-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
MDB improvements #1421
MDB improvements #1421
Conversation
|
Yeah I think this would need to be a config flag since it can more easily cause corruption. A pattern I've seen is "fast flags", e.g. MDB_NOSYNC is fast and MDB_NOSYNC | MDB_WRITEMAP | MDB_MAPASYNC is fastest, but the default should be neither. |
if MDB_NOSYNC is enabled without MDB_WRITEMAP you still maintain the ACI, at the cost of durability. the risk is you lose some final transactions and have to bootstrap them later. How is this different from the node being offline for extended periods. |
MDB_NOSYNC can corrupt the database on system crashes/outage. That's relatively low risk and may be a fine tradeoff for some nodes, but I do think it should be a config option. |
ah, I see, let me see about getting a config flag option, up |
@argakiig seems like you're right about not using MDB_WRITEMAP still maintaining ACI according to docs, a config flag would be nice though. |
I think the first order of business is to figure out if there's any performance gain from these flags, if not we should document it and not make a change. |
Will create a separate PR for testing MDB_NOSYNC/MDB_WRITEMAP with config options This is now just for MDB_NORDAHEAD which, when supported, will stop the DB from being loaded |
MDB_NOSYNC could provide improvements with disk usage by not calling fsync after commit
MDB_NORDAHEAD improves memory usage by not trying to read ahead in the DB, This has no effect on windows but other OSes should benefit. Windows does not read ahead so it is not affected