cmd - How many JVM instances will create when we issue java command in different command prompts? -
can please tell me how many jvm instances created when issue following commands in different commands.
- command 1: c:\java -xms32m -xmx512m -xss254k accountsalary - command 2: d:\java -xms32m -xmx512m -xss254k accountsalary - command 3: c:\java -xms32m -xmx512m -xss254k accountsalary
whether use save jvm heap size or each java process different heap size?
each time run java
command, create new jvm instances. (and each jvm instance distinct process.)
so, in example, number of jvm instances 3.
jvm instances not share heaps. each 1 have own heap. there no saving of heap space creating multiple heaps. (in fact use more heap space creating multiple jvms ... compared running 3 instance of application in same jvm using multi-threading.)
the heap sizes independent. determined individual jvms' command line options ...
with jvms, memory shared between jvm instances read-only segment containing jvm code, , (possibly) shared native libraries.
historically, there have been jvms compiled java code can shared between jvms. however, complicated, , (afaik) current generation jvms don't support this.
Comments
Post a Comment