Improving the IdP's startup time on tomcat

Morgan, Andrew J morgan at oregonstate.edu
Wed Oct 18 15:25:34 UTC 2023


Hi Max,

We run IDP v4.3.0 on Debian's tomcat9 package on a VM.  Nothing special.  Startup time is about 12s:

  Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/idp.xml] has finished in [11,358] ms

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.

Thanks,
Andy

________________________________
From: users <users-bounces at shibboleth.net> on behalf of Max Spicer via users <users at shibboleth.net>
Sent: Wednesday, October 18, 2023 8:04 AM
To: Shib Users <users at shibboleth.net>
Cc: Max Spicer <max.spicer at york.ac.uk>
Subject: Improving the IdP's startup time on tomcat


[This email originated from outside of OSU. Use caution with links and attachments.]

I've been looking to improve the startup time of our IdP as on tomcat it was taking around 4 minutes 30 seconds. https://shibboleth.atlassian.net/wiki/spaces/IDP5/pages/3199511039/Troubleshooting is very useful and the advice to run with unpacked wars immediately takes the startup time down to around 40 seconds on tomcat9.

I've also looked at https://cwiki.apache.org/confluence/display/TOMCAT/HowTo+FasterStartUp. 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.

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.

Can anyone confirm whether this is a safe thing to do with the IdP application?

Thanks,

Max Spicer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20231018/b30b00b5/attachment.htm>


More information about the users mailing list