You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by celtic man <dh...@hotmail.com> on 2011/11/10 17:01:01 UTC

JVM config for tomcat7.0.19

Hello,

Can i set the below parameters on the setenv.sh? application running on
tomcat7.0.19 on linux 64 bit with 2GB total memory and 0.5 GB available
memory on the machine.

JAVA_OPTS=-Xms2048M -Xmx2048M -XX:Permsize=512m -XX:MaxPermsize=512m

The current setting on the setenv.sh file is :  CATALINA_OPTS=-Xmx4000M

Appreciated all the thoughts!!
-- 
View this message in context: http://old.nabble.com/JVM-config-for-tomcat7.0.19-tp32819635p32819635.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: JVM config for tomcat7.0.19

Posted by Tim Watts <ti...@cliftonfarm.org>.
On Thu, 2011-11-10 at 12:02 -0800, celtic man wrote:
> Thanks a lot for the quick response..
> 
> So i have updated the setenv.sh with   -Xms2048M -Xmx2048M -XX:Permsize=512m
> -XX:MaxPermsize=512m  and  restarted tomcat..
> 
> but when i grep for tomcat process i don't see it ..
> 
> ps -ef | grep tomcat
> root     10959     1 19 14:57 pts/4    00:00:29 /appl/java/bin/java -Dnop
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> -Djava.endorsed.dirs=/appl/tomcat/endorsed -classpath
> /appl/tomcat/bin/bootstrap.jar:/appl/tomcat/bin/tomcat-juli.jar
> -Dcatalina.base=/appl/tomcat -Dcatalina.home=/appl/tomcat
> -Djava.io.tmpdir=/appl/tomcat/temp org.apache.catalina.startup.Bootstrap
> start
> 

If that's the output of grep after starting tomcat then you are in fact
seeing it.  Tomcat is a *java* application.  Hence it runs under java.

> do you know why ??
> 
> 
> Christopher Schultz-2 wrote:
> > 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > Celtic,
> > 
> > On 11/10/11 8:01 AM, celtic man wrote:
> >> Can i set the below parameters on the setenv.sh?
> > 
> > Sure.
> > 
> >> application running on tomcat7.0.19 on linux 64 bit with 2GB total
> >> memory and 0.5 GB available memory on the machine.
> >> 
> >> JAVA_OPTS=-Xms2048M -Xmx2048M -XX:Permsize=512m
> >> -XX:MaxPermsize=512m
> > 
> > If you only have 0.5GiB available, perhaps requesting a 2GiB heap
> > isn't wise.
> > 
> >> The current setting on the setenv.sh file is :
> >> CATALINA_OPTS=-Xmx4000M
> > 
> > Well, lowering it from 4GiB to 2 GiB will certainly help free up some
> > of your RAM.
> > 
> > If you only have a 2GiB machine, why bother running 64-bit?
> > 
> > - -chris
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> > Comment: GPGTools - http://gpgtools.org
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> > 
> > iEYEARECAAYFAk68AJEACgkQ9CaO5/Lv0PBL6wCfR7KU0u5uYtX57GBJOZd6oI49
> > hzYAoLOjPtnLyZjQ7bSoOVI/ti+LO9rC
> > =qUbu
> > -----END PGP SIGNATURE-----
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> > 
> > 
> > 
> 



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


Re: JVM config for tomcat7.0.19

Posted by Tim Watts <ti...@cliftonfarm.org>.
On Fri, 2011-11-11 at 08:40 -0800, celtic man wrote:
> Is this JAVA setting below OK ?
> 
> cat /proc/meminfo
> MemTotal:      4149124 kB
> MemFree:        457884 kB
> 
> 4Gb total memory on the linux box and have 0.4GB free memory and

I think MemFree misleading.  Don't quote me but I think you have to add
Buffers as well.  Or if you can run gnome apps try running
gnome-system-monitor and click the Resources tab.  Gives a more
realistic picture I think.

> tomcat(6.0.18) running with below :
> 
> JAVA_OPTS=-Xmx2000M so that i.e 1.9GB ??
> 
> or please suggest me the best settings that i add and not have any memory
> leak issues on the application..
> 
No setting will fix a memory leak.  Eventually you'll get
OutOfMemoryExceptions.  It becomes a question of when and how often do
you want to restart.  

You haven't actually indicated in this thread whether you're getting
OOMs.  Is that the problem you're trying to address?


> 
> 
> Pid * wrote:
> > 
> > On 10/11/2011 22:45, Igor Cicimov wrote:
> >>>
> >>> JAVA_OPTS=-Xms2048M -Xmx2048M -XX:Permsize=512m -XX:MaxPermsize=512m
> >>>
> >> 
> >> You are allocating here 2.5GB of memory to tomcat ... how do you expect
> >> it
> >> to start on a box with 2GB in total of which only 500MB are available?
> > 
> > +1  It's the perfect way to achieve shockingly bad performance.
> > 
> > 
> > p
> > 
> > 
> >> On Fri, Nov 11, 2011 at 8:25 AM, Christopher Schultz <
> >> chris@christopherschultz.net> wrote:
> >> 
> >> Celtic,
> >> 
> >> On 11/10/11 12:02 PM, celtic man wrote:
> >>>>> So i have updated the setenv.sh with   -Xms2048M -Xmx2048M
> >>>>> -XX:Permsize=512m -XX:MaxPermsize=512m  and  restarted tomcat..
> >> 
> >> Where is setenv.sh located? Can you give us the full contents of that
> >> file?
> >> 
> >>>>> but when i grep for tomcat process i don't see it ..
> >>>>>
> >>>>> ps -ef | grep tomcat root     10959     1 19 14:57 pts/4
> >>>>> 00:00:29 /appl/java/bin/java -Dnop
> >>>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> >>>>> -Djava.endorsed.dirs=/appl/tomcat/endorsed -classpath
> >>>>> /appl/tomcat/bin/bootstrap.jar:/appl/tomcat/bin/tomcat-juli.jar
> >>>>> -Dcatalina.base=/appl/tomcat -Dcatalina.home=/appl/tomcat
> >>>>> -Djava.io.tmpdir=/appl/tomcat/temp
> >>>>> org.apache.catalina.startup.Bootstrap start
> >> 
> >> How are you starting Tomcat? Give us the exact command you are running.
> >> 
> >> -chris
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>
> >>>
> >> 
> > 
> > -- 
> > 
> > [key:62590808]
> > 
> > 
> >  
> > 
> 



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


Re: JVM config for tomcat7.0.19

Posted by Andrew Todd <an...@gmail.com>.
On Fri, Nov 11, 2011 at 12:59 PM, celtic man <dh...@hotmail.com>wrote:

>
> we have JAVA_OPTS set in catalina.sh
>
> start_tomcat -> /usr/local/scripts/start_tomcat
> stop_tomcat -> /usr/local/tomcat/bin/shutdown.sh
>
> MemTotal:      4149124 kB
> MemFree:        381644 kB
> Buffers:        106832 kB
> Cached:        2377208 kB
> SwapCached:          0 kB
> Active:        2646596 kB
> Inactive:       968884 kB
> HighTotal:     3276448 kB
> HighFree:       108160 kB
> LowTotal:       872676 kB
> LowFree:        273484 kB
> SwapTotal:     4194288 kB
> SwapFree:      4194064 kB
>

 Please don't top-post. Write your answers BELOW the questions they're
answering in your reply emails.

To confirm something stated above, on a Unix or Linux system, the memory
used for cache ("Cached") will basically expand to whatever space it has
available to it. So, realistically, the amount of usable free memory on
your system is closer to 2.5 GB than 400 MB.

Re: JVM config for tomcat7.0.19

Posted by celtic man <dh...@hotmail.com>.
we have JAVA_OPTS set in catalina.sh 

start_tomcat -> /usr/local/scripts/start_tomcat
stop_tomcat -> /usr/local/tomcat/bin/shutdown.sh

