<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hi Max,</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
We run IDP v4.3.0 on Debian's tomcat9 package on a VM. Nothing special. Startup time is about 12s:</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/idp.xml] has finished in [11,358] ms</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
I remember there was a huge difference in startup time when we switched to use the MetaData Query protocol (MDQ) instead of loading the full InCommon (eduGain) metadata. If you have a large metadata feed, that might the main reason for the slow start.</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
Thanks,</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
Andy</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> users <users-bounces@shibboleth.net> on behalf of Max Spicer via users <users@shibboleth.net><br>
<b>Sent:</b> Wednesday, October 18, 2023 8:04 AM<br>
<b>To:</b> Shib Users <users@shibboleth.net><br>
<b>Cc:</b> Max Spicer <max.spicer@york.ac.uk><br>
<b>Subject:</b> Improving the IdP's startup time on tomcat</font>
<div> </div>
</div>
<div>
<p><span style="color:#D73F09">[This email originated from outside of OSU. Use caution with links and attachments.]</span></p>
<div>
<div dir="ltr">
<div dir="ltr" class="x_gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div style="font-size:small">I've been looking to improve the startup time of our IdP as on tomcat it was taking around 4 minutes 30 seconds. <a href="https://shibboleth.atlassian.net/wiki/spaces/IDP5/pages/3199511039/Troubleshooting" originalsrc="https://shibboleth.atlassian.net/wiki/spaces/IDP5/pages/3199511039/Troubleshooting" shash="nWTIkPskvREMW0coJa15QKgsmfQTDt0aiLrprrCeqGK0z4gSB+tu9w/1Esa35sVIfd6mCSkKlJh8/2HI/+j2tjb3d88ytV/zWtfnPB0nODoHqmpqY43Gk+LW4rkPb0YRyw3nhGmueAOP1desHPOmI3HPOFn0oH/B1kTHHzezYqI=">https://shibboleth.atlassian.net/wiki/spaces/IDP5/pages/3199511039/Troubleshooting</a>
is very useful and the advice to run with unpacked wars immediately takes the startup time down to around 40 seconds on tomcat9.</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">I've also looked at <a href="https://cwiki.apache.org/confluence/display/TOMCAT/HowTo+FasterStartUp" originalsrc="https://cwiki.apache.org/confluence/display/TOMCAT/HowTo+FasterStartUp" shash="uqRmLl1AUbwk7TThbE/UVSkgcb5mPx0ZurJ3zVx8eUae4jOf003TQ6MHMizcl6EFqpfKitc+3qoT6hIq+rypRGS30NzrQyCmEOnh15OP54i0SJPNXYywER/vElZY41UHamm26dmLCxWa1B8qmqiE+SBf48sVE5KUhH5dTQYFTaQ=">
https://cwiki.apache.org/confluence/display/TOMCAT/HowTo+FasterStartUp</a>. This suggests setting metadata-complete="true" in web.xml and adding an empty <absolute-ordering /> element. This takes almost another 10 seconds off the time.</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">These last changes stop Tomcat from scanning the web application and its libraries for classes that use annotations to define components of a web application (Servlets etc.). If there is a SCI with a @HandlesTypes annotation it
also means it will not scan for classes that use annotations or interfaces specified in that annotation.</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">Can anyone confirm whether this is a safe thing to do with the IdP application?</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">Thanks,</div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">Max Spicer</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>