据我所知,fork-join-executor是在创建actor系统时提供non时的默认调度程序 有人可以解释一下以下内容:
fork-join-executor {
# Min number of threads to cap factor-based parallelism number to
parallelism-min = 8
# The parallelism factor is used to determine thread pool size using the
# following formula: ceil(available processors * factor). Resulting size
# is then bounded by the parallelism-min and parallelism-max values.
parallelism-factor = 3.0
# Max number of threads to cap factor-based parallelism number to
parallelism-max = 64
# Setting to "FIFO" to use queue like peeking mode which "poll" or "LIFO" to use stack
# like peeking mode which "pop".
task-peeking-mode = "FIFO"
}
虽然我理解每个单词,但我不理解这里解释的完整语义。
有人可以用英语向我解释上述配置意味着什么。通过阅读这里和那里的许多帖子,我有点理解,默认情况下,akka会设置一个threadPoolexecutor,为每个核心分配和线程。因此,如果你有2个两个核心处理器,你最终将得到4个线程。无论如何,你真正能达到多少平行。在它之上它是并发的但不完全严格地说并行。虽然这是另一个问题。
因此,如果有人能够根据处理器和核心来解释上述配置,并且结果数量的线程包含2个机器示例(根据其处理器配置),这将非常棒。
答案 0 :(得分:3)
这个问题是Viktor Klang的answered in depth on akka-user,实质上是:我们强烈建议您阅读the ForkJoinPool documentation in the JDK docs,其中深入探讨了这些问题。