Skip to contentSkip to main navigation Skip to footer

Understanding SPE multithreaded technologies initialization

The server.technology_multithread_initialization setting in SPE configuration allows SPE to initialize instances of technologies during startup using multiple parallel threads.

Default setting is OFF, i.e. instances of technologies are initialized using single thread, one-by-one. This allows easier tracking of eventual issues during SPE startup and better readability of technologies initialization log messages (only single initialization happens at a time).

The downside of single-threaded initialization is that it may take longer time to fully initialize the whole system, depending on the actual technologies configuration (number of initialized technologies and instances).

In multi-threaded configuration, instances of each technology are initialized in multiple parallel threads, one separate thread for each technology–model combination. This, in general, results in faster initialization of the whole system.
On the other hand, parallel threads may cause very intensive disk activity when the system reads source data for multiple technologies at the same time. This is notable especially by technologies like STT, where initialization of each model typically needs to read approx. 1 GB of data from disk. Depending on the disk subsystem performance, fragmentation, etc., this high disk activity may cause the initialization to actually take longer than if only single thread would be used.

The downside of multi-threaded initialization is somehow messy log file ;-), since the messages are written to the log as they come, making the eventual troubleshooting more difficult (nevertheless, each such message is marked by corresponding thread number).
Therefore this configuration is more suitable rather for stable environments, e.g. production deployments.

Note that separate threads are used only for distinct technology–model combinations. Multiple instances of the same technology–model combination are NOT initialized in parallel.

The number of threads used for the multi-threaded initialization can be configured using server.technology_multithread_initialization.n_threads setting. Default value is 0, which determines the number of threads automatically according to number of detected CPU cores. The value can be set manually to other number as needed.

If the number of initialization threads is set (either automatically, or manually) lower than the number of technology–model combinations to be initialized, the initialization is queued and the initializations are performed by whichever thread becomes available. In fact, single-threaded initialization follows the same principle…

If the number of initialization threads is set higher than the number of technology–model combinations to be initialized, the excessive threads are simply immediately finished and not used.

Privacy Preference Center

Necessary

Required cookies required for proper function of Word Press publication platform.

gdpr*, wordpress*,cf7*,wp-settings*,PHPSESSID

Analytics

We are using Google Analytic in Global Site Tag configuration for keeping site content optimized for great user experience. No personal data are sent.

_ga*,_gid