DietPi icon indicating copy to clipboard operation
DietPi copied to clipboard

niceness value for unbound changed?

Open z3huti opened this issue 8 months ago • 9 comments

I think a month ago when i was installing unbound with pihole, niceness value for both was -10. Or unbound was -5, not sure, but pihole for sure was -10. Now unbound nice = 0 and only pihole -10. Did niceness value for unbound changed?

z3huti avatar May 29 '25 09:05 z3huti

At least not from our side.

Joulinar avatar May 29 '25 09:05 Joulinar

could be then that unbound changed that

z3huti avatar May 29 '25 09:05 z3huti

It is uncommon that software changes the nice value for itself, especially not into negative direction (higher priority). In a very few cases it is lowered instead (positive value), and the process needs to run with specific privileges to do so. Means I am pretty sure that neither Pi-hole nor Unbound services ever changed their nice value, definitely never to negative values.

Probably you did this? It can be done via dietpi-services. It would the appear as service override:

for i in /etc/systemd/system/{unbound,pihole-FTL}.service.d/*.conf; do [[ -f $i ]] || continue; echo "### $i"; cat "$i"; done

MichaIng avatar May 29 '25 12:05 MichaIng

I just remember when i clean installed 9.12 a month ago, pihole and unbound had negative niceness value when looking in htop. Not sure exactly wat it was, -10 or more. Now with 9.13 clean install only pihole have negative value -10.

z3huti avatar May 29 '25 12:05 z3huti

I checked my production system running v9.12 still and Unbound is set to 0. Never have seen Unbound using -10.

Joulinar avatar May 29 '25 13:05 Joulinar

I see now the Pi-hole service has CAP_SYS_NICE. So there should be a setting within Pi-hole somewhere to adjust it. But I would highly recommend to not change it, as long as your system is not used for other things which can lead to delayed DNS resolution for clients. Like if you use it do download stuff in the background, or receive and store backups from other systems or such, which both is not time-critical, raising Pi-hole nice can help to prioritize it over other processes. But I personally would always reduce the nice level of the other non-critical processes instead. Only exception are maybe security-relevant processes like Fail2Ban, so it can check fail logs and deploy bans with higher priority.

Unbound starts up as root, so it generally could adjust its nice level as well. But I am not aware of a setting which would do that. So no service overrides show up with above command?

MichaIng avatar May 29 '25 13:05 MichaIng

So no service overrides show up with above command?

no reason to check that now, i have clean install already, was playing around with 9,12 install, even installed unbound test version from Debian testing repo, i think it waas 1.22, maybe that was the reason that i saw negative niceness value for unbound

other thing just came up when i was trying unattended base installation, i put AUTO_SETUP_INSTALL_SOFTWARE_ID=93 182 thats pi-hole and unbound

pi-hole did not installed, maybe coz it needs git to be installed first? number 17

z3huti avatar May 30 '25 13:05 z3huti

usually all required software will be pulled automatically.

Anyway, PiHole has an interactive installation process (from PiHole own installer) where user input is required. Therefore, it might not be possible to install PiHole interactively.

Joulinar avatar May 30 '25 13:05 Joulinar

Yeah, so far Pi-hole sadly does not support unattended installs. There is an option for that and code, but it does not fully work for fresh installs, and is not documented or promoted: https://github.com/pi-hole/pi-hole/blob/master/automated%20install/basic-install.sh#L139-L150 There is/was a PR open for years, but never merged. It is somewhat intended by its developers that admins see and confirm some things interactively, same as why they do not support automated Pi-hole updates.

  • https://github.com/pi-hole/pi-hole/pull/3195
  • https://github.com/pi-hole/pi-hole/pull/3589
  • https://github.com/pi-hole/pi-hole/pull/3590

And we do not support automated DietPi updates either, for very similar reasons.

In theory, not much is missing, and we could just patch it into the installer and allow automated installs our end, like we patch a few other dialogs irrelevant or possibly conflicting with DietPi defaults/intentions. But in this case, it acts somewhat against Pi-hole team intentions. E.g. if someone runs into an issue because of missing an info or choice of a Pi-hole installation, automated via DietPi, and then does a bug report at Pi-hole (instead of at us), it is a source of bad mood, which I would like to avoid as good as possible. I took years to move DietPi out of some bad light within parts of the Pi-hole team, as of our free webserver choice, RAM log, and some other things which indeed did not work well/as intended when installing Pi-hole via DietPi, like pihole -r. We fixed all true problems, and I think I convinced the Pi-hole team that issues reported from DietPi users in the meantime are no DietPi problems anymore, by being very attentive and reactive at the Pi-hole forum, and we should be careful to bend the intended Pi-hole installer design, potentially causing isues.

MichaIng avatar May 30 '25 13:05 MichaIng

I'll mark this as closed. Feel free to reopen if any question left.

MichaIng avatar Jun 08 '25 23:06 MichaIng

Can you give an example what you are looking for? Unbound can be installed without issue.

Joulinar avatar Jun 17 '25 16:06 Joulinar

Can you give an example what you are looking for? Unbound can be installed without issue.

Wrong thread - sorry

Dynamic5912 avatar Jun 17 '25 16:06 Dynamic5912