Eric Wong <normalperson / yhbt.net> wrote:
> Lowering RUBY_STACK_MIN_LIMIT to 64KB across the board in
> thread_pthread.c seems to work fine for check, test-rubyspec,
> benchmark-each.
> 
> No real code, though, and I also don't know what outside C extensions
> do, but 64KB is the PTHREAD_STACK_MIN for my platform (and I've always
> felt it was too high).

I was wrong about 64KB on my system 16KB is the minimum with NPTL :x

The lowest successful stack size I've been able to run is 48K, I get
stack corruption and GC failures with 44K and lower.

I've also run my Rainbows! web server[1] integration/torture test suite
with several threaded options and everything pased with 48K and didn't
notice ill effects.  44K seemed fine, too, I think, but 32K failed
Rainbows! tests miserably.


To be on the safe side with existing code/extensions and maybe some
overaggressive alloca() calls, I think 64KB is reasonable.

[1] - http://rainbows.rubyforge.org/ + http://bogomips.org/rainbows.git

-- 
Eric Wong