You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tia Haenni <ja...@kc.rr.com> on 2002/06/06 23:38:51 UTC

Tomcat 4.0.1 and memory usage

I have searched the archives for this topic, but I need more information 
to understand.  I need to limit the amount of memory used by Tomcat. I 
have Tomcat 4.0.1 running as an nt service on a Windows 2000 server box 
with redirects coming from IIS 5.0. I heard of using java -verbosegc to 
monitor gc, but as the service points at <tomcat_home>\bin\tomcat.exe, I 
don't know where this should be set. I understand the concept of setting 
for the JVM -Xmx###m and -Xms###m where ### is the amount of RAM to 
allocate for Tomcat, but again I do not know where this is set. Please 
help. TIA 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0.1 and memory usage

Posted by Phillip Morelock <su...@phillipmorelock.com>.
yes, i believe so.  there's a real answer to this, but I don't remember it.
;)

As a test, write a load-on-startup servlet that prints a bunch of stuff in
init() and check it out in /logs.  There may be something you have to set in
server.xml or whatever, but I am at least 50% sure you don't have to.
Pretty good ratio, no?

fillup


On 6/6/02 3:43 PM, "Tia Haenni" <ja...@kc.rr.com> wrote:

> ok, just one more question, if i pass an argument for -verbosegc or any
> other stuff that would normally go to the standard output (the console),
> but with running tomcat as a service there is no console window, where
> does it go? does it get dumped in a log or what?
> 
> Tia
> 
> Phillip Morelock wrote:
> 
>> Anything you would normally pass on the command line to "java" -- you put
>> into CATALINA_OPTS
>> 
>> At some point in the script that starts tomcat, you'll see a line like
>> (*approximately*)
>> $JAVACMD -classpath $SOMETHING $CATALINA_OPTS
>> 
>> or something like that -- so you can see that $CATALINA_OPTS just gets
>> passed in as a string -- are you on windows?  oh well, close enough, you get
>> the idea i think  ;)
>> 
>> I don't know the minimum it requires -- I guess that would depend on usage
>> and how many servlets/jsp's you have.
>> 
>> I set mine (for mid-sized website on one server) to 256-384 and it seems
>> almost excessive for the amount of traffic, etc.  Play with it a bit, I
>> guess would be my answer, but maybe someone else knows a more precise
>> measurement.
>> 
>> cheers
>> fillup
>> 
>> 
>> 
>> On 6/6/02 2:50 PM, "Tia Haenni" <ja...@kc.rr.com> wrote:
>> 
>>  
>> 
>>> Ok, that's simple enough. Does that limit the amount of RAM Tomcat can
>>> use? Do you know the minimum it requires? Also, would the java
>>> -verbosegc also be set in this way? TIA
>>> 
>>> Phillip Morelock wrote:
>>> 
>>>    
>>> 
>>>> Just like you set CATALINA_HOME
>>>> 
>>>> set CATALINA_OPTS to the string you want to feed the vm.
>>>> 
>>>> so 
>>>> 
>>>> %CATALINA_OPTS%  should be
>>>> -Xmx### -Xms###
>>>> 
>>>> fillup
>>>> 
>>>> 
>>>> On 6/6/02 2:38 PM, "Tia Haenni" <ja...@kc.rr.com> wrote:
>>>> 
>>>> 
>>>> 
>>>>      
>>>> 
>>>>> I have searched the archives for this topic, but I need more information
>>>>> to understand.  I need to limit the amount of memory used by Tomcat. I
>>>>> have Tomcat 4.0.1 running as an nt service on a Windows 2000 server box
>>>>> with redirects coming from IIS 5.0. I heard of using java -verbosegc to
>>>>> monitor gc, but as the service points at <tomcat_home>\bin\tomcat.exe, I
>>>>> don't know where this should be set. I understand the concept of setting
>>>>> for the JVM -Xmx###m and -Xms###m where ### is the amount of RAM to
>>>>> allocate for Tomcat, but again I do not know where this is set. Please
>>>>> help. TIA 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> To unsubscribe, e-mail:
>>>>> <ma...@jakarta.apache.org>
>>>>> For additional commands, e-mail:
>>>>> <ma...@jakarta.apache.org>
>>>>> 
>>>>>   
>>>>> 
>>>>>        
>>>>> 
>>>> --
>>>> To unsubscribe, e-mail:
>>>> <ma...@jakarta.apache.org>
>>>> For additional commands, e-mail:
>>>> <ma...@jakarta.apache.org>
>>>> 
>>>> 
>>>> 
>>>> 
>>>>      
>>>> 
>>> 
>>> 
>>> --
>>> To unsubscribe, e-mail:
>>> <ma...@jakarta.apache.org>
>>> For additional commands, e-mail:
>>> <ma...@jakarta.apache.org>
>>> 
>>>    
>>> 
>> 
>> 
>> --
>> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>> For additional commands, e-mail: <ma...@jakarta.apache.org>
>> 
>> 
>>  
>> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0.1 and memory usage

Posted by Tia Haenni <ja...@kc.rr.com>.
ok, just one more question, if i pass an argument for -verbosegc or any 
other stuff that would normally go to the standard output (the console), 
but with running tomcat as a service there is no console window, where 
does it go? does it get dumped in a log or what?

Tia

Phillip Morelock wrote:

>Anything you would normally pass on the command line to "java" -- you put
>into CATALINA_OPTS
>
>At some point in the script that starts tomcat, you'll see a line like
>(*approximately*)
>$JAVACMD -classpath $SOMETHING $CATALINA_OPTS
>
>or something like that -- so you can see that $CATALINA_OPTS just gets
>passed in as a string -- are you on windows?  oh well, close enough, you get
>the idea i think  ;)
>
>I don't know the minimum it requires -- I guess that would depend on usage
>and how many servlets/jsp's you have.
>
>I set mine (for mid-sized website on one server) to 256-384 and it seems
>almost excessive for the amount of traffic, etc.  Play with it a bit, I
>guess would be my answer, but maybe someone else knows a more precise
>measurement.
>
>cheers
>fillup
>
>
>
>On 6/6/02 2:50 PM, "Tia Haenni" <ja...@kc.rr.com> wrote:
>
>  
>
>>Ok, that's simple enough. Does that limit the amount of RAM Tomcat can
>>use? Do you know the minimum it requires? Also, would the java
>>-verbosegc also be set in this way? TIA
>>
>>Phillip Morelock wrote:
>>
>>    
>>
>>>Just like you set CATALINA_HOME
>>>
>>>set CATALINA_OPTS to the string you want to feed the vm.
>>>
>>>so 
>>>
>>>%CATALINA_OPTS%  should be
>>>-Xmx### -Xms###
>>>
>>>fillup
>>>
>>>
>>>On 6/6/02 2:38 PM, "Tia Haenni" <ja...@kc.rr.com> wrote:
>>>
>>> 
>>>
>>>      
>>>
>>>>I have searched the archives for this topic, but I need more information
>>>>to understand.  I need to limit the amount of memory used by Tomcat. I
>>>>have Tomcat 4.0.1 running as an nt service on a Windows 2000 server box
>>>>with redirects coming from IIS 5.0. I heard of using java -verbosegc to
>>>>monitor gc, but as the service points at <tomcat_home>\bin\tomcat.exe, I
>>>>don't know where this should be set. I understand the concept of setting
>>>>for the JVM -Xmx###m and -Xms###m where ### is the amount of RAM to
>>>>allocate for Tomcat, but again I do not know where this is set. Please
>>>>help. TIA 
>>>>
>>>>
>>>>
>>>>--
>>>>To unsubscribe, e-mail:
>>>><ma...@jakarta.apache.org>
>>>>For additional commands, e-mail:
>>>><ma...@jakarta.apache.org>
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>--
>>>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>>>For additional commands, e-mail: <ma...@jakarta.apache.org>
>>>
>>>
>>> 
>>>
>>>      
>>>
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>>For additional commands, e-mail: <ma...@jakarta.apache.org>
>>
>>    
>>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0.1 and memory usage

Posted by Phillip Morelock <su...@phillipmorelock.com>.
Anything you would normally pass on the command line to "java" -- you put
into CATALINA_OPTS

At some point in the script that starts tomcat, you'll see a line like
(*approximately*)
$JAVACMD -classpath $SOMETHING $CATALINA_OPTS

or something like that -- so you can see that $CATALINA_OPTS just gets
passed in as a string -- are you on windows?  oh well, close enough, you get
the idea i think  ;)

I don't know the minimum it requires -- I guess that would depend on usage
and how many servlets/jsp's you have.

I set mine (for mid-sized website on one server) to 256-384 and it seems
almost excessive for the amount of traffic, etc.  Play with it a bit, I
guess would be my answer, but maybe someone else knows a more precise
measurement.

cheers
fillup



On 6/6/02 2:50 PM, "Tia Haenni" <ja...@kc.rr.com> wrote:

> Ok, that's simple enough. Does that limit the amount of RAM Tomcat can
> use? Do you know the minimum it requires? Also, would the java
> -verbosegc also be set in this way? TIA
> 
> Phillip Morelock wrote:
> 
>> Just like you set CATALINA_HOME
>> 
>> set CATALINA_OPTS to the string you want to feed the vm.
>> 
>> so 
>> 
>> %CATALINA_OPTS%  should be
>> -Xmx### -Xms###
>> 
>> fillup
>> 
>> 
>> On 6/6/02 2:38 PM, "Tia Haenni" <ja...@kc.rr.com> wrote:
>> 
>>  
>> 
>>> I have searched the archives for this topic, but I need more information
>>> to understand.  I need to limit the amount of memory used by Tomcat. I
>>> have Tomcat 4.0.1 running as an nt service on a Windows 2000 server box
>>> with redirects coming from IIS 5.0. I heard of using java -verbosegc to
>>> monitor gc, but as the service points at <tomcat_home>\bin\tomcat.exe, I
>>> don't know where this should be set. I understand the concept of setting
>>> for the JVM -Xmx###m and -Xms###m where ### is the amount of RAM to
>>> allocate for Tomcat, but again I do not know where this is set. Please
>>> help. TIA 
>>> 
>>> 
>>> 
>>> --
>>> To unsubscribe, e-mail:
>>> <ma...@jakarta.apache.org>
>>> For additional commands, e-mail:
>>> <ma...@jakarta.apache.org>
>>> 
>>>    
>>> 
>> 
>> 
>> --
>> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>> For additional commands, e-mail: <ma...@jakarta.apache.org>
>> 
>> 
>>  
>> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0.1 and memory usage

Posted by Tia Haenni <ja...@kc.rr.com>.
Ok, that's simple enough. Does that limit the amount of RAM Tomcat can 
use? Do you know the minimum it requires? Also, would the java 
-verbosegc also be set in this way? TIA

Phillip Morelock wrote:

>Just like you set CATALINA_HOME
>
>set CATALINA_OPTS to the string you want to feed the vm.
>
>so 
>
>%CATALINA_OPTS%  should be
>-Xmx### -Xms###
>
>fillup
>
>
>On 6/6/02 2:38 PM, "Tia Haenni" <ja...@kc.rr.com> wrote:
>
>  
>
>>I have searched the archives for this topic, but I need more information
>>to understand.  I need to limit the amount of memory used by Tomcat. I
>>have Tomcat 4.0.1 running as an nt service on a Windows 2000 server box
>>with redirects coming from IIS 5.0. I heard of using java -verbosegc to
>>monitor gc, but as the service points at <tomcat_home>\bin\tomcat.exe, I
>>don't know where this should be set. I understand the concept of setting
>>for the JVM -Xmx###m and -Xms###m where ### is the amount of RAM to
>>allocate for Tomcat, but again I do not know where this is set. Please
>>help. TIA 
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>>For additional commands, e-mail: <ma...@jakarta.apache.org>
>>
>>    
>>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 4.0.1 and memory usage

Posted by Phillip Morelock <su...@phillipmorelock.com>.
Just like you set CATALINA_HOME

set CATALINA_OPTS to the string you want to feed the vm.

so 

%CATALINA_OPTS%  should be
-Xmx### -Xms###

fillup


On 6/6/02 2:38 PM, "Tia Haenni" <ja...@kc.rr.com> wrote:

> I have searched the archives for this topic, but I need more information
> to understand.  I need to limit the amount of memory used by Tomcat. I
> have Tomcat 4.0.1 running as an nt service on a Windows 2000 server box
> with redirects coming from IIS 5.0. I heard of using java -verbosegc to
> monitor gc, but as the service points at <tomcat_home>\bin\tomcat.exe, I
> don't know where this should be set. I understand the concept of setting
> for the JVM -Xmx###m and -Xms###m where ### is the amount of RAM to
> allocate for Tomcat, but again I do not know where this is set. Please
> help. TIA 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>