Question

Number of threads from the pool

I'm using the StartNewWithUserConnection function to start a large process in multiple threads. In fact, it turns out that only 5 threads can be launched at the same time, the rest wait for the previous ones to complete and only then are executed. I couldn't find it in the settings or documentation.

Is there a way to increase the number of concurrent threads?

Like 0

Like

2 comments

Hello!



This is configured in \Terrasoft.WebApp\ActorSystem.hocon. In the section /TaskExecutorActor, there is a parameter nr-of-instances = 5.

 

However, these changes can lead to a heavy load on the database or consume the CPU of the web server and result in poor overall system performance.

For example, if you have a dedicated server with, let's say, 32 cores on the web server, it's probably conditionally safe (assuming the database server is also powerful enough) to set it to 32 or even up to %number of cores% * 2.

Thank you, Alona, it helps!

Show all comments