MemTotal:      4149124 kB
MemFree:        381644 kB
Buffers:        106832 kB
Cached:        2377208 kB
SwapCached:          0 kB
Active:        2646596 kB
Inactive:       968884 kB
HighTotal:     3276448 kB
HighFree:       108160 kB
LowTotal:       872676 kB
LowFree:        273484 kB
SwapTotal:     4194288 kB
SwapFree:      4194064 kB

Pid * wrote:
> 
> On 11/11/2011 16:40, celtic man wrote:
>> 
>> Is this JAVA setting below OK ?
>> 
>> cat /proc/meminfo
>> MemTotal:      4149124 kB
>> MemFree:        457884 kB
>> 
>> 4Gb total memory on the linux box and have 0.4GB free memory and
>> tomcat(6.0.18) running with below :
>> 
>> JAVA_OPTS=-Xmx2000M so that i.e 1.9GB ??
>> 
>> or please suggest me the best settings that i add and not have any memory
>> leak issues on the application..
> 
> Please don't top-post.
> 
> No-one can really answer the question you have asked, we don't know
> enough about your application or how much memory it needs to use.
> 
> We can only advise you to avoid bad configuration.  Trying to assign 2Gb
> to a Java process if the OS only has 0.5Gb free beforehand is bad
> configuration.  And maths, it's also Bad Maths.
> 
> 
> 
> If you use JAVA_OPTS to set memory config, (as below), you will create a
> JVM instance with 2Gb of RAM, if you are using the shutdown.sh script
> which will run as well as the existing Tomcat instance.
> 
> Both processes will end up using the swap, be horribly slow & probably
> OOM.
> 
> If you use CATALINA_OPTS, these values are not applied during shutdown
> but are used during startup.
> 
> 
> 
> You have 4Gb of physical RAM.  The amount of memory you can use for
> Tomcat is the amount of free RAM when Tomcat is not running.  If your
> server (without Tomcat) has 2Gb free, then Tomcat can use up to 2Gb.
> 
> The -Xmx and -Xms settings apply to the Object Heap.  The Object Heap is
> only one part of the memory that a Java process consumes.  (The Non-Heap
> area includes the PermGen space, for example.)
> 
> So, with 2Gb free RAM, you may be able to set -Xmx to 1.2Gb (this is a
> guess, not a hard rule).
> 
> You will have to test it yourself to determine what is safe.  Use
> VisualVM or JConsole (both are included with the JDK) to measure
> heap/non-heap usage and compare it to the amount that the OS says the
> process is using.
> 
> 
> p
> 
> 
>> Pid * wrote:
>>>
>>> On 10/11/2011 22:45, Igor Cicimov wrote:
>>>>>
>>>>> JAVA_OPTS=-Xms2048M -Xmx2048M -XX:Permsize=512m -XX:MaxPermsize=512m
>>>>>
>>>>
>>>> You are allocating here 2.5GB of memory to tomcat ... how do you expect
>>>> it
>>>> to start on a box with 2GB in total of which only 500MB are available?
>>>
>>> +1  It's the perfect way to achieve shockingly bad performance.
>>>
>>>
>>> p
>>>
>>>
>>>> On Fri, Nov 11, 2011 at 8:25 AM, Christopher Schultz <
>>>> chris@christopherschultz.net> wrote:
>>>>
>>>> Celtic,
>>>>
>>>> On 11/10/11 12:02 PM, celtic man wrote:
>>>>>>> So i have updated the setenv.sh with   -Xms2048M -Xmx2048M
>>>>>>> -XX:Permsize=512m -XX:MaxPermsize=512m  and  restarted tomcat..
>>>>
>>>> Where is setenv.sh located? Can you give us the full contents of that
>>>> file?
>>>>
>>>>>>> but when i grep for tomcat process i don't see it ..
>>>>>>>
>>>>>>> ps -ef | grep tomcat root     10959     1 19 14:57 pts/4
>>>>>>> 00:00:29 /appl/java/bin/java -Dnop
>>>>>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>>>>>>> -Djava.endorsed.dirs=/appl/tomcat/endorsed -classpath
>>>>>>> /appl/tomcat/bin/bootstrap.jar:/appl/tomcat/bin/tomcat-juli.jar
>>>>>>> -Dcatalina.base=/appl/tomcat -Dcatalina.home=/appl/tomcat
>>>>>>> -Djava.io.tmpdir=/appl/tomcat/temp
>>>>>>> org.apache.catalina.startup.Bootstrap start
>>>>
>>>> How are you starting Tomcat? Give us the exact command you are running.
>>>>
>>>> -chris
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>>
>>>
>>> -- 
>>>
>>> [key:62590808]
>>>
>>>
>>>  
>>>
>> 
> 
> 
> -- 
> 
> [key:62590808]
> 
> 
>  
> 

-- 
View this message in context: http://old.nabble.com/JVM-config-for-tomcat7.0.19-tp32819635p32827354.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: JVM config for tomcat7.0.19

Posted by Pid <pi...@pidster.com>.
On 11/11/2011 16:40, celtic man wrote:
> 
> Is this JAVA setting below OK ?
> 
> cat /proc/meminfo
> MemTotal:      4149124 kB
> MemFree:        457884 kB
> 
> 4Gb total memory on the linux box and have 0.4GB free memory and
> tomcat(6.0.18) running with below :
> 
> JAVA_OPTS=-Xmx2000M so that i.e 1.9GB ??
> 
> or please suggest me the best settings that i add and not have any memory
> leak issues on the application..

Please don't top-post.

No-one can really answer the question you have asked, we don't know
enough about your application or how much memory it needs to use.

We can only advise you to avoid bad configuration.  Trying to assign 2Gb
to a Java process if the OS only has 0.5Gb free beforehand is bad
configuration.  And maths, it's also Bad Maths.



If you use JAVA_OPTS to set memory config, (as below), you will create a
JVM instance with 2Gb of RAM, if you are using the shutdown.sh script
which will run as well as the existing Tomcat instance.

Both processes will end up using the swap, be horribly slow & probably OOM.

If you use CATALINA_OPTS, these values are not applied during shutdown
but are used during startup.



You have 4Gb of physical RAM.  The amount of memory you can use for
Tomcat is the amount of free RAM when Tomcat is not running.  If your
server (without Tomcat) has 2Gb free, then Tomcat can use up to 2Gb.

The -Xmx and -Xms settings apply to the Object Heap.  The Object Heap is
only one part of the memory that a Java process consumes.  (The Non-Heap
area includes the PermGen space, for example.)

So, with 2Gb free RAM, you may be able to set -Xmx to 1.2Gb (this is a
guess, not a hard rule).

You will have to test it yourself to determine what is safe.  Use
VisualVM or JConsole (both are included with the JDK) to measure
heap/non-heap usage and compare it to the amount that the OS says the
process is using.


p


> Pid * wrote:
>>
>> On 10/11/2011 22:45, Igor Cicimov wrote:
>>>>
>>>> JAVA_OPTS=-Xms2048M -Xmx2048M -XX:Permsize=512m -XX:MaxPermsize=512m
>>>>
>>>
>>> You are allocating here 2.5GB of memory to tomcat ... how do you expect
>>> it
>>> to start on a box with 2GB in total of which only 500MB are available?
>>
>> +1  It's the perfect way to achieve shockingly bad performance.
>>
>>
>> p
>>
>>
>>> On Fri, Nov 11, 2011 at 8:25 AM, Christopher Schultz <
>>> chris@christopherschultz.net> wrote:
>>>
>>> Celtic,
>>>
>>> On 11/10/11 12:02 PM, celtic man wrote:
>>>>>> So i have updated the setenv.sh with   -Xms2048M -Xmx2048M
>>>>>> -XX:Permsize=512m -XX:MaxPermsize=512m  and  restarted tomcat..
>>>
>>> Where is setenv.sh located? Can you give us the full contents of that
>>> file?
>>>
>>>>>> but when i grep for tomcat process i don't see it ..
>>>>>>
>>>>>> ps -ef | grep tomcat root     10959     1 19 14:57 pts/4
>>>>>> 00:00:29 /appl/java/bin/java -Dnop
>>>>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>>>>>> -Djava.endorsed.dirs=/appl/tomcat/endorsed -classpath
>>>>>> /appl/tomcat/bin/bootstrap.jar:/appl/tomcat/bin/tomcat-juli.jar
>>>>>> -Dcatalina.base=/appl/tomcat -Dcatalina.home=/appl/tomcat
>>>>>> -Djava.io.tmpdir=/appl/tomcat/temp
>>>>>> org.apache.catalina.startup.Bootstrap start
>>>
>>> How are you starting Tomcat? Give us the exact command you are running.
>>>
>>> -chris
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>
>>
>> -- 
>>
>> [key:62590808]
>>
>>
>>  
>>
> 


