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

Make maximum number of threads used by web server configurable #2147

Merged
merged 2 commits into from
Jan 1, 2025

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Jan 1, 2025

What does this implement/fix?

See title. On second thought, this seems like a meaningful addition. We reduce the default to always leave at least one core unoccupied in case issues like described in #2129 appear (which is still unresolved due to us still waiting for feedback). Still, this PR seems meaningful to avoid this from preventing others to other users as well.


Related issue or feature (if applicable): N/A

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

  • The code change is tested and works locally.
  • I based my code and PRs against the repositories developmental branch.
  • I signed off all commits. Pi-hole enforces the DCO for all contributions
  • I signed all my commits. Pi-hole requires signatures to verify authorship
  • I have read the above and my PR is ready for review.

@DL6ER DL6ER requested review from a team and Copilot January 1, 2025 10:33

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 6 changed files in this pull request and generated no comments.

Files not reviewed (5)
  • src/api/docs/content/specs/config.yaml: Language not supported
  • src/config/config.c: Language not supported
  • src/config/config.h: Language not supported
  • src/webserver/webserver.c: Language not supported
  • src/webserver/webserver.h: Language not supported
Comments suppressed due to low confidence (1)

test/pihole.toml:668

  • [nitpick] The explanation of the values -1 and -2 might be confusing. Consider rephrasing to: 'The default value of -1 means that the number of threads is automatically determined by the number of online CPU cores (e.g., launching up to 8 threads on 8 cores). A value of -2 means the number of threads is twice the number of CPU cores (e.g., launching up to 16 threads on 8 cores).'
# by the number of online CPU cores (e.g.,launching up to 8 threads on 8 cores). A
src/config/config.c Outdated Show resolved Hide resolved
@DL6ER DL6ER force-pushed the new/webserver_threads branch from dc1c4c1 to 9352161 Compare January 1, 2025 11:31
@DL6ER DL6ER merged commit 3ea253b into development Jan 1, 2025
19 checks passed
@DL6ER DL6ER deleted the new/webserver_threads branch January 1, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants