Thread stack tuning is more an art than a science. At least in C you know how big things on the stack are. If your threads are fairly simple (ie, don't create arbitrarily-deep call-stacks), you can usually make a rough guess, add 20%, and be done with it. Otherwise, I usually have to start with the default, and drop it in 256k increments until it dies. Then go back to the last success, then add 20-40% (depending on complexity of boundary condition handling)
fnord