When does more concurrency help? How do I measure that?

If most of the tasks are IO bound you can use virtual threads to avoid that platform threads are mainly waiting on IO.

If you really have a very high CPU utilization consider to just make the EC2 instance bigger, especially if it does not need to run 24/7. Cheaper than spending too much time with the optimization.

2 Likes