What is the default GC schedule in Java 6? (1.6.0-25)
I wonder what is the default schedule for GC to run on Java 6 (64 bit) computers? I know it can be triggered without any schedule, but still, what is the default behavior?
I don't know if Java works like the - server option How should I check? I didn't see it in the java process command (when I did 'PS ax | grep Java'), but can it still run in server mode? Does it depend on the JVM installed or the type of physical server? Please let me know how I know this
resolvent
Solution
First, to print all default JVM settings, use: Java - XX: printflagfinal - version
By default, JVM hotspot runs in - client mode
The following parameters can be used when starting the script - XX: unlockdiagnosticvmoptions - XX: logvmoutput - XX: logfile = JVM Log to get the log containing all the properties / parameters set at VM startup
For GC, the default value is determined by JVM ergonomics. See Java se 6 hotspot [TM] virtual machine garbage collection tuning In short:
In the same document, the GC algorithm selected depends on the hardware settings, and VM will decide between serial and parallel collectors To see which one is finally running, enable GC logging
Also, you should check the following Q / A: how is the default Java heap size determined?