윈도우 톰캣 메모리 설정 방법

java는 메모리 관리를 자동으로 하지만, 기본적으로 Heap메모리를 잡아두면, 많은 메모리 사용에서 유용하게 설정을 할 수 있습니다.

윈도우의 경우, Catalina.bat에서 setenv.bat파일이 있는지 확인하고, 있으면 해당 파일을 실행합니다.

(참고 catalina.bat)

 rem Get standard environment variables

if not exist "%CATALINA_BASE%\bin\setenv.bat" goto checkSetenvHome

call "%CATALINA_BASE%\bin\setenv.bat"

[경로] 

{톰캣위치}/bin/setenv.bat 파일 생성해서, Tomcat 의 JVM Heap 메모리 늘려줍니다.

setenv.bat 

 set "JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx8192m -XX:MaxPermSize=256m -server"

참고: //crunchify.com/how-to-change-jvm-heap-setting-xms-xmx-of-tomcat/

Tomcat 윈도우에서 Service로 등록하기

Installing services

The safest way to manually install the service is to use the provided service.bat script. Administrator privileges are required to run this script. If necessary, you can use the /user switch to specify a user to use for the installation of the service.

NOTE: On Windows Vista or any later operating system with User Account Control (UAC) enabled you will be asked for additional privileges when 'Tomcat8.exe' is launched by the script.
If you want to pass additional options to service installer as PR_* environment variables, you have to either configure them globally in OS, or launch the program that sets them with elevated privileges (e.g. right-click on cmd.exe and select "Run as administrator"; on Windows 8 (or later) or Windows Server 2012 (or later), you can open an elevated command prompt for the current directory from the Explorer by clicking on the "File" menu bar). See issue 56143for details.

Install the service named 'Tomcat8' C:\> service.bat install

There is a 2nd optional parameter that lets you specify the name of the service, as displayed in Windows services.

Install the service named 'MyService' C:\> service.bat install MyService

If using tomcat8.exe, you need to use the //IS// parameter.

Install the service named 'Tomcat8' C:\> tomcat8 //IS//Tomcat8 --DisplayName="Apache Tomcat 8" ^ --Install="C:\Program Files\Tomcat\bin\tomcat8.exe" --Jvm=auto ^ --StartMode=jvm --StopMode=jvm ^ --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start ^ --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop

Updating services

To update the service parameters, you need to use the //US// parameter.

Update the service named 'Tomcat8' C:\> tomcat8 //US//Tomcat8 --Description="Apache Tomcat Server - //tomcat.apache.org/ " ^ --Startup=auto --Classpath=%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar

If you gave the service an optional name, you need to specify it like this:

Update the service named 'MyService' C:\> tomcat8 //US//MyService --Description="Apache Tomcat Server - //tomcat.apache.org/ " ^ --Startup=auto --Classpath=%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar

Removing services

To remove the service, you need to use the //DS// parameter.
If the service is running it will be stopped and then deleted.

Remove the service named 'Tomcat8' C:\> tomcat8 //DS//Tomcat8

If you gave the service an optional name, you need to specify it like this:

Remove the service named 'MyService' C:\> tomcat8 //DS//MyService

출처: //tomcat.apache.org/tomcat-8.0-doc/windows-service-howto.html

도움이 되셨다면 하트모양의 "♡ 공감"을 눌러주시면 큰 격려가 됩니다.
(로그인하지 않으셔도 가능)

[펌] windows에서의 톰캣 메모리 설정1 (레지스트리를 수정하는 방법)

Tomcat

2009/07/14 09:24

//blog.naver.com/ribido74/30054284265

이 포스트를 보낸곳 ()

출처 : //aventure.tistory.com/312?srchid=BR1http%3A%2F%2Faventure.tistory.com%2F312

윈도우에서 톰캣의 heap 메모리 및 perm메모리 등의 값을 지정하기 위한 방법으로는 여러가지가 있다.
첫번째로 레지스트리를 수정하는 방법을 소개하겠다.

1. 시작 >> 실행 >> regedit 로 레지스트리 편집기를 실행한다.
2. 톰캣 메모리 설정을 위해 다음의 경로로 이동 한다.
HKEY_LOCAL_MACHINE -> SOFTWARE ->Apache Software Foundation -> Procrun 2.0 -> Confluence -> Parameters -> Java

3. heap 메모리 설정을 위해 JvmMs를 double click 한 후, 단위를 10진수(Decimal)로 선택 후 원하는 값을 셋팅한다.

4. 그 외의 perm사이즈나 로그 등의 다른 기타 옵션을 셋팅하기 위해서는 Options를 double click해서 원하는 값을 넣어주면 된다.


Toplist

최신 우편물

태그