Richard Mundell
2006-06-05 15:02:33 UTC
Dear all,
While Tomcat will run happily on a 64-bit edition of Windows by running it
directly through a 64-bit build of Java, the native Windows "Service"
support which is bundled with Tomcat 5.5.x is presently 32-bit only.
The reason to run Tomcat in a 64-bit environment is to run with large memory
allocations (we have the requirement to run with around 4GB of heap space).
At best you can squeeze about 1.5GB of heap allocation in a Windows 32-bit
environment. To run larger than that you'll need a 64-bit CPU and OS.
There's a couple of outstanding 'bugzilla' tickets (35869 & 39327)
requesting this support but the Tomcat developers obviously haven't had a
chance to build it into the core package yet.
So, in the meantime, for anyone attempting to run Tomcat in 64-bit mode in
Windows so save you the pain and extensive Googling to find a solution,
here's a (very) brief HOW-TO. (Note that I've got this working on Windows
2003 Server Standard 64-bit edition on an Intel chipset - I'd imagine the
same instructions would work fine on AMD environments and XP 64-bit).
1) Download and install the 64 bit edition of Java for Windows
2) Download and install the 32 bit version of Tomcat 5.5.x for Windows
3) Recompile 'procrun' (which is the binary $CATALINA_ROOT/bin/Tomcat5.exe
in the Windows distribution) using the patch listed in Bugzilla ticket 39327
(http://issues.apache.org/bugzilla/show_bug.cgi?id=39327) and replace
Tomcat5.exe with the newly compiled "prunsrv.exe".
4) Add the registry keys to Windows which are listed at the end of this
email (don't forget to adjust them to use your server's paths for the JVM
and Tomcat).
5) Using regedit, edit the HKLM\SOFTWARE\Apache Software Foundation\Procrun
2.0\Tomcat5\Parameters\Java\Options and adjust for memory settings
appropriate to your environment.
6) Start (or restart) the Apache Tomcat service. Note that although you can
stop/start the Tomcat service via the bundled Tomcat service helper, if you
need to change its configuration you will need to manually edit the registry
key mentioned in step 5.
Of course, the hardest part of this (for non-developers) is recompiling
procrun. I'd be very happy to mail you a copy of the compiled binary (for
Intel 64-bit Xeon and AMD 64-bit chipsets) that the contributor of the patch
in ticket 39237 very kindly provided for me.
This is intended as a stop-gap while the Tomcat developers implement this
into the core Windows distribution.
Good luck!
Richard
___________________________
Richard Mundell
The Roberts Group
Market Data Expertise that FITS.
www.trgrp.com
----------------------------------------------------------------------------
----------
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun
2.0\Tomcat5\Parameters\Java]
"Jvm"="C:\\jdk\\jre\\bin\\server\\jvm.dll"
"Classpath"="C:\\tomcat\\bin\\bootstrap.jar"
"Options"=hex(7):2d,00,44,00,63,00,61,00,74,00,61,00,6c,00,69,00,6e,00,61,00
,\
2e,00,68,00,6f,00,6d,00,65,00,3d,00,43,00,3a,00,5c,00,74,00,72,00,67,00,5c,\
00,66,00,69,00,74,00,73,00,77,00,65,00,62,00,5c,00,74,00,6f,00,6d,00,63,00,\
61,00,74,00,00,00,2d,00,44,00,6a,00,61,00,76,00,61,00,2e,00,65,00,6e,00,64,\
00,6f,00,72,00,73,00,65,00,64,00,2e,00,64,00,69,00,72,00,73,00,3d,00,43,00,\
3a,00,5c,00,74,00,72,00,67,00,5c,00,66,00,69,00,74,00,73,00,77,00,65,00,62,\
00,5c,00,74,00,6f,00,6d,00,63,00,61,00,74,00,5c,00,63,00,6f,00,6d,00,6d,00,\
6f,00,6e,00,5c,00,65,00,6e,00,64,00,6f,00,72,00,73,00,65,00,64,00,00,00,2d,\
00,44,00,6a,00,61,00,76,00,61,00,2e,00,69,00,6f,00,2e,00,74,00,6d,00,70,00,\
64,00,69,00,72,00,3d,00,43,00,3a,00,5c,00,74,00,72,00,67,00,5c,00,66,00,69,\
00,74,00,73,00,77,00,65,00,62,00,5c,00,74,00,6f,00,6d,00,63,00,61,00,74,00,\
5c,00,74,00,65,00,6d,00,70,00,00,00,2d,00,44,00,6a,00,61,00,76,00,61,00,2e,\
00,75,00,74,00,69,00,6c,00,2e,00,6c,00,6f,00,67,00,67,00,69,00,6e,00,67,00,\
2e,00,6d,00,61,00,6e,00,61,00,67,00,65,00,72,00,3d,00,6f,00,72,00,67,00,2e,\
00,61,00,70,00,61,00,63,00,68,00,65,00,2e,00,6a,00,75,00,6c,00,69,00,2e,00,\
43,00,6c,00,61,00,73,00,73,00,4c,00,6f,00,61,00,64,00,65,00,72,00,4c,00,6f,\
00,67,00,4d,00,61,00,6e,00,61,00,67,00,65,00,72,00,00,00,2d,00,58,00,58,00,\
3a,00,4d,00,61,00,78,00,50,00,65,00,72,00,6d,00,53,00,69,00,7a,00,65,00,3d,\
00,32,00,35,00,36,00,6d,00,00,00,2d,00,58,00,58,00,3a,00,52,00,65,00,73,00,\
65,00,72,00,76,00,65,00,64,00,43,00,6f,00,64,00,65,00,43,00,61,00,63,00,68,\
00,65,00,53,00,69,00,7a,00,65,00,3d,00,31,00,32,00,38,00,6d,00,00,00,2d,00,\
58,00,6d,00,78,00,33,00,30,00,37,00,32,00,6d,00,00,00,00,00
"JvmMs"=dword:00000000
"JvmMx"=dword:00000000
"JvmSs"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun
2.0\Tomcat5\Parameters\Log]
"Path"="C:\\tomcat\\logs"
"StdError"="auto"
"StdOutput"="auto"
"Level"="Error"
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun
2.0\Tomcat5\Parameters\Start]
"Class"="org.apache.catalina.startup.Bootstrap"
"Params"=hex(7):73,00,74,00,61,00,72,00,74,00,00,00,00,00
"Mode"="jvm"
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun
2.0\Tomcat5\Parameters\Stop]
"Class"="org.apache.catalina.startup.Bootstrap"
"Params"=hex(7):73,00,74,00,6f,00,70,00,00,00,00,00
"Mode"="jvm"
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat]
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\5.5]
"InstallPath"="C:\\tomcat"
"Version"="5.5.9"
---------------------------------------------------------------------
To start a new topic, e-mail: ***@tomcat.apache.org
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org
While Tomcat will run happily on a 64-bit edition of Windows by running it
directly through a 64-bit build of Java, the native Windows "Service"
support which is bundled with Tomcat 5.5.x is presently 32-bit only.
The reason to run Tomcat in a 64-bit environment is to run with large memory
allocations (we have the requirement to run with around 4GB of heap space).
At best you can squeeze about 1.5GB of heap allocation in a Windows 32-bit
environment. To run larger than that you'll need a 64-bit CPU and OS.
There's a couple of outstanding 'bugzilla' tickets (35869 & 39327)
requesting this support but the Tomcat developers obviously haven't had a
chance to build it into the core package yet.
So, in the meantime, for anyone attempting to run Tomcat in 64-bit mode in
Windows so save you the pain and extensive Googling to find a solution,
here's a (very) brief HOW-TO. (Note that I've got this working on Windows
2003 Server Standard 64-bit edition on an Intel chipset - I'd imagine the
same instructions would work fine on AMD environments and XP 64-bit).
1) Download and install the 64 bit edition of Java for Windows
2) Download and install the 32 bit version of Tomcat 5.5.x for Windows
3) Recompile 'procrun' (which is the binary $CATALINA_ROOT/bin/Tomcat5.exe
in the Windows distribution) using the patch listed in Bugzilla ticket 39327
(http://issues.apache.org/bugzilla/show_bug.cgi?id=39327) and replace
Tomcat5.exe with the newly compiled "prunsrv.exe".
4) Add the registry keys to Windows which are listed at the end of this
email (don't forget to adjust them to use your server's paths for the JVM
and Tomcat).
5) Using regedit, edit the HKLM\SOFTWARE\Apache Software Foundation\Procrun
2.0\Tomcat5\Parameters\Java\Options and adjust for memory settings
appropriate to your environment.
6) Start (or restart) the Apache Tomcat service. Note that although you can
stop/start the Tomcat service via the bundled Tomcat service helper, if you
need to change its configuration you will need to manually edit the registry
key mentioned in step 5.
Of course, the hardest part of this (for non-developers) is recompiling
procrun. I'd be very happy to mail you a copy of the compiled binary (for
Intel 64-bit Xeon and AMD 64-bit chipsets) that the contributor of the patch
in ticket 39237 very kindly provided for me.
This is intended as a stop-gap while the Tomcat developers implement this
into the core Windows distribution.
Good luck!
Richard
___________________________
Richard Mundell
The Roberts Group
Market Data Expertise that FITS.
www.trgrp.com
----------------------------------------------------------------------------
----------
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun
2.0\Tomcat5\Parameters\Java]
"Jvm"="C:\\jdk\\jre\\bin\\server\\jvm.dll"
"Classpath"="C:\\tomcat\\bin\\bootstrap.jar"
"Options"=hex(7):2d,00,44,00,63,00,61,00,74,00,61,00,6c,00,69,00,6e,00,61,00
,\
2e,00,68,00,6f,00,6d,00,65,00,3d,00,43,00,3a,00,5c,00,74,00,72,00,67,00,5c,\
00,66,00,69,00,74,00,73,00,77,00,65,00,62,00,5c,00,74,00,6f,00,6d,00,63,00,\
61,00,74,00,00,00,2d,00,44,00,6a,00,61,00,76,00,61,00,2e,00,65,00,6e,00,64,\
00,6f,00,72,00,73,00,65,00,64,00,2e,00,64,00,69,00,72,00,73,00,3d,00,43,00,\
3a,00,5c,00,74,00,72,00,67,00,5c,00,66,00,69,00,74,00,73,00,77,00,65,00,62,\
00,5c,00,74,00,6f,00,6d,00,63,00,61,00,74,00,5c,00,63,00,6f,00,6d,00,6d,00,\
6f,00,6e,00,5c,00,65,00,6e,00,64,00,6f,00,72,00,73,00,65,00,64,00,00,00,2d,\
00,44,00,6a,00,61,00,76,00,61,00,2e,00,69,00,6f,00,2e,00,74,00,6d,00,70,00,\
64,00,69,00,72,00,3d,00,43,00,3a,00,5c,00,74,00,72,00,67,00,5c,00,66,00,69,\
00,74,00,73,00,77,00,65,00,62,00,5c,00,74,00,6f,00,6d,00,63,00,61,00,74,00,\
5c,00,74,00,65,00,6d,00,70,00,00,00,2d,00,44,00,6a,00,61,00,76,00,61,00,2e,\
00,75,00,74,00,69,00,6c,00,2e,00,6c,00,6f,00,67,00,67,00,69,00,6e,00,67,00,\
2e,00,6d,00,61,00,6e,00,61,00,67,00,65,00,72,00,3d,00,6f,00,72,00,67,00,2e,\
00,61,00,70,00,61,00,63,00,68,00,65,00,2e,00,6a,00,75,00,6c,00,69,00,2e,00,\
43,00,6c,00,61,00,73,00,73,00,4c,00,6f,00,61,00,64,00,65,00,72,00,4c,00,6f,\
00,67,00,4d,00,61,00,6e,00,61,00,67,00,65,00,72,00,00,00,2d,00,58,00,58,00,\
3a,00,4d,00,61,00,78,00,50,00,65,00,72,00,6d,00,53,00,69,00,7a,00,65,00,3d,\
00,32,00,35,00,36,00,6d,00,00,00,2d,00,58,00,58,00,3a,00,52,00,65,00,73,00,\
65,00,72,00,76,00,65,00,64,00,43,00,6f,00,64,00,65,00,43,00,61,00,63,00,68,\
00,65,00,53,00,69,00,7a,00,65,00,3d,00,31,00,32,00,38,00,6d,00,00,00,2d,00,\
58,00,6d,00,78,00,33,00,30,00,37,00,32,00,6d,00,00,00,00,00
"JvmMs"=dword:00000000
"JvmMx"=dword:00000000
"JvmSs"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun
2.0\Tomcat5\Parameters\Log]
"Path"="C:\\tomcat\\logs"
"StdError"="auto"
"StdOutput"="auto"
"Level"="Error"
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun
2.0\Tomcat5\Parameters\Start]
"Class"="org.apache.catalina.startup.Bootstrap"
"Params"=hex(7):73,00,74,00,61,00,72,00,74,00,00,00,00,00
"Mode"="jvm"
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun
2.0\Tomcat5\Parameters\Stop]
"Class"="org.apache.catalina.startup.Bootstrap"
"Params"=hex(7):73,00,74,00,6f,00,70,00,00,00,00,00
"Mode"="jvm"
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat]
[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Tomcat\5.5]
"InstallPath"="C:\\tomcat"
"Version"="5.5.9"
---------------------------------------------------------------------
To start a new topic, e-mail: ***@tomcat.apache.org
To unsubscribe, e-mail: users-***@tomcat.apache.org
For additional commands, e-mail: users-***@tomcat.apache.org