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

Large stats.db causes slowdowns in DNS lookups #3113

Open
PLight14 opened this issue May 8, 2021 · 1 comment
Open

Large stats.db causes slowdowns in DNS lookups #3113

PLight14 opened this issue May 8, 2021 · 1 comment
Assignees
Labels
needs investigation Needs to be reproduced reliably. performance Issues about performance and resource consumption research Looking up ways to improve the product in the future.

Comments

@PLight14
Copy link

PLight14 commented May 8, 2021

I have Adguard home running on a Synology NAS (HDD, no SSD). The switch from 105.2 to 106 caused dns lookup delays that did not appear in the lookup times in the query log. Websites would hang on DNS lookup for a few second. However, after clearing the history (deleting the 25mb stats.db) the delays were gone again.

This probably has something to do with a relatively slow insert (or equivalent) in the SQLite DB when it increases in size.

@ameshkov ameshkov added the needs investigation Needs to be reproduced reliably. label May 9, 2021
@ameshkov ameshkov added this to the v0.106.3 milestone May 9, 2021
@ainar-g
Copy link
Contributor

ainar-g commented May 11, 2021

Hello. The file isn't an SQLite database, unfortunately, but a BoltDB one. This is tangentially related to #2290, as we've been struggling to fine a performant, portable, reliable, and pure-Go database format. We have some experiments in the works, but unfortunately I cannot give any guarantees for now.

In the mean time, we'll probably need to be smarter about how we update statistics and its impact on the overall performance. Perhaps the DB's schema needs some rethinking as well.

@ainar-g ainar-g added performance Issues about performance and resource consumption needs investigation Needs to be reproduced reliably. research Looking up ways to improve the product in the future. and removed needs investigation Needs to be reproduced reliably. labels May 11, 2021
@ainar-g ainar-g removed this from the v0.106.3 milestone May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation Needs to be reproduced reliably. performance Issues about performance and resource consumption research Looking up ways to improve the product in the future.
Projects
None yet
Development

No branches or pull requests

3 participants