Hi again :

I just found out that my tests were running with TieredCompilation...

Here are some more test results below.
Conclusions:
=> TieredCompilation is a good CPU win, but often a bad elapsed choice
=> executable war & tomcat >50% elapsed overhead (?!)
=> jdwp is mostly harmless (except for Excutable WAR + JDWP + TieredCompilation)

NB :
- tested on a VM with 8 vCPUs
- tested with the following TieredCompilation options: -XX:+TieredCompilation -XX:TieredStopAtLevel=1
 


            par défaut      TieredCompilation       TieredCompilation overhead
            elapsed         CPU             elapsed         CPU             
elapsed         CPU
WarLauncher on exploded WAR 18 s 68 s 18 s 25 s 0 % -63 % WarLauncher on exploded WAR + jdwp 18 s 75 s 18 s 26 s 0 % -65 % java -jar cas.war 28 s 90 s 37 s 47 s 32 % -48 % java -jar cas.war + jdwp 31 s 106 s 96 s 109 s 210 % 3 % tomcat (exploded ou war) 28 s 91 s 33 s 43 s 18 % -53 %
  tomcat + jdwp             33 s            109 s           36 s            46 
s            9 %             -58 %
                                                     
  OVERHEADS:                                                 
  java -jar cas.war         56 %            32 %            106 %           88 
%                     
  tomcat            56 %            34 %            83 %            72 %        
             
jdwp (for WarLauncher on exploded WAR) 0 % 10 % 0 % 4 %     jdwp (for java -jar cas.war) 11 % 18 % 159 % 132 %    
  jdwp (for tomcat)         18 %            20 %            9 %             7 % 
                     

Pascal Rigaux <[email protected]> a écrit :

Hi,

I was modifying templates and found a way to keep using embedded tomcat while being able to easily modify the templates (since then I tried using templates outside of classpath[1]) :

gradle unzipWAR && java -cp "build/app:build/app/WEB-INF/classes:build/app/WEB-INF/lib/*" org.springframework.boot.loader.WarLauncher

I wondered why it was much faster to start... So I tested various possibilities. (NB: I often enable jdwp by default just in case it can be useful to see things with a debugger)

Below are some quite astonishing results...

 


             elapsed         CPU
  WarLauncher on exploded WAR        18 s            25 s
  WarLauncher on exploded WAR + jdwp         18 s            26 s
  java -jar cas.war          37 s            47 s
  java -jar cas.war + jdwp           96 s            109 s
  tomcat (exploded ou war)           33 s            43 s
  tomcat + jdwp              36 s            46 s
                      
  OVERHEADS:                  
  java -jar cas.war          106 %           88 %
  tomcat             83 %            72 %
  jdwp (for WarLauncher on exploded WAR)             0 %             4 %
  jdwp (for java -jar cas.war)       159 %           132 %
  jdwp (for tomcat)          9 %             7 %

tested with
- AdoptOpenJDK 15.0.2+7 (also tested debian openjdk 11.0.6+10-1~bpo9+1 with only minor changes)
- CAS 6.4.2 with various modules
- tomcat 9.0.54
- somewhat old OS : debian 9 on VMware

details:
- WarLauncher on exploded WAR = java -cp "build/app:build/app/WEB-INF/classes:build/app/WEB-INF/lib/*" org.springframework.boot.loader.WarLauncher
- CPU = "TIME" column of ps (ie "accumulated cpu time, user + system")
- elapsed = time it takes to reach CAS "Ready to process requests"



Liens:
------
[1] https://fawnoos.com/2021/02/16/cas63-ui-themes/

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/20211120143950.Horde.eD2876YQ4FhX_XZH2FMqRcn%40courrier.univ-paris1.fr.

Reply via email to