-- 

[key:62590808]


Re: JVM config for tomcat7.0.19

Posted by Mark Eggers <it...@yahoo.com>.
----- Original Message -----

> From: celtic man <dh...@hotmail.com>
> To: users@tomcat.apache.org
> Cc: 
> Sent: Friday, November 11, 2011 8:40 AM
> Subject: Re: JVM config for tomcat7.0.19
> 
> 
> Is this JAVA setting below OK ?
> 
> cat /proc/meminfo
> MemTotal:      4149124 kB
> MemFree:        457884 kB
> 
> 4Gb total memory on the linux box and have 0.4GB free memory and
> tomcat(6.0.18) running with below :
> 
> JAVA_OPTS=-Xmx2000M so that i.e 1.9GB ??
> 
> or please suggest me the best settings that i add and not have any memory
> leak issues on the application..
> 
> 
> 
> Pid * wrote:
>> 
>>  On 10/11/2011 22:45, Igor Cicimov wrote:
>>>> 
>>>>  JAVA_OPTS=-Xms2048M -Xmx2048M -XX:Permsize=512m 
> -XX:MaxPermsize=512m
>>>> 
>>> 
>>>  You are allocating here 2.5GB of memory to tomcat ... how do you expect
>>>  it
>>>  to start on a box with 2GB in total of which only 500MB are available?
>> 
>>  +1  It's the perfect way to achieve shockingly bad performance.
>> 
>> 
>>  p
>> 
>> 
>>>  On Fri, Nov 11, 2011 at 8:25 AM, Christopher Schultz <
>>>  chris@christopherschultz.net> wrote:
>>> 
>>>  Celtic,
>>> 
>>>  On 11/10/11 12:02 PM, celtic man wrote:
>>>>>>  So i have updated the setenv.sh with   -Xms2048M -Xmx2048M
>>>>>>  -XX:Permsize=512m -XX:MaxPermsize=512m  and  restarted 
> tomcat..
>>> 
>>>  Where is setenv.sh located? Can you give us the full contents of that
>>>  file?
>>> 
>>>>>>  but when i grep for tomcat process i don't see it ..
>>>>>> 
>>>>>>  ps -ef | grep tomcat root     10959     1 19 14:57 pts/4
>>>>>>  00:00:29 /appl/java/bin/java -Dnop
>>>>>> 
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>>>>>>  -Djava.endorsed.dirs=/appl/tomcat/endorsed -classpath
>>>>>> 
> /appl/tomcat/bin/bootstrap.jar:/appl/tomcat/bin/tomcat-juli.jar
>>>>>>  -Dcatalina.base=/appl/tomcat -Dcatalina.home=/appl/tomcat
>>>>>>  -Djava.io.tmpdir=/appl/tomcat/temp
>>>>>>  org.apache.catalina.startup.Bootstrap start
>>> 
>>>  How are you starting Tomcat? Give us the exact command you are running.
>>> 
>>>  -chris


That memory listing is really a snapshot of what's going on in your system. Without more information, it's impossible to say.

You really need to do a few things here in order to figure out optimal memory settings.

From a systems standpoint:

1. Read about how memory management works on a Linux system.

