-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Undo optimization attempts for sqlite3 #2321
Conversation
fbf0024
to
3023479
Compare
Confirmed by OP in #2194 (comment) |
After this PR has been merged, it's time for FTL v6.0.4 |
It seems the default value for temp store is 1, are you sure that 0 is fine? (Haven't been able to test this branch yet) |
Default is 0 as per https://www.sqlite.org/pragma.html#pragma_temp_store Add: but 1 according to https://www.sqlite.org/compile.html#temp_store OK, this is really confusion: https://www.sqlite.org/tempfiles.html#tempstore It seems the compile time option
But
|
Yeah, I came across the second reference, that's why I'm asking. |
Confirmed that this branch does behave a lot better:
|
f1f8df2
to
29fbfea
Compare
Thank you for the careful review, you are absolutely right about the 0/1. I fixed that now and force pushed it down to a single commit. |
Signed-off-by: DL6ER <[email protected]>
29fbfea
to
07ccb70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this means this line can loose its PRAGME statement
Signed-off-by: Christian König <[email protected]>
What does this implement/fix?
During the development of Pi-hole v6.0, we (blindly?) followed a blog post describing that increasing the number of allowed workers as well as changing the default location for temporary objects from always-on-disk to always-in-memory is key to increased performance without doing any real measurements on this - at least it did not make things slower.
Nothing unexpected showed up during the extended v6.0 beta period but now we have #2194 and friends describing a massively increased memory and CPU usage on devices that were always on the edge of being still feasible for Pi-hole: Using millions of lists on devices that merely have 256 MB RAM for the entire system.
This PR seeks to undo these optimization-attempts as more thorough performance measurements actually revealed that
HAVE_FDATASYNC
andSQLITE_DEFAULT_SYNCHRONOUS
. This means that even the temporary files we are writing may never actually hit the disk and still live in memory if and only if there is enough RAM available (it is the yellow memory inhtop
, also called "cached"), andRelated issue or feature (if applicable): Fixes #2194
Pull request in docs with documentation (if applicable): N/A
By submitting this pull request, I confirm the following:
git rebase
)Checklist:
developmental
branch.