Skip to content

[DOCS] Improve worker_threads documentation #60965

Closed as not planned
Closed as not planned

Description

@qcpeter

Description
I'm struggling to get a feel for how to tune the worker_threads value for a multi-syndic/multi-master setup. I'm seeing issues with the syndic processes being able to call fire_master and also not being able to publish results to the master, however our monitoring does not indicate any excess load or CPU utilization on any of the masters. Currently this is set to 4 times the number of cores of the master host. Trying to figure this out be trial and error is quite difficult on a production cluster.

Suggested Fix
Some indication of how this parameter should scale with the number of cores and how to determine whether increasing the number of worker threads is appropriate would be really helpful, the worker_threads parameter isn't even mentioned on your Salt at Scale page.

Type of documentation
Salt documentation

Location or format of documentation
https://docs.saltproject.io/en/latest/ref/configuration/master.html#worker-threads

Activity

  1. added
    documentation
    on Sep 28, 2021
  2. added this to the Approved milestone on Sep 28, 2021
  3. waynew commented on Sep 28, 2021

    @waynew
    Contributor

    Hey @qcpeter thanks for the suggestion!

    FWIW, we've discussed deprecating syndics, though I'm not sure if we have a specific replacement in place. In any case, it does seem like a good thing to add (in particular the worker_threads bit) - if you have any of your own suggestions, PRs are always welcome and encouraged!

  4. removed their assignment
    on Sep 28, 2021
  5. qcpeter commented on Sep 28, 2021

    @qcpeter
    Author

    Hi @waynew,

    Thanks for the reply. That's very intriguing why would you plan to do that? It seems that syndics or something very similar are the only way to share the responsibilities for pillar rendering between hosts whilst also allowing commands to be issued to a large number of hosts. Would the suggesting be to scale vertically rather than horizontally?

    If there's no current guidance on the number of worker threads then I'll see what my experimentation brings up and report back.

  6. OrangeDog commented on Oct 4, 2021

    @OrangeDog
    Contributor

    Can someone update the title to not be blank?

  7. changed the title [-][DOCS][/-] [+][DOCS] Improve worker_threads documentation[/+] on Jan 24, 2022
  8. added
    severity-low
    on Jan 24, 2022
  9. whytewolf commented on Feb 10, 2022

    @whytewolf
    Collaborator

    Hi @waynew,

    Thanks for the reply. That's very intriguing why would you plan to do that? It seems that syndics or something very similar are the only way to share the responsibilities for pillar rendering between hosts whilst also allowing commands to be issued to a large number of hosts. Would the suggesting be to scale vertically rather than horizontally?

    The problem with syndic is it was a band-aid solution to the problem. It doesn't use most of the modern concepts in salt. and can be rather buggy. and a pain to work on the bugs that do crop up. there is a better solution in Saltstack Config. However a better open source solution does not currently exist. The only reason we have not actually depreciating syndic yet is that it doesn't have a replacement for scaling in open source yet.

    If there's no current guidance on the number of worker threads then I'll see what my experimentation brings up and report back.

    so, worker_threads in general should not be more then 1.5 times the number of cpus. more issues can arise from putting more as having more threads causes cpu multiplexing issues as these threads want to be high available. but with more threads then cpu you end up context switching timeouts between worker threads. this can cause a drop in queue or just no response to the queue.

  10. dwoz commented on Oct 15, 2026

    @dwoz
    Contributor

    Thanks for the original report. This issue has been open for more than three years without recent activity and carries a severity label below severity-high. As part of a backlog cleanup, we're closing older low- and medium-severity issues so triage can focus on reports against currently supported releases.

    Closing isn't a judgement that the problem wasn't real — only that the codebase has moved through several releases since this was filed, and much of the surrounding code has changed.

    If you — or anyone else — can still reproduce this on the 3008.x LTS release, please leave a comment with a reproduction and a maintainer will reopen. The original reporter can also reopen directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationseverity-lowstaletime-estimate-sprint

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions