For a while I've had the problem that my Magento 2 installation slows down to a crawl with constant 100% processor usage after running
setup:upgrade. It starts off by taking about 10 minutes to even load the first page, and then gradually speeds up. Usually it goes back to normal after a couple of hours, but right now it's still stuck at about a minute per page after several days.
After checking the
htop to see what's going on I noticed that there is a near endless stream of
ENOENT errors, after some time the errors will be less prevalent until some hours later they stop. (see images below)
I have had this occur on other projects I have been working on as well, on a lot of different versions of Magento 2 and a lot of different combinations of modules. The only thing that seems to be a common factor is that I was using the Porto theme on all these projects, but that is one of the most popular Magento themes and I can't find anyone with similar issues.