jstack trace taken while Jenkins is busy reading files
Whenever restart Jenkins it takes roughly half an hour to start up. Running strace on the process it is reading all the build histories.
I have attached a jstack taken during startup. An interesting thread is 25437.
So I guess whenever Jenkins start a project, it ends up reading all the build history for all projects which is definitively a slow operation given the number of builds logs we keep.