• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

java -Xms and -Xmx options

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't get any answer in java forums, so posting here....
I have a java application that runs on solaris and windows. Its started with java's -Xms and -Xmx options, with values 64 MB and 128 MB respectively. On Windows, it is starting up with 20 MB, but on solaris, it starts up with a whopping 117 MB! And after a while, it reaches 180 MB, and goes down with OutOfMemory error. All this only on solaris and not on win2k.... The code is totally independent of the platform. Does any one have a clue what could be the reason?
Also, please help me understand what exactly the Xms and Xmx options mean? Does this mean, there is a guarantee the max memory will not cross the value specified in Xmx?
Just an additional info, I used the 'top' command to monitor the mem on solaris. The virtual memory used for this process, during its startup is reported as 117 MB as I said.
This is very critical and urgent to me, so any help will be greatly appreciated.
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
moving to Java in General (Intermediate)
 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. I use those parameters to set the heap size in Tomcat.
-Xms is the initial heap size
-Xmx is the max
TO set an initial heap size 20 megabytes, do this -Xms20m
I think it is case sensitive.
As far as I know, based on my trial and error, my JVM starts with as little as possible i.e. with -Xms
One thing comes to mind, if your Solaris uses SMP, then GC might be your problem.
HTH :-)
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic