Any suggestion to start more threads at the same time?

S

smith jack

I start many threads in order to make the work done, when the
concurrent number is set to 300, all thing just works fine, but when
the number is set to 350 or higher, error just comes out? what's wrong
? the error info is just as follows: failed to start .

I am confused, does this have something to do with the operating
system, i am now using Linux, any suggestion to make the system to
support more python threads?

thank you :)
 
I

Irmen de Jong

I start many threads in order to make the work done, when the
concurrent number is set to 300, all thing just works fine, but when
the number is set to 350 or higher, error just comes out? what's wrong
? the error info is just as follows: failed to start .

I am confused, does this have something to do with the operating
system, i am now using Linux, any suggestion to make the system to
support more python threads?

thank you :)

I don't think that many threads are going to help you in any meaningful way. Especially
with Python's GIL. Can't you redesign your program to use a fixed number of threads such
as 1 per cpu core?

Or check out the multiprocessing module.

But yeah, I think your OS is preventing you from creating more threads (either due to
some artificial limit or due to lack of system memory).

Irmen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,127
Latest member
CyberDefense
Top