[cs615asa] thread number limitation on lab.cs.stevens.edu
Yuyang Zhang
yzhang14 at stevens.edu
Sun Apr 19 00:08:41 EDT 2009
Hi guys,
I wrote a program in python. It will put the inrate/outrate query work
for a single interface into a thread. Till now it works on linux-lab
and drude.
Problem happens on lab.cs.stevens.edu Seems I cannot initialize more
than 37 threads or I will have an error like
"thread.error: can't start new thread"
I also wrote another testing python script as attached. The thread
number limitation appeared again.
The python version on the three server is
lab: 2.4.3
linux-lab: 2.5.1
drude: 2.3.3
Python version on lab is in the middle of the other two, so I am
guessing the limitation might not be brought by python update. It might
be placed by OS.
If anybody knows anything about it, plz let me know. Thanks in advance
:)
Yuyang
----testing script------
#!/usr/bin/env python
import threading
import time
class MyThread ( threading.Thread ):
def run ( self ):
print "hi"
time.sleep(10)
i = 0
plist = []
while (i < 50):
thread = MyThread()
plist.append(thread)
print i
i = i + 1
print "start!"
i = 0
for p in plist:
p.start()
time.sleep(0.1)
print i
i = i + 1
# an error happens when i = 36
for p in plist:
p.join()
More information about the Cs615asa
mailing list