Maybe it's just because run.bat
and run.sh
have been written by different people. These settings are just initial settings anyway, no one can predict what users will be doing and what settings they'll need. Just forget the difference, tune it accordingly to your needs.
EDIT: As per comment, the JVM settings are the same under Windows and AIX. However the ms
and mx
parameters don't have the same value so the heap size will grow with time if required and it's pretty impossible to predict how and when (this depends on the usage). I'd use same values for ms
and mx
to avoid that.
That said, the operating system monitoring tool (Windows perfmon or task manager or ps/top on Unix) reports the memory size of the JVM process (i.e. java.exe
on windows and java
on Unix).
The process memory [...] includes the object heap plus extra memory space due to the process executable, the thread runtime stack space, the thread object heap space, any space taken by the JNI and objects created from JNI, and also any other JVM spaces like PERM space which is where classes are loaded in most JVMs. [...] Use the OS monitor to watch the process size, and make sure it fits comfortably into RAM.
But, actually, due to the way each OS manages memory, I'm not sure ps
and the task manager will report the same thing.
Some references:
EDIT2: Checking that your JVM process fits comfortably into RAM is one thing. But checking that your JVM is well tuned (e.g. non too long major GC) is really another thing. You won't measure the second thing with ps
or the task manager, you need to profile your heap for that.