How many threads are too many?

Discussion in 'Python' started by rbt, Jun 5, 2005.

  1. rbt

    rbt Guest

    This may be a stupid question, but here goes:

    When designing a threaded application, is there a pratical limit on the
    number of threads that one should use or is there a way to set it up so
    that the OS handles the number of threads automatically? I am developing
    on 32-bit x86 Intel systems with python 2.4.1. The OS will be Linux and

    I have an older app that used to work fine (254 threads) on early 2.3
    Pythons, but now, I get this error with 2.4.1 and 2.3.5:

    Traceback (most recent call last):
    File "", line 124, in ?
    File "/usr/lib/python2.3/", line 416, in start
    _start_new_thread(self.__bootstrap, ())
    thread.error: can't start new thread
    rbt, Jun 5, 2005
    1. Advertisements

  2. rbt

    Aahz Guest

    The practical limit is somewhere between five and a hundred threads,
    depending on what you're doing. The more I/O you're doing, the more
    greater numbers of threads will benefit you.
    That's rather odd. Which OS is this? Did you build Python yourself or
    did you download it?
    Aahz, Jun 12, 2005
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.