I am using Nextcloud 20.0.6 with php7.4-fpm, redis and tried to optimize as much as possible.
Still I have the problem, that sometimes (not always?) the page takes more than 5 seconds to load (for example switching from Deck to Calendar). But even loading css ressources (e.g. css/core/*-server.css) takes from at least 300 ms up to sometimes 2 seconds.
I tried to profile with xdebug but it does not show a single function taking very long but all the function calls together, especially in Router.php it takes dozens of ms. Do you have any hints on what logs I can check or what profiling tools I can further use to get to the bottom of the problem?