THREAD_STACK_SIZE and python performance?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stein Morten Sandbech

    #1

    THREAD_STACK_SIZE and python performance?

    Hi,

    I've been googling for any info on the (possible)
    effects on python and python applications with
    varying values on the THREAD_STACK_SI ZE
    with respect to performance etc.

    The default 0x20000 is way to low when running
    a Zope 2.7.4 and Plone 2.0.5 site.

    The FreeBSD patch, setting the value to 0x100000
    seems to be enough for most of our zope servers,
    however, I've noticed that we get an occasional
    server death even with this value. This is on normal
    load, but handling many and large CMS operations
    in zope/plone.

    So, any thoughts on even larger thread stacks?

    On beforehand, thank you

    Stein M. Sandbech

    --sms

  • Courageous

    #2
    Re: THREAD_STACK_SI ZE and python performance?

    [color=blue]
    >The FreeBSD patch, setting the value to 0x100000
    >seems to be enough for most of our zope servers,...[/color]

    Is that value in /bytes/? In modern solaris implementations
    of posix threads, the default stack size is 2 megabytes fo 64
    bit machines.

    I can't fathom what your performance consideration would be;
    I'd think there'd not be one, with any reasonable amount of
    memory on your server.

    C//

    Comment

    • jfj

      #3
      Re: THREAD_STACK_SI ZE and python performance?

      Stein Morten Sandbech wrote:[color=blue]
      >
      > The FreeBSD patch, setting the value to 0x100000
      > seems to be enough for most of our zope servers,
      > however, I've noticed that we get an occasional
      > server death even with this value. This is on normal
      > load, but handling many and large CMS operations
      > in zope/plone.
      >[/color]

      Just curious. How much recursion are we talking about here???
      Those CMS operations. 100 calls? 1000 calls?

      If it's not near that, then the problem should be somewhere else.
      [color=blue]
      > So, any thoughts on even larger thread stacks?[/color]

      Generally there should be no problems. The only case where the
      stack size *may* matter AFAIK, may be threads. Because each thread
      has its own stack --in non-stackless python-- stack size may be an issue
      if it's too much and there are **many** threads. Otherwise, it should
      not have any impact on performance.

      jfj

      # cure to insomnia: when you lay down, try to figure out
      # WTF is wrong with you.


      Comment

      Working...