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

Internal WAL read-write lock is very expensive #889

Open
penberg opened this issue Feb 4, 2025 · 1 comment
Open

Internal WAL read-write lock is very expensive #889

penberg opened this issue Feb 4, 2025 · 1 comment
Labels
enhancement New feature or request performance
Milestone

Comments

@penberg
Copy link
Collaborator

penberg commented Feb 4, 2025

We have an internal WAL read-write lock, which is very expensive, especially for single-threaded workloads. We should either move locking to higher layers (e.g. in the SQLite C API) or have some less expensive lockless synchronization mechanism internally.

@penberg penberg added enhancement New feature or request performance labels Feb 4, 2025
@penberg penberg added this to the 0.1.0 milestone Feb 4, 2025
@LtdJorge
Copy link
Contributor

So, I've been implementing a SeqLock since yesterday which I'm hopeful will solve at least part of the problem, I'll send a PR later today.

One thing @penberg did you use a test harness or benchmark specific to the RwLock when you found the performance problem? I'm asking this, mainly because it would help me a lot in benchmarking my implementation vs what we currently have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

No branches or pull requests

2 participants