-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add script to analyze installer log for action run times #989
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea. That made me think: we parse the report and I wonder if we should just always gather this and put at the debug level as a hook.
profile << {:task => evaltrace[:resource], :time => evaltrace[:time].to_f} | ||
end | ||
|
||
profile.sort! { |a,b| b[:time] <=> a[:time] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer sort_by
when I can
profile.sort! { |a,b| b[:time] <=> a[:time] } | |
profile.sort_by! { |p| p[:time] } |
This runs
This all also loads the Rails environment one way or another. So that's 7 times we do something that takes at least 25 seconds. I have no idea if we can, but any time we can save there pays itself back very well. That said, in some things the Puppet model just limits us. If there was a way to determine if something changed rather (like Ansible) than needing to run some expensive script it would speed up. More importantly. the services can start in parallel. I've been wondering if we can define a systemd target ( |
Note that https://github.com/Shopify/bootsnap says it can work in production:
Also:
We currently on have: So it's not used in production. |
I gave this a cursory test in production, on an already installed machine, re-running the installer but with services stopped. Before bootsnap:
After bootsnap:
Bootsnap saves ~43 seconds. For a fresh installation scenario with bootsnap, total 220 sec and 276 for non-bootsnap saving the same amount of time:
|
That's nice win IMHO. They do mention the cache directory isn't cleaned so let's discuss strategies for that. If it's stored in |
I've had this little script for a while, and wanted to stop losing track of where it is. The idea is it analyzes an installer run log file and identifies the actions that took the longest. For example, a recent analysis: