This is useful to avoid excessive writes to the SD card.
Just configured this manually.
Webpages (Mainpage and QueryLog) become much much much faster.
This won't be necessary with FTL
, though (it will be even much much much much faster ). You will loose your log on shutdown/power failure with tmpfs
.
loosing the log isn't that serious from my point of view. I get a new one everyday anyway...
wtf is FTL?
We implement logrotate
support with the next release, so a history of your logs is saved.
so what about leaving the latest log in tmpfs even with the risk of loss
forget about this...
May be worth it to look into the FlashMemory Plugin for OpenMediaVault. They have a setup where periodically the logs are written to disk (I think it's once a day) and on shutdown it does the same thing. That would allow the logs to persist through reboots, though you would lose the latest one in case of a power failure.
Article - Debian Admin - A transient /var/log
Script based on above article - transientlog: for raspberry pi or other SD card linux
I stumbled upon this & I'm currently using it. It loads during start-up and saves on shutdown, and is possible to schedule saves.
This is just oit of interest: Is this more like a hypothetical scenatio or are you actually having problems with SD card wearing out? I run Pi-hole for a long time, 24/7 with several active clients (about 30'000 queries a day). I still use the very same SD card I bought along my Raspberry Pi v1 (about 5 years old) and never have seen a single problem that I'd relate to the SD card.
For me it's anecdotal. I never had any problems to fix by applying such tweaks. Tweaks like this and disabling file timestamps etc are habits carried on from mechanical HDD days to SSDs before TRIM, and now it's being more irrelevant, come to think of it. "If it ain't broke, don't fix it" -- I like that because I forget it many times ; )
This FAQ may help...
Starting in v4.0, we actually don't need the log file anymore.