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

Add SQLite pragmas to optimize performace #2715

Merged
merged 2 commits into from
Sep 20, 2024
Merged

Add SQLite pragmas to optimize performace #2715

merged 2 commits into from
Sep 20, 2024

Conversation

jamiepine
Copy link
Member

This PR optimizes SQLite performance by configuring key PRAGMA settings, including:

•	Enabling Write-Ahead Logging (journal_mode = WAL) for improved concurrency.
•	Setting synchronous = NORMAL to balance durability and performance.
•	Increasing memory-mapped I/O size to 512MB for faster database access.
•	Limiting the journal file size to 64MB to prevent excessive disk usage.
•	Setting the cache size to 10,000 pages (~40MB) for faster reads.

These changes aim to enhance database performance, especially in environments with concurrent transactions.

@jamiepine jamiepine requested a review from a team as a code owner September 20, 2024 03:30
Copy link

vercel bot commented Sep 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
spacedrive-landing ⬜️ Ignored (Inspect) Visit Preview Sep 20, 2024 3:34am
spacedrive-web ⬜️ Ignored (Inspect) Visit Preview Sep 20, 2024 3:34am

Copy link
Member

@iLynxcat iLynxcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! performance boost is always great

@jamiepine jamiepine added this pull request to the merge queue Sep 20, 2024
Merged via the queue into main with commit 9034b55 Sep 20, 2024
13 checks passed
@jamiepine jamiepine deleted the sqlite-pragmas branch September 20, 2024 06:41
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.

3 participants