-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Memory only databases option (stats , queries etc) #5992
Comments
For query logs, there is already the |
That would be great; also if possible that be exposed as a checkbox in Web UI setting section. |
Any update on this? |
Updates #5992. Squashed commit of the following: commit 39d3df7 Author: Stanislav Chzhen <[email protected]> Date: Mon Feb 12 15:25:22 2024 +0300 all: fix typo commit 21e03e4 Author: Stanislav Chzhen <[email protected]> Date: Mon Feb 12 15:22:35 2024 +0300 all: upd docs commit 1118006 Merge: ac5fd8d 7f83707 Author: Stanislav Chzhen <[email protected]> Date: Mon Feb 12 14:57:35 2024 +0300 Merge branch 'master' into 5992-stats-qlog-custom-dir commit ac5fd8d Author: Stanislav Chzhen <[email protected]> Date: Wed Feb 7 14:55:51 2024 +0300 all: upd chlog commit fe00652 Merge: 21ad1ec 56b9808 Author: Stanislav Chzhen <[email protected]> Date: Wed Feb 7 14:53:24 2024 +0300 Merge branch 'master' into 5992-stats-qlog-custom-dir commit 21ad1ec Author: Stanislav Chzhen <[email protected]> Date: Wed Feb 7 14:52:12 2024 +0300 home: imp docs commit 739b158 Author: Stanislav Chzhen <[email protected]> Date: Mon Feb 5 20:15:50 2024 +0300 home: add stats qlog custom dir
Since v0.108.0-b.53, you can specify tmpfs directory to store query log and statistics using the new |
That's good. |
Although this feature request (i.e., writing constantly changes to tmpfs) helps your SD card a lot, you should consider using overlayroot of Raspberry Pi OS (sudo raspi-config / Performance Options / Overlay File System), after you configured your Pi properly and enabled overlayroot, all changes (were to your SD card) will be written in RAM (and discarded when you reboot the system), your SD card will be fully read-only and no bytes will be written to it, and your Pi will survive even when it loses power. It should work with other processes that write too much to your SD card. |
@ElTopo, as @schzhn mentioned, v0.107.46 includes the ability to change statistics and querylog directories without changing the entire workdir, which should allow using e.g. tmpfs for that. Any real in-memory statistics storage would have to wait either until v0.108.0 and #2290 or etcd-io/bbolt#227. |
I updated to v0.107.46 but could not find the option – neither in the gui nor in https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration |
The option is For example, this is my current configuration:
In my case, |
I found the easiest way to write log/db in memory is:
/dev/shm is typically created using 50% of memory. you can create your own tmpfs in /etc/fstab if you want more, for example |
Prerequisites
I have checked the Wiki and Discussions and found no answer
I have searched other issues and found no duplicates
I want to request a feature or enhancement and not ask a question
The problem
Adguard is writing a ton of queries to disk and this is often causes wear on SDCard with Raspberry pi.
Proposed solution
please add a configuration setting to keep the query cache and query stats "in memory only" since you already have a max cache size option anyway this should limit memory use to whatever user wants. I am totally ok with loosing the stats on occasional reboot as opposed to having the Sdcards fail
Alternatives considered and additional information
trying to set overlay FS on raspberrypi but this will not allow for adguard updates and uses more memory then an option to just store query data and cache in memory with a specified size limit
The text was updated successfully, but these errors were encountered: