我有一个Beam 2.25.0管道,该管道可以获取一些数据,生成一堆更多的数据(执行扇出操作),对新数据进行分区,并在生成的数据上并行运行计算。我为工作指定的机器是n1-highmem-4,我最多指定40个工人。
在Java 8下运行良好:所有提供给该工作的工作人员都得到了充分利用(> 90%的CPU)。吞吐量为40个元素/秒。
当我重新编译并重新运行管道以使用Java 11时,为该作业提供了相同数量的工作程序,但它们仅达到30%的CPU利用率,而吞吐量则低于18 / s。
In order for me to get the job to reach the same throughput numbers, I have to specify the --numberOfWorkerHarnessThreads=4
flag, and even then, throughput is still not 40/s like when I run the pipeline under Java 8.
What could be the difference between using Java 8 vs Java 11 for the pipeline? And why wouldn't the pipeline running under Java 11 automatically utilize the workers the same way as under Java 8?
I also tried recompiling and using Beam 2.26.0 for the Java 11 pipeline execution, but it had the same throughput.
There is one bug in Beam that makes the pipeline to default to only use 1 harness thread for Batch in Java 11. Specifying numberOfWorkerHarnessThreads=4
makes the pipeline to use 4 harness would make it to use 4 thread.
您可以看到工作人员确实使用了大约25%的Cpu,(由于您使用的是四核计算机,因为它是n1-highmem-4,从帖子中看起来),这意味着100%/ 4核= 25%。
从Jira来看,它应该在2.26.0中修复,但也许被延迟到2.27.0
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句