The following Java startup parameters should be used (and the values adjusted) when running a Java process on a server.
When a Java process starts, it overwrites an existing GC log file. I would recommend to either use a timestamp in the filename or use the %pid placeholder.
If you want to use JMX, also add the following parameters:
Did you ever wonder what the VIRT, RES and SHR memory figures in top on Linux are supposed to tell you?
Here we go:
- VIRT – How much memory the process is able to access at the moment.
- RES – How much memory the process is actually using at the moment. This is the value you should probably be looking at and corresponds with the %MEM column.
- SHR – How much of the VIRT memory is shareable.
Continue here if you want more details:
A peek at the man page top might also help:
VIRT -- Virtual Memory Size (KiB)
The total amount of virtual memory used by the task. It includes all code, data and shared libraries plus pages that have
been swapped out and pages that have been mapped but not used.
RES -- Resident Memory Size (KiB)
The non-swapped physical memory a task is using.
SHR -- Shared Memory Size (KiB)
The amount of shared memory available to a task, not all of which is typically resident. It simply reflects memory that
could be potentially shared with other processes.