Running multiple SharedInterpreters, one per thread, does not seem to scale up

43 views
Skip to first unread message

andre...@gmail.com

unread,
Oct 1, 2020, 6:04:29 AM10/1/20
to Jep Project
Hi,
I'm trying to parallelize a calculation that depends on python libraries.
To do so, I've created a thread pool and associated one SharedInterpreter
for each of the threads. 

The calculation works, but it does not scale up, and indeed it's not any faster than doing it sequentially: while a jstack does not report any visible synchronization at the Java level, I'm suspecting some sort of synchronization at a lower level.

Is this normal? Can I do anything about it?

Cheers
Andrea

Ben Steffensmeier

unread,
Oct 1, 2020, 10:40:14 AM10/1/20
to Jep Project
Since jep uses cpython directly, it is limited in concurrency by the cpython GIL. See the wiki page for more information.

Ben
Reply all
Reply to author
Forward
0 new messages