Google Cloud Dataflow + Java 8 vs Java 11:相同的管道,不同的CPU使用率

碳纤维

我有一个Beam 2.25.0管道,该管道可以获取一些数据,生成一堆更多的数据(执行扇出操作),对新数据进行分区,并在生成的数据上并行运行计算。我为工作指定的机器是n1-highmem-4,我最多指定40个工人。

在Java 8下运行良好:所有提供给该工作的工作人员都得到了充分利用(> 90%的CPU)。吞吐量为40个元素/秒。

在Java8中运行的管道

当我重新编译并重新运行管道以使用Java 11时,为该作业提供了相同数量的工作程序,但它们仅达到30%的CPU利用率,而吞吐量则低于18 / s。

Java 11中的管道

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.

Java 11的管道,并为每个工作人员指定线程

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.

Iñigo

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] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

如何使用Google Cloud Dataflow解决java.lang.NoSuchMethodError:com.google.api.services.dataflow.model.Environment.setSdkPipelineOptions?

Google Cloud Dataflow-Java SDK与Python SDK

如何从Java中的Cloud Function触发Cloud Dataflow管道作业?

如何从Java中的Cloud Function触发Cloud Dataflow管道作业?

Google Cloud Bigtable和Java 8

Google Cloud Dataflow的备用管道运行器

使用Google Cloud Dataflow生成xml文件

使用Google Cloud Dataflow合并Google Cloud Storage中的文件

使用DoFn使用Cloud Dataflow从PubSub写入Google Cloud Storage

与Cloud Dataflow搭配使用时说明Google Cloud PubSub的费用

使用Google Cloud Dataflow执行Google Bigquery查询

Google Cloud Dataflow:使用DirectPipelineRunner(本地作业)访问管道中的Google Cloud Pub / Sub吗?

从Spring控制器执行Google Cloud Dataflow管道

Google Cloud Dataflow Worker线程

在Java中使用Google Cloud Storage

使用Java挂起Google Cloud Platform实例

使用Dataflow + Beam + Python从Google Cloud Storage读取Shapefile

如何使用Google Cloud Dataflow登台其他文件?

使用Google Cloud Dataflow删除或更新数据存储属性

使用 google-cloud-dataflow beam.io.avroio.WriteToAvro(

Java减少CPU使用率

Java中的CPU使用率太低

Java线程:CPU使用率过高

Java线程-CPU使用率

Java Swing - 高 CPU 使用率

Java raytracer 增加 CPU 使用率

Java的8偷看VS地图

如何使用Google Cloud Dataflow将压缩文件写入Google Cloud Storage?

Java JAR内存使用率VS类文件内存使用率