The following VM parameters should always be set in your production environment to log relevant information. Even if they come with a small price in terms of performance costs (mostly disk I/O), if they are not set, you have quite a challenge ahead of you to resolve any VM-related problems (memory, GC, and so on) in your applications.
To retrieve basic memory details after each collection, add the following parameter:
The logged output looks like the following for a minor and major GC, respectively:
[GC 85310K->39093K(173056K), 0.0123160 secs] [Full GC 39093K->25698K(173056K), 0.1902890 secs]
First, on each line,
GC means that a minor GC is executed, whereas
Full GC naturally means that a full or ...