valodzka
valodzka

Reputation: 5805

How much memory should be set to JVM

How much memory should be configured to use if I want to utilize all server ram.

For example, if servers has 32Gb ram, which settings should be set via Xmx? 32Gb-10%? or 30Gb-4Gb? Any other heuristic?

Upvotes: 0

Views: 380

Answers (1)

jakub.petr
jakub.petr

Reputation: 3031

First step is to understand how much of your memory is really free.

1) How much does your OS take? (consider also some space for OS caches)

2) Are there any other apps running which might use significant amount of memory? (DB, etc.) How much do they usually take?

3) What kind of IO does your app do? Hard drive? Network? Both will benefit from some free memory.

If I were you I would start around (if there aren't any other apps) 24 GB. Then run some stress test and monitor memory utilization and fix your setting based on this observation.

Upvotes: 1

Related Questions