我对 spark.cores.max
的定义感到困惑
我在网上得到的是
spark.cores.max represents the total number of CPU cores for the whole application
我的集群有 8 个工作节点和 1 个主节点。每个节点都有 4 个内核和 100 GB 内存。
它是指每个工作节点或所有 8 个工作节点中的内核总数?
如果我将 spark.cores.max 设置为 12 并且 cores/executor 为 4,这意味着什么?
最佳答案
来自 Spark 文档:
When running on a standalone deploy cluster or a Mesos cluster in "coarse-grained" sharing mode, the maximum amount of CPU cores to request for the application from across the cluster (not from each machine). If not set, the default will be spark.deploy.defaultCores on Spark's standalone cluster manager, or infinite (all available cores) on Mesos.
spark.cores.max 限制 spark 作业将使用的核心数。如果您未设置,它将使用“spark.deploy.defaultCores”值。
在您的示例中,spark.executor.cores = 4 和 spark.cores.max = 12 将表明您的作业将具有三个执行器 (12/4),每个执行器具有 4 个核心。
set spark.cores.max to 12 and cores/executor is 4
此属性将允许您在同一 spark 集群中同时运行多个作业。
问候
关于apache-spark - spark.cores.max 是如何工作的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65214570/