r/javahelp • • Jun 15 '16

Simple question about Java's use of RAM

If I run a Minecraft server and an instance of the game, do they share the same RAM specifications? I launch my game with: -Xms1024M -Xmx4G and my server with: -Xms2048M -Xmx2048M Are they using the their own specifications?

0 Upvotes

5 comments sorted by

3

u/feral_claire Software Dev Jun 16 '16

Separate programs run on separate virtual machines each with its own heap.

2

u/OmegaJunior Jun 15 '16

Since you're running multiple instances of the JVM, each will be using its own settings for heap size.

I have many microservices running, each in its own JVM instance, each with heap size and garbage collector ratios tailored to the job at hand.