Skip to content
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

unbound: num-threads max 2 #26086

Open
devianceluka opened this issue Mar 3, 2025 · 6 comments
Open

unbound: num-threads max 2 #26086

devianceluka opened this issue Mar 3, 2025 · 6 comments

Comments

@devianceluka
Copy link

devianceluka commented Mar 3, 2025

if [ $UB_N_THREADS -gt 1 ] \

Why does a system specify what would be the sane limit for the user?

option num-threads is where we specify how much threads we as users want the system to use. As it is, the only possible outcomes (over-ruled by the system/UCI init.d script) are 1 (single core) and 2.

A Redmi AX6000 has 4 cores and the init.d scripts over rules how much I can use.

2 was multi-core maybe 6 years ago, but not in 2025. In my opinion, even 6 years ago any over-ruled by the system limit was dumb.

@devianceluka devianceluka changed the title num-threads max 2 unbound: num-threads max 2 Mar 3, 2025
@brada4
Copy link

brada4 commented Mar 4, 2025

Try the shell maths yourself:
https://unbound.docs.nlnetlabs.nl/en/latest/topics/core/performance.html
It has to fit in RAM too.

@devianceluka
Copy link
Author

devianceluka commented Mar 4, 2025

The problem is not doing the math. The problem is that UCI is accepting (translating) only:

  1. option num-threads 1
  2. option num-threads 2

If I want anything over 2 there is no other choice but to use option manual_conf 1 and translate everything else also myself.

Are you implying that num-threads: 4 along with other options would not fit into 512MB or 1GB or 2GB or 4GB RAM? Also, what about x86 users?

@brada4
Copy link

brada4 commented Mar 4, 2025

Some of memory is allocated per-thread, some per-pool.

@EricLuehrsen
Copy link
Contributor

The other options need to match up with number of threads. No more than two threads should share a "slab" of DNS cache. Adding slabs makes Unbound grow quickly. Some other tuning options also get entangled. UCI is about simplicity. If you want to use Unbound at this level, then it might be time to switch to manual mode and edit the Unbound configuration directly.

@devianceluka
Copy link
Author

Understood. The only option was to manually edit.

But still. I understand its hard to calculate and waste time to make everything simple when simple isnt anywhere to start with... This limit(ation) is maybe too simple (my personal opinion). Its like either red pill or blue pill and nothing else for something that can get quite complex.

Should I close this?

@brada4
Copy link

brada4 commented Mar 10, 2025

I kind of dropped ref to official documentation mentioning options vs memories if anyone is goid at shell maths...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants