How to reduce the number of worker threads created by MsQuic ? #3060
-
Hi, I saw this discussion which propose to use QUIC_EXECUTION_PROFILE_TYPE_SCAVENGER: I used it and it reduce the number of quic_worker threads created by the RegistrationOpen function (from 16 threads to only one thread). The second function is MsQuicOpen2 which create 16 cxplat_worker threads. The last one is the ListenStart function which call QuicLibraryOnListenerRegistered which call MsQuicRegistrationOpen which create another 16 quic_worker threads. N.B. QuicLibraryOnListenerRegistered call MsQuicRegistrationOpen with this config: So, by default, 48 threads has been created. With QUIC_EXECUTION_PROFILE_TYPE_SCAVENGER, we reduce them to 33. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hi @tldQuantic, this is a work in progress. For instance, #3034 changes MsQuic to share QUIC and platform work threads when you don't specify |
Beta Was this translation helpful? Give feedback.
Hi @tldQuantic, this is a work in progress. For instance, #3034 changes MsQuic to share QUIC and platform work threads when you don't specify
QUIC_EXECUTION_PROFILE_TYPE_MAX_THROUGHPUT
. It also will allow for you to configure the number of platform threads that get created (completely in future PR). The ultimate goal is to allow the app to configure the number threads and which CPUs to run on OR to even run MsQuic from it's own threads (which might be what you really want?).