1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
0
Hi, Good Question
As per https://www.databasesandlife.com/java-docker-aws-ecs-multicore/
There is no way to get Java to automatically use find out many cores are available and use them all, on AWS ECS using Docker. You have to specify how many cores you want to use via the -XX:ActiveProcessorCount option
I think you would have to use Threads in Java in order to use all cores https://gist.github.com/adrianmsmith/10be72c62c8dd292aeca9c34346bd3ea
In my case, the Runtime.getRuntime().availableProcessors() call was returning 1, even on my expensive multi-core server. Therefore only one thread was started, and all my code ran sequentially, even though multiple cores were available (and would have been used if the threads had been started.)
con risposta 2 anni fa
Contenuto pertinente
- AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata 9 mesi fa
- AWS UFFICIALEAggiornata 2 anni fa