orc-lang / orc

Orc programming language implementation
https://orc.csres.utexas.edu/
BSD 3-Clause "New" or "Revised" License
40 stars 3 forks source link

Implementation can't create 10000 threads #82

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From: Jayadev Misra
Date: August 11, 2011 17:13:16 CDT

I ran the following program which keeps all the threads until everything is 
done. For N =10, 100, 1000, the program ran in 11, 74 and 352 msecs. It has not 
terminated in 20 min for N = 10,000.

valN=10**4

defspawn(0)=0
defspawn(n)=(x>>n)<x<spawn(n-1)
spawn(N)

Original issue reported on code.google.com by jthywissen on 17 Aug 2011 at 2:16

GoogleCodeExporter commented 9 years ago
At one point in the Orc 2.0 release, I successfully tested 1000000 tokens.  
Tokens or Groups may have become too heavyweight.

Original comment by jthywissen on 17 Aug 2011 at 2:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This appears to be a threading issue, not an allocation issue.  The example (N 
= 10**4) results in java.util.concurrent.ThreadPoolExecutor creating 451,997 
java.util.concurrent.locks.AbstractQueuedSynchronizer$Nodes, when polling the 
queue for new tasks.

[previous, now deleted, comment about thread creation was erroneous.]

Original comment by jthywissen on 18 Aug 2011 at 9:52

GoogleCodeExporter commented 9 years ago
With the optimizations added in r2897 through r2908, and a bigger heap, this is 
fixed.

Original comment by jthywissen on 27 Nov 2011 at 10:38

GoogleCodeExporter commented 9 years ago

Original comment by jthywissen on 2 Sep 2014 at 7:37