On 16.06.2010 04:27, William A. Rowe Jr. wrote:
On 6/15/2010 7:27 PM, Guenter Knauf wrote:
Hi,
Am 16.06.2010 00:37, schrieb William A. Rowe Jr.:
Netware
=======            conf  default   proposed
StartThreads        250       50         50
MinSpareThreads      25       10         25
MaxSpareThreads     250      100        100
MaxThreads         1000     2048       1000
MaxRequestsPerChild   0        0          0
ThreadStackSize   65536    65536      65536
MaxMemFree          100        0          - (remove)

ThreadStackSize seems a bit dicey, would rather see 128k default.

Because it is the only MPM with non system default used, I wondered
whether there's a bit of history behind that value.

I'm certain :)  Guenter?  Brad?
well, I dont think a higher ThreadStackSize can hurt much beside higher
memory usage (which shouldnt be an issue nowadays). I cant tell why we
have 64k as default, but I can tell that this is 8 times as much as what
our linker uses by default if you dont specify a stacksize, so brobably
it was just a value which Brad thought would be enough when he ported
2.0 to NetWare ...; also IIRC 8k was way too less for modules like
mod_rewrite ... - but everything else seems to be coded cleaner so that
every greater memory block is aloocated rather than pushed on stack.
Also I can add that for mysql I use 128k too since had probs with the
testsuite where some tests crashed with 64k. So in general I consider a
higher stackzise more safe for bad coding where hughe memory blocks are
pushed on the stack.

Ditto with win32, but ThreadStackSize should be expressing a MAX stack
extent, not the base.  Win32 will always be starting with 4kb minimum,
but the ThreadStackSize constrains the number of threads which could be
allocated based on max stacks.

The Windows MPM uses ThreadStackSize for the reservation of stack memory (worker threads), it doesn't commit it. System default seems to be 1MB. Side comment: APR on Win instead seems to set the committed size.

For Netware I can't find any documentation whether the argument to NXContextAlloc refers to stack reservation or actually allocation, whether to initial or to max. Could be some simple mode of a fixed stack size, already alloated when NXContextAlloc() is called. Not sure.

For Unix we rely on APR, which uses pthreads and there it is the *minimum* stack size that's set (unclear whether only reserved or actually allocated). On Solaris (64Bit kernel) as an example, default values are 1MB for 32Bit processes and 2MB for 64Bit.

Rainer

Reply via email to