[wildfly-dev] Disabling parallelism by tweaking java.util.concurrent.ForkJoinPool.common.parallelism

Jason Greene jason.greene at redhat.com
Wed May 28 11:26:36 EDT 2014


My complaint with the parallel API is that it makes it too easy. Just 16 characters are required to do some operation concurrently without thinking about the resource usage impact and whether or not the task at hand is even beneficial in parallel. So my fear is it will be over-used and create problems.

His point is basically right that a typical web architecture is structured to support many simultaneous users, and you therefore need to minimize the resource consumption of each action in the application. However, there are use-cases where it would make sense, such as cooperative computational applications. 

I think the big problem for us will be if frameworks we consume start making haphazard use of the platform FJ pool, so once we move to 8 we likely need to audit this area.

On May 28, 2014, at 9:30 AM, Emmanuel Hugonnet <ehugonne at redhat.com> wrote:

> Hi,
> Yesterday there was a presentation of the Java8 Stream API at the local JUG.
> According to the speaker (Paul Sandoz) parallelism should be disabled in webapps because :
> "...a machine serving web requests is usually sized/configured to maximize throughput. If web application code was using parallel streams
> then CPU resources would be consumed computing results that could otherwise be used to serve other web requests. A stream computation
> running on a fork/join pool will not block, it will try and go as fast as possible using as many resources as possible."
> 
> What do you think ?
> Emmanuel
> 
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev

--
Jason T. Greene
WildFly Lead / JBoss EAP Platform Architect
JBoss, a division of Red Hat




More information about the wildfly-dev mailing list