Michael Fowler
asked on
Tomcat Memory Allocations
I have a website running on Tomcat and I am trying to understand the memory allocation settings specifically the Java flags -Xms & -Xms and the Tomcat --JvmMs, JvmMx memory pool allocations.
Now I have read through numerous sites including Oracle and Tomcat specifications and underrstand that these flags are used to set minimum and maximum memory poo sizes and that this relates to Garbage Collection but what this escapes me is what is the difference between these two groups of settings.
I have found with testing that setting --JvmMs & JvmMx to something really low (10m) causes Tomcat to crash during start up (no errors logged) and that setting -Xms & -Xms to 10m allows Tomcat to start but causes the site to timeout. Given this I suspect that these two sets memory allocation are controlling different aspects of the website.
Can anyone out there explain the what each of these two groups control in relation to each other.
I also find it strange that when running Tomcat in exe mode that --JvmMs and JvmMx are not used, so why are they needed for running as a service?
Now I have read through numerous sites including Oracle and Tomcat specifications and underrstand that these flags are used to set minimum and maximum memory poo sizes and that this relates to Garbage Collection but what this escapes me is what is the difference between these two groups of settings.
I have found with testing that setting --JvmMs & JvmMx to something really low (10m) causes Tomcat to crash during start up (no errors logged) and that setting -Xms & -Xms to 10m allows Tomcat to start but causes the site to timeout. Given this I suspect that these two sets memory allocation are controlling different aspects of the website.
Can anyone out there explain the what each of these two groups control in relation to each other.
I also find it strange that when running Tomcat in exe mode that --JvmMs and JvmMx are not used, so why are they needed for running as a service?
Good start is to not tune anything and analyze OOMs - do you need more memory or you need to address resource leak.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Doug
Thank you, good answer.
Any chance you know the command I could use to get this information on Win2k8
Thank you, good answer.
Any chance you know the command I could use to get this information on Win2k8
I think you can see the command line params for a running Windows process by going to:
1) Task manager
2) Switch to process tab
3) Select "View | Select columns" from the menu
4) Choosing "Command line" in the list of options
Then just hunt for Tomcat by hand in the list of tasks :)
I trust that option is available in Win2K8. I just checked and it worked for me on Windows 7.
Doug
1) Task manager
2) Switch to process tab
3) Select "View | Select columns" from the menu
4) Choosing "Command line" in the list of options
Then just hunt for Tomcat by hand in the list of tasks :)
I trust that option is available in Win2K8. I just checked and it worked for me on Windows 7.
Doug
look into catalina.out file for OOM, and change parameters with tomcat service controller.