简体   繁体   中英

Optaplanner - multithreading

I am using optaplanner 8.17.FINAL with Java 17.0.2 inside a kube.netes cluster, my server has 32 cores + hyper threading. My app scales to 14 pods and I use moveThreadCount = 4. On a single run, everything works fine, but on a parallel run, the speed of the optaplanner drops. With 7 launches, the drop is insignificant, 5-10%. But with 14 launches, the speed drop is about 50%. Of course, you can say that there are not enough physical cores, but I'm not sure that hyperthreading works like that. In resource monitoring, I see that 60 logical cores are involved with 14 launches, but why then do the speed drop twice?

I'm tried to inscrease heap size and change garbage collector (G1GC, SerialGC, ParallelGC), but it has little effect

I am not an expert on hyperthreading by any means but perhaps OptaPlanner, by fully utilizing the entire core(s), cannot benefit from HT so much. If so, you just don't have enough CPU cores to run so many solvers in parallel, which leads to context switching and performance drop, as a result.

You can prove that by adding more cores. If it helps, it means there is no artificial bottleneck for this amount of tasks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM