Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LMDB: minimize transaction duration #323

Merged
merged 2 commits into from
Oct 12, 2023
Merged

Conversation

marisn
Copy link
Contributor

@marisn marisn commented Oct 12, 2023

This is a minor LMDB cache optimization. The less we keep transaction running, the better it is. Reader transactions tie-up resources if concurrent writes are made. Writing transactions block other writing transactions and thus slows down overall writes. Thus shorter transactions should improve overall throughput and reduce resource use.

Readers do not block anything but tie-up resources;
Writers block other writers and thus it's good idea to keep them short.
As MapCache LMDB uses single entry per key, there is no need to
pass data to mdb_del call.
@tbonfort tbonfort merged commit 2ac1a61 into MapServer:main Oct 12, 2023
5 of 8 checks passed
@marisn marisn deleted the lmdb_opt branch December 5, 2023 07:24
jmckenna pushed a commit that referenced this pull request Aug 2, 2024
* LMDB: minimize transaction duration

Readers do not block anything but tie-up resources;
Writers block other writers and thus it's good idea to keep them short.

* LMDB: do not pass data variable when deleting tiles

As MapCache LMDB uses single entry per key, there is no need to
pass data to mdb_del call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants