Hi,
On Mon, Mar 9, 2015 at 10:34 AM, yossi l <
ma...@pay-per-leads.com> wrote:
> scala.concurrent.forkjoin.ForkJoinPool.scan() uses 70-80% cpu time
This usually means that the ForkJoinPool is over-provisioned with
threads that then start battling for work. For some reason Akka's
default is to allocate 3 times the numbers of cores (hyper-threads?)
the machine reports as the default size of the thread pool (see the
`akka.actor.default-dispatcher.fork-join-executor.parallelism-factor`
setting). Usually, setting this number to 1 gives better performance
if your code doesn't contain any blocking calls and the JVM can rely
on an accurate number of cores. This and the `parallelism-max` would
be the first settings I would experiment with.
> when we profile only java packages it shows sun.misc.Unsafe.park[native]
`sun.misc.Unsafe.park` means the threads are sleeping so it shouldn't
turn up in the profiles but may be if the profiler isn't advanced
enough.
Btw. searching for "parallelism-factor" in spray-user or akka-user
gives other previous discussion on the topic.
HTH
Johannes
--
Johannes
-----------------------------------------------
Johannes Rudolph
http://virtual-void.net