Question

I've run queries on Jena TDB and Jena In memory triple store, both on a single core machine and on a machine with 16 CPUs. I observe that in 16Cores machine Jena spawns lot of threads to handle both query and inference operations.

So I wonder, does Jena by default behaves in parallel ? or is there a way to force or avoid parallelism?

Was it helpful?

Solution

No, Jena in of itself uses minimal parallelism. In particular the query engine is entirely non-parallel in its design and implementation. Jena may on its own spawn an additional thread per-query in order to be able to monitor and kill the query if it exceeds a timeout but that will depend on the app configuration.

You've left out a lot of detail about your set up but I assume you are using Fuseki as a server for your tests?

Fuseki using the Jetty web-server framework which inherently has parallelism built in to be able to service multiple requests. So the parallelism you observe is likely just a side-effect of the web-server parallelism. If you are sending multiple requests to the the server in parallel then you will see parallel request processing on the server side.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top