Re: Optimized memory Parameter in Tomcat.

2008-12-19 Thread Ronald Klop

This totally depends on what your application does.
So nobody on this list can say something about it based the information you 
give.

2GB is quite a lot of memory, so I think your application has plenty of memory 
unless it is a very memory hungry program.
On 32 bits machines 2GB is a maximum amount per process for java code + native 
code, so  giving java 2GB leaves no room for native code and makes your java 
crash with out-of-memory if the application uses a lot of memory for java 
objects. On 64 bits machines this limit is a lot higher than 2GB.

You can also use jstat to few the realtime memory usage of your jvm.
jps gives the process-id's of the java processes
jstat -gc process-id 1000
gives the memory usage every 1000 miliseconds. See the documentation for more 
info about jstat.

Greetings,

Ronald.


Op vrijdag, 19 december 2008 om 12:55 uur schreef Tomcat Users List 
users@tomcat.apache.org:


 


Hi All,

Hope all are fine and enjoying best of health... thats good to know :D

Here is my question.

our Tomcat 6 server is running on a RHL machine with 4 GB Ram. 

i have adjusted memory parameters as 


JAVA_OPTS=$JAVA_OPTS -Xms1024M -Xmx2048M -XX:PermSize=128m
-XX:MaxPermSize=128m

server is working fine with these parameters but i wnt to know that are
these parameters fine with my application or i need to change them for
better performance?

my server is running a Spring Framework mvc based application. 


with these parameters most of time i get following stats when i execute free
-m command on server in peak hours (or something like that).

[r...@vopium ~]# free -m
 total   used   free sharedbuffers cached
Mem:  4050   3622428  0385   2335


NOTE: only apache and tomcat is running on this machine. no other heavy
service running on this server.

Regards,
newbi
--
View this message in context: 
http://www.nabble.com/Optimized-memory-Parameter-in-Tomcat.-tp21090101p21090101.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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

 








RE: Optimized memory Parameter in Tomcat.

2008-12-19 Thread Peter Crowther
 From: kashif_tomcat [mailto:kas...@vopium.com]
 our Tomcat 6 server is running on a RHL machine with 4 GB Ram.

32-bit or 64-bit OS?

 JAVA_OPTS=$JAVA_OPTS -Xms1024M -Xmx2048M -XX:PermSize=128m
 -XX:MaxPermSize=128m

You probably want to make -Xms and -Xmx the same.  There's no point fragmenting 
the heap if you don't need to.

 server is working fine with these parameters but i wnt to
 know that are
 these parameters fine with my application or i need to change them for
 better performance?

You are the only person who can answer that question, by monitoring and 
profiling your application.  Performance is often 1% Tomcat and 99% application.

 with these parameters most of time i get following stats when
 i execute free
 -m command on server in peak hours (or something like that).

 [r...@vopium ~]# free -m
  total   used   free shared
 buffers cached
 Mem:  4050   3622428  0
 385   2335

Looks healthy enough.

 NOTE: only apache and tomcat is running on this machine. no
 other heavy service running on this server.

Why are you running Apache httpd as well as Tomcat?  Because the book told me 
to or because you have a real need for it?

- Peter

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



RE: Optimized memory Parameter in Tomcat.

2008-12-19 Thread kashif_tomcat

Peter,

System is 32 bit.

i want to change memory parameters. what i feel is that 1GB(min) and
2GB(max) is very high value. but i can't test it by hit and try coz its
our production server. i have used 5 times heavier application then this one
with 200mb (min) and 3.5G( maxm) parameters and it worked fine. therefore i
feel that i should fine tune these parameters...(low parameter value with
good result)

i am using apache coz front end is hosted in apache.

but i think i should use j consol or jstat like something...


Peter Crowther wrote:
 
 From: kashif_tomcat [mailto:kas...@vopium.com]
 our Tomcat 6 server is running on a RHL machine with 4 GB Ram.
 
 32-bit or 64-bit OS?
 
 JAVA_OPTS=$JAVA_OPTS -Xms1024M -Xmx2048M -XX:PermSize=128m
 -XX:MaxPermSize=128m
 
 You probably want to make -Xms and -Xmx the same.  There's no point
 fragmenting the heap if you don't need to.
 
 server is working fine with these parameters but i wnt to
 know that are
 these parameters fine with my application or i need to change them for
 better performance?
 
 You are the only person who can answer that question, by monitoring and
 profiling your application.  Performance is often 1% Tomcat and 99%
 application.
 
 with these parameters most of time i get following stats when
 i execute free
 -m command on server in peak hours (or something like that).

 [r...@vopium ~]# free -m
  total   used   free shared
 buffers cached
 Mem:  4050   3622428  0
 385   2335
 
 Looks healthy enough.
 
 NOTE: only apache and tomcat is running on this machine. no
 other heavy service running on this server.
 
 Why are you running Apache httpd as well as Tomcat?  Because the book
 told me to or because you have a real need for it?
 
 - Peter
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Optimized-memory-Parameter-in-Tomcat.-tp21090101p21091798.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: Optimized memory Parameter in Tomcat.

2008-12-19 Thread kashif_tomcat

Peter,

System is 32 bit.

i want to change memory parameters. what i feel is that 1GB(min) and
2GB(max) is very high value. but i can't test it by hit and try coz its
our production server. i have used 5 times heavier application then this one
with 200mb (min) and 3.5G( maxm) parameters and it worked fine. therefore i
feel that i should fine tune these parameters...(low parameter value with
good result)

i am using apache coz front end is hosted in apache.

but i think i should use j consol or jstat like something...


Peter Crowther wrote:
 
 From: kashif_tomcat [mailto:kas...@vopium.com]
 our Tomcat 6 server is running on a RHL machine with 4 GB Ram.
 
 32-bit or 64-bit OS?
 
 JAVA_OPTS=$JAVA_OPTS -Xms1024M -Xmx2048M -XX:PermSize=128m
 -XX:MaxPermSize=128m
 
 You probably want to make -Xms and -Xmx the same.  There's no point
 fragmenting the heap if you don't need to.
 
 server is working fine with these parameters but i wnt to
 know that are
 these parameters fine with my application or i need to change them for
 better performance?
 
 You are the only person who can answer that question, by monitoring and
 profiling your application.  Performance is often 1% Tomcat and 99%
 application.
 
 with these parameters most of time i get following stats when
 i execute free
 -m command on server in peak hours (or something like that).

 [r...@localhost ~]# free -m
  total   used   free shared
 buffers cached
 Mem:  4050   3622428  0
 385   2335
 
 Looks healthy enough.
 
 NOTE: only apache and tomcat is running on this machine. no
 other heavy service running on this server.
 
 Why are you running Apache httpd as well as Tomcat?  Because the book
 told me to or because you have a real need for it?
 
 - Peter
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Optimized-memory-Parameter-in-Tomcat.-tp21090101p21091800.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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