Skip to content

How can I config multithreading? #1134

Answered by database64128
xinlake asked this question in Q&A
Discussion options

You must be logged in to vote

This is why I'm convinced that this option shouldn't have existed at all. We have seen more than a few times, that people with zero understanding of coroutines or scheduling are getting confused by this option and tend to misconfigure it.

To answer your question:

  1. With the trust-dns feature enabled, the number of tokio's worker threads equals the number of CPU threads on your system.
  2. Just pretend that this option does not exist and do not think about it at all.
  3. It'd be more efficient to use the servers array in config to define multiple servers for a single ssserver instance to run, because userspace coroutine scheduling is much more efficient than kernel thread scheduling.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xinlake
Comment options

Answer selected by xinlake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants