Skip to content

Instantly share code, notes, and snippets.

@franz1981
Last active November 28, 2024 07:43
Show Gist options
  • Save franz1981/97c56b7419a765bbc93b47394f9d7c38 to your computer and use it in GitHub Desktop.
Save franz1981/97c56b7419a765bbc93b47394f9d7c38 to your computer and use it in GitHub Desktop.
Results from native startup tests with different compilation levels

image

$ java -version
openjdk version "11.0.16.1" 2022-08-12
OpenJDK Runtime Environment Temurin-11.0.16.1+1 (build 11.0.16.1+1)
OpenJDK 64-Bit Server VM Temurin-11.0.16.1+1 (build 11.0.16.1+1, mixed mode)

Running application: https://github.com/topicusonderwijs/tribe-krd-quarkus

Startup tests are using an idle machine with this command

$ sync && sudo sh -c "echo 1 > /proc/sys/vm/drop_caches" && perf stat taskset -c 0,2,4,6 java -jar target/quarkus-app/quarkus-run.jar

The choice of 4 full fat cores has been made to have enough CPU resources (on purpose) for tiered compilation

-XX:TieredStopAtLevel=3

See https://www.baeldung.com/jvm-tiered-compilation

8.648s

 Performance counter stats for 'taskset -c 0,2,4,6 java -XX:TieredStopAtLevel=3 -jar target/quarkus-app/quarkus-run.jar':

         12,878.53 msec task-clock                       #    1.107 CPUs utilized          
            15,425      context-switches                 #    1.198 K/sec                  
             1,226      cpu-migrations                   #   95.197 /sec                   
           225,728      page-faults                      #   17.527 K/sec                  
    33,355,233,393      cycles                           #    2.590 GHz                    
    45,811,043,544      instructions                     #    1.37  insn per cycle         
     8,372,015,873      branches                         #  650.076 M/sec                  
       173,665,757      branch-misses                    #    2.07% of all branches        

      11.628775835 seconds time elapsed

      11.844657000 seconds user
       0.987273000 seconds sys

-XX:TieredStopAtLevel=1

6.538s

 Performance counter stats for 'taskset -c 0,2,4,6 java -XX:TieredStopAtLevel=1 -jar target/quarkus-app/quarkus-run.jar':

          9,351.25 msec task-clock                       #    0.600 CPUs utilized          
             8,516      context-switches                 #  910.681 /sec                   
               994      cpu-migrations                   #  106.296 /sec                   
           195,735      page-faults                      #   20.931 K/sec                  
    24,231,394,277      cycles                           #    2.591 GHz                    
    32,762,831,440      instructions                     #    1.35  insn per cycle         
     6,465,386,741      branches                         #  691.393 M/sec                  
       145,490,397      branch-misses                    #    2.25% of all branches        

      15.589903217 seconds time elapsed

       8.459401000 seconds user
       0.844728000 seconds sys

Tiered compilation on

6.947s

 Performance counter stats for 'taskset -c 0,2,4,6 java -jar target/quarkus-app/quarkus-run.jar':

         20,776.77 msec task-clock                       #    2.328 CPUs utilized          
            12,220      context-switches                 #  588.157 /sec                   
             1,496      cpu-migrations                   #   72.003 /sec                   
           225,418      page-faults                      #   10.850 K/sec                  
    53,866,054,393      cycles                           #    2.593 GHz                    
    65,865,633,425      instructions                     #    1.22  insn per cycle         
    12,252,214,302      branches                         #  589.707 M/sec                  
       378,216,366      branch-misses                    #    3.09% of all branches        

       8.925116604 seconds time elapsed

      19.645386000 seconds user
       1.016428000 seconds sys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment