DietPI + Pi-Hole + Unbound, is it worth to higher these processes nice?

I was wondering if it’s worth to “renice” the Pihole and Unbound priority in DietPI? I saw that, by default, it’s already a -10 and Unbound at 0. I set up both at -20, just to try, but since I’m with a rPI 4B, it’s already overkilled to run only pihole :slight_smile:

You shouldn’t use -20 since this sets it on the same level as high priority kernel threads, potentially causing issues. -10 is pretty fine if there are no other -10 processes, so kernel threads keep having highest priority but all other regular tasks are lower.

And yes, Pi-hole runs very well on RPi Zero, so on an RPi 4 with only Pi-hole and Unbound you won’t see any differences with higher nice levels most likely :wink:.

Thanks for the useful reply, TIL: don’t use -20 in nice, indeed I just got a kernel panic as you just wrote “potentially causing issues” :rofl:

I left -10 for pihole and set -5 for unbound, just for test. I don’t think it’s worth, but it’s also not dangerous.

Jep, until -19 it is all safe, but as long as there is nothing else below e.g. -1, -1 should have just the same effect.

Yes, thanks!

By the way I discovered that the kernel panic was due to the active ipv6 connection that I left (because I forgotten to change to ‘off’) active for some testing. I don’t know why but after 1-2h of running, the kernel was crashing.

I thought it was due to the renice of unbound but is not for that (it was crashing also with the default nice settings). So I turned off the ipv6 and all working fine again.

PS: the ipv6 was on but I have disabled it on my router, if I enable it dietpi doesn’t crash but if I left it on dietpi, and off on the router, dietpi crashes.

(Unfortunately I haven’t saved the log because I thought it was simply cause from my “renice experiments”.)

It could be useful a bash script that -at start- find the PID of Unbound and set a renice -5. I will dig in this when I have more time.

The nice level is best done via dietpi-services, respectively via the systemd unit itself, so no need for an additional script, PID lookup etc.

Hmm, I never heared of a kernel panic just because the router does not support it. In such case, the network adapter is assigned an LLA (Local-Link Address) only, which cannot be used for remote IPv6 connections or anything beyond a single link (the router). But since there is no IPv6 default route then, also the system won’t try to use it.