[Date Prev][Date Next]
Re: Maximum size of the primary thread pool
Rajarshi Chaudhuri wrote:
Maximum size of the primary thread pool - the default is 16. Is it
recommended to increase this value to higher ones like 32/64 etc.
We would never recommend any particular value for any particular purpose.
Without knowing the specifics of a system environment and usage patterns,
such recommendations would be meaningless.
there any loose relation between the RAM and OS and the thread pool size
that I need to consider.
Yes, each thread uses 4 or 8MB of memory for its runtime stack. (8MB on 64
bit machines). Plus there are a variety of other modules that allocate things
on a per-thread basis.
Simply, is there any guideline on this thread pool size and it’s
The guideline is "test your server at varying configurations and choose what
works best for you." The effectiveness of threading varies with machine
architecture, OS revision, and C library revision. Increasing the thread
count eventually reaches a point of zero-gain as the thread scheduling
overhead starts to overshadow the time spent actually executing user code.
This is a fundamental feature of threading, on any system with any software.
Genesys Telecommunications Lab, Inc
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
Chief Architect, OpenLDAP http://www.openldap.org/project/