AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
24.43k stars 1.77k forks source link

AdGuard Home makes copies of local filters #5629

Open ainar-g opened 1 year ago

ainar-g commented 1 year ago

We should inspect whether this is necessary. If not, it's better to not waste resources and disk space on that.

Original message:


On the filepath-based filters, it seems that it still makes copies of local filters lists. I even made it with the exact name and local it is saved, and refreshing makes it overwrite the list with itself. Prabably that could be improved, not making copies of local lists, because it causes unnecessary writing to the router flash...

Thu Mar 23 18:41:17 2023 daemon.err AdGuardHome[4640]: 2023/03/23 18:41:17.783850 [info] saving filter 1679514854 contents to: /opt/AdGuardHome/data/filters/1679514854.txt

filterlist

Originally posted by @cjom in https://github.com/AdguardTeam/AdGuardHome/issues/5606#issuecomment-1481782822

Mizzick commented 1 year ago

Technically, the task can be accomplished, but the disadvantage is self-evident. As long as we have all the copied filter files located within one directory, these files could easily be maintained, monitored, etc. But in case we do not copy these files, we will lose this ability.

jumpsmm7 commented 1 year ago

I have yet to see a routers flash suffer any true memory degradation from small writes such as these. https://github.com/AdguardTeam/AdGuardHome/issues/5606#issuecomment-1481782822 Especially since the routers flash is typically designed to be robust and resilient throughout its lifetime of use. If it is truly a problem, the users should consider picking a better place to store AdGuardHome.

alexsannikov commented 11 months ago

I would prefer to keep local copy, as I have SSD. Maybe those who care about storage worn out need to make a copy in memory?