Java startup parameters

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:

Memory stats on Linux

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: