1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
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.)
répondu il y a 3 ans
Contenus pertinents
- demandé il y a 2 ans
- demandé il y a 2 ans
- demandé il y a 2 mois
- AWS OFFICIELA mis à jour il y a 5 mois
- AWS OFFICIELA mis à jour il y a 8 mois
- AWS OFFICIELA mis à jour il y a 9 mois