You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Daniel Rabe <dr...@opentext.com> on 2005/03/25 01:43:37 UTC

procrun and stack size

I'm running Tomcat 5.0.28 on Windows XP Pro. I recently discovered that the number of threads I could create from within my webapp was significantly less than I could running a program with java.exe. After a lot of research, I discovered that if you run a JVM from a C wrapper (as Tomcat does with procrun), the default stack size is taken from the "stack reserve" field in the .exe header. Passing -Xss to the created JVM does not appear to have any effect. Has anybody considered building Tomcat's procrun with a smaller stack size, to make it more consistent with java.exe? In j2sdk 1.4.2_06 (I haven't looked at other versions), java.exe is linked with a 256k stack. I would suggest that would be a reasonable size for Tomcat as well.

Thanks,
--Daniel Rabe


Re: procrun and stack size

Posted by Mladen Turk <mt...@apache.org>.
Daniel Rabe wrote:
> I'm running Tomcat 5.0.28 on Windows XP Pro. I recently discovered that the number of threads I could create from within my webapp was significantly less than I could running a program with java.exe. After a lot of research, I discovered that if you run a JVM from a C wrapper (as Tomcat does with procrun), the default stack size is taken from the "stack reserve" field in the .exe header. Passing -Xss to the created JVM does not appear to have any effect. Has anybody considered building Tomcat's procrun with a smaller stack size, to make it more consistent with java.exe? In j2sdk 1.4.2_06 (I haven't looked at other versions), java.exe is linked with a 256k stack. I would suggest that would be a reasonable size for Tomcat as well.
>

I do not understand you question.
If it's how to set the stack size for the JVM, you can either use
manager gui or when install/update parameters use the
--JvmSs=NN that will be passed as -XssNNk

OTOH have no idea what would be the 'optimum' default stack size.
Also I'm not sure that java.exe itself sets the -Xss by itself unless
you explicitly pass that in command line.

Regards,
Mladen


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org