Does it make sense to increase the threads number for coroutines when doing IO-bound operations?


#1

If so, can anyone show an example?


#2

It make sense to limit the thread number, always.
Moreover IO operations are really different, so choice the right thread count is a tuning option.

Do you use non-blocking IO?
Do you bound blocking operations in IO dispatcher?


#3

IO bound operations need relatively few threads if you use an “async layer” like coroutines above the threads. Coroutines that wait for a response for example are halted and the used thread is used for another the operation while the coroutine “sleeps”.


#4

Of course i just wan to to increase them, not remove the caps

The jobs are made by a 3rd party SDK. I guess yes?


#5

I don’t guess.
It looks hard for me to help you.

As a gold rule: if you do not detect have issue, you cannot fix it.