Here are a few quick references (search for more)
http://youadmin.net/wiki/Linux:RedHat_meminfo_metrics

http://www.redhat.com/magazine/001nov04/features/vm/

http://www.linuxweblog.com/meminfo


2. Run some long term monitoring on your system.

vmstat
iostat
sar

Plotting vmstat and iostat over a period of time when your application is being heavily used is useful.

Use the above tools to tune your system.

From an applications standpoint:

You mention a memory leak in your application. Feeding it more memory will just delay the inevitable. You need to fix your leaks.

First of all, you need to determine if you have a leak. Tools like JConsole, VisualVM, and mat will help with this.

Mark Thomas has given a nice presentation on out of memory issues. He's posted the link in the mailing list several times. I found one link here:

http://www.infoq.com/presentations/Diagnosing-Memory-Leaks


Once you've fixed memory leaks in your application, you'll then (with information available from the tools above) be able to set appropriate Xmx and XX:MaxPermSize.

Note, PermSize issues can be related to classes in your application registering themselves with a class loaded in a parent classloader. When you undeploy or redeploy your application, references stay around and you'll eventually get a PermGen space exception.

A good explanation (along with an example to illustrate PermGen issues) can be found here:

http://blogs.oracle.com/fkieviet/entry/classloader_leaks_the_dreaded_java


In short:

1. Measure system with system tools such as vmstat
2. Measure application with tools such as jconsole, visualvm, mat
3. Fix memory leaks (resource and classloader)
4. Then set memory based on the information from the first 3 steps

. . . just my two cents.
/mde/

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


Re: JVM config for tomcat7.0.19

Posted by celtic man <dh...@hotmail.com>.
Is this JAVA setting below OK ?

cat /proc/meminfo
MemTotal:      4149124 kB
MemFree:        457884 kB

4Gb total memory on the linux box and have 0.4GB free memory and
tomcat(6.0.18) running with below :

JAVA_OPTS=-Xmx2000M so that i.e 1.9GB ??

or please suggest me the best settings that i add and not have any memory
leak issues on the application..



Pid * wrote:
> 
> On 10/11/2011 22:45, Igor Cicimov wrote:
>>>
>>> JAVA_OPTS=-Xms2048M -Xmx2048M -XX:Permsize=512m -XX:MaxPermsize=512m
>>>
>> 
>> You are allocating here 2.5GB of memory to tomcat ... how do you expect
>> it
>> to start on a box with 2GB in total of which only 500MB are available?
> 
> +1  It's the perfect way to achieve shockingly bad performance.
> 
> 
> p
> 
> 
>> On Fri, Nov 11, 2011 at 8:25 AM, Christopher Schultz <
>> chris@christopherschultz.net> wrote:
>> 
>> Celtic,
>> 
>> On 11/10/11 12:02 PM, celtic man wrote:
>>>>> So i have updated the setenv.sh with   -Xms2048M -Xmx2048M
>>>>> -XX:Permsize=512m -XX:MaxPermsize=512m  and  restarted tomcat..
>> 
>> Where is setenv.sh located? Can you give us the full contents of that
>> file?
>> 
>>>>> but when i grep for tomcat process i don't see it ..
>>>>>
>>>>> ps -ef | grep tomcat root     10959     1 19 14:57 pts/4
>>>>> 00:00:29 /appl/java/bin/java -Dnop
>>>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>>>>> -Djava.endorsed.dirs=/appl/tomcat/endorsed -classpath
>>>>> /appl/tomcat/bin/bootstrap.jar:/appl/tomcat/bin/tomcat-juli.jar
>>>>> -Dcatalina.base=/appl/tomcat -Dcatalina.home=/appl/tomcat
>>>>> -Djava.io.tmpdir=/appl/tomcat/temp
>>>>> org.apache.catalina.startup.Bootstrap start
>> 
>> How are you starting Tomcat? Give us the exact command you are running.
>> 
>> -chris
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>> 
> 
> -- 
> 
> [key:62590808]
> 
> 
>  
> 

-- 
View this message in context: http://old.nabble.com/JVM-config-for-tomcat7.0.19-tp32819635p32826835.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: JVM config for tomcat7.0.19

Posted by Pid <pi...@pidster.com>.
On 10/11/2011 22:45, Igor Cicimov wrote:
>>
>> JAVA_OPTS=-Xms2048M -Xmx2048M -XX:Permsize=512m -XX:MaxPermsize=512m
>>
> 
> You are allocating here 2.5GB of memory to tomcat ... how do you expect it
> to start on a box with 2GB in total of which only 500MB are available?

+1  It's the perfect way to achieve shockingly bad performance.


p


> On Fri, Nov 11, 2011 at 8:25 AM, Christopher Schultz <
> chris@christopherschultz.net> wrote:
> 
> Celtic,
> 
> On 11/10/11 12:02 PM, celtic man wrote:
>>>> So i have updated the setenv.sh with   -Xms2048M -Xmx2048M
>>>> -XX:Permsize=512m -XX:MaxPermsize=512m  and  restarted tomcat..
> 
> Where is setenv.sh located? Can you give us the full contents of that
> file?
> 
>>>> but when i grep for tomcat process i don't see it ..
>>>>
>>>> ps -ef | grep tomcat root     10959     1 19 14:57 pts/4
>>>> 00:00:29 /appl/java/bin/java -Dnop
>>>> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>>>> -Djava.endorsed.dirs=/appl/tomcat/endorsed -classpath
>>>> /appl/tomcat/bin/bootstrap.jar:/appl/tomcat/bin/tomcat-juli.jar
>>>> -Dcatalina.base=/appl/tomcat -Dcatalina.home=/appl/tomcat
>>>> -Djava.io.tmpdir=/appl/tomcat/temp
>>>> org.apache.catalina.startup.Bootstrap start
> 
> How are you starting Tomcat? Give us the exact command you are running.
> 
> -chris
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 

-- 

[key:62590808]


Re: JVM config for tomcat7.0.19

Posted by Igor Cicimov <ic...@gmail.com>.
>
> JAVA_OPTS=-Xms2048M -Xmx2048M -XX:Permsize=512m -XX:MaxPermsize=512m
>

You are allocating here 2.5GB of memory to tomcat ... how do you expect it
to start on a box with 2GB in total of which only 500MB are available?


On Fri, Nov 11, 2011 at 8:25 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Celtic,
>
> On 11/10/11 12:02 PM, celtic man wrote:
> > So i have updated the setenv.sh with   -Xms2048M -Xmx2048M
> > -XX:Permsize=512m -XX:MaxPermsize=512m  and  restarted tomcat..
>
> Where is setenv.sh located? Can you give us the full contents of that
> file?
>
> > but when i grep for tomcat process i don't see it ..
> >
> > ps -ef | grep tomcat root     10959     1 19 14:57 pts/4
> > 00:00:29 /appl/java/bin/java -Dnop
> > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> > -Djava.endorsed.dirs=/appl/tomcat/endorsed -classpath
> > /appl/tomcat/bin/bootstrap.jar:/appl/tomcat/bin/tomcat-juli.jar
> > -Dcatalina.base=/appl/tomcat -Dcatalina.home=/appl/tomcat
> > -Djava.io.tmpdir=/appl/tomcat/temp
> > org.apache.catalina.startup.Bootstrap start
>
> How are you starting Tomcat? Give us the exact command you are running.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk68QVoACgkQ9CaO5/Lv0PAvHwCfditQGu0AsA5NxZD0eV1mjD1d
> hc8Anil55svBR7vxCJKxG1v4psEAA7Uw
> =zMFY
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: JVM config for tomcat7.0.19

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Celtic,

On 11/10/11 12:02 PM, celtic man wrote:
> So i have updated the setenv.sh with   -Xms2048M -Xmx2048M
> -XX:Permsize=512m -XX:MaxPermsize=512m  and  restarted tomcat..

Where is setenv.sh located? Can you give us the full contents of that
file?

> but when i grep for tomcat process i don't see it ..
> 
> ps -ef | grep tomcat root     10959     1 19 14:57 pts/4
> 00:00:29 /appl/java/bin/java -Dnop 
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
> -Djava.endorsed.dirs=/appl/tomcat/endorsed -classpath 
> /appl/tomcat/bin/bootstrap.jar:/appl/tomcat/bin/tomcat-juli.jar 
> -Dcatalina.base=/appl/tomcat -Dcatalina.home=/appl/tomcat 
> -Djava.io.tmpdir=/appl/tomcat/temp
> org.apache.catalina.startup.Bootstrap start

How are you starting Tomcat? Give us the exact command you are running.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk68QVoACgkQ9CaO5/Lv0PAvHwCfditQGu0AsA5NxZD0eV1mjD1d
hc8Anil55svBR7vxCJKxG1v4psEAA7Uw
=zMFY
-----END PGP SIGNATURE-----

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


Re: JVM config for tomcat7.0.19

Posted by celtic man <dh...@hotmail.com>.
Thanks a lot for the quick response..

So i have updated the setenv.sh with   -Xms2048M -Xmx2048M -XX:Permsize=512m
-XX:MaxPermsize=512m  and  restarted tomcat..

but when i grep for tomcat process i don't see it ..

ps -ef | grep tomcat
root     10959     1 19 14:57 pts/4    00:00:29 /appl/java/bin/java -Dnop
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.endorsed.dirs=/appl/tomcat/endorsed -classpath
/appl/tomcat/bin/bootstrap.jar:/appl/tomcat/bin/tomcat-juli.jar
-Dcatalina.base=/appl/tomcat -Dcatalina.home=/appl/tomcat
-Djava.io.tmpdir=/appl/tomcat/temp org.apache.catalina.startup.Bootstrap
start

do you know why ??


Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Celtic,
> 
> On 11/10/11 8:01 AM, celtic man wrote:
>> Can i set the below parameters on the setenv.sh?
> 
> Sure.
> 
>> application running on tomcat7.0.19 on linux 64 bit with 2GB total
>> memory and 0.5 GB available memory on the machine.
>> 
>> JAVA_OPTS=-Xms2048M -Xmx2048M -XX:Permsize=512m
>> -XX:MaxPermsize=512m
> 
> If you only have 0.5GiB available, perhaps requesting a 2GiB heap
> isn't wise.
> 
>> The current setting on the setenv.sh file is :
>> CATALINA_OPTS=-Xmx4000M
> 
> Well, lowering it from 4GiB to 2 GiB will certainly help free up some
> of your RAM.
> 
> If you only have a 2GiB machine, why bother running 64-bit?
> 
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk68AJEACgkQ9CaO5/Lv0PBL6wCfR7KU0u5uYtX57GBJOZd6oI49
> hzYAoLOjPtnLyZjQ7bSoOVI/ti+LO9rC
> =qUbu
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/JVM-config-for-tomcat7.0.19-tp32819635p32821446.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Re: JVM config for tomcat7.0.19

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Celtic,

On 11/10/11 8:01 AM, celtic man wrote:
> Can i set the below parameters on the setenv.sh?

Sure.

> application running on tomcat7.0.19 on linux 64 bit with 2GB total
> memory and 0.5 GB available memory on the machine.
> 
> JAVA_OPTS=-Xms2048M -Xmx2048M -XX:Permsize=512m
> -XX:MaxPermsize=512m

If you only have 0.5GiB available, perhaps requesting a 2GiB heap
isn't wise.

> The current setting on the setenv.sh file is :
> CATALINA_OPTS=-Xmx4000M

Well, lowering it from 4GiB to 2 GiB will certainly help free up some
of your RAM.

If you only have a 2GiB machine, why bother running 64-bit?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk68AJEACgkQ9CaO5/Lv0PBL6wCfR7KU0u5uYtX57GBJOZd6oI49
hzYAoLOjPtnLyZjQ7bSoOVI/ti+LO9rC
=qUbu
-----END PGP SIGNATURE-----

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