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

Diagnose the startup performance #68

Merged
merged 3 commits into from Jul 13, 2016

Conversation

Projects
None yet
5 participants
@christ66
Member

christ66 commented Jul 5, 2016

In certain situations Jenkins will take a very long time to start up. We add some new diagnostic information when the Jenkins plugin is loaded to obtain more information about what threads are currently running which could be causing the slow startup. The diagnostic information is only gathered until the InitMilestone.COMPLETED is reached in which case the thread dump stops being generated. By default this is disabled and the default time interval is 60 seconds, but can be customized via java arguments.

@reviewbybees

@aheritier

This comment has been minimized.

aheritier commented on b252db3 Jul 1, 2016

🐝

Make sure directory is created.
Print some useful information when the thread dump is performed and name the thread something noticable.
@reviewbybees

This comment has been minimized.

reviewbybees commented Jul 5, 2016

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

@abayer

This comment has been minimized.

Member

abayer commented Jul 5, 2016

🐛 on the findbugs warnings, otherwise fine.

@christ66

This comment has been minimized.

Member

christ66 commented Jul 5, 2016

@abayer fixed findbugs issues

@abayer

This comment has been minimized.

Member

abayer commented Jul 5, 2016

🐝

1 similar comment
@stephenc

This comment has been minimized.

Member

stephenc commented Jul 13, 2016

🐝

@christ66 christ66 merged commit 3cc53c1 into jenkinsci:master Jul 13, 2016

1 check passed

Jenkins This pull request looks good
Details

@christ66 christ66 deleted the christ66:startup-performance branch Jul 13, 2016

@@ -396,6 +402,59 @@ public static void loadConfig() throws IOException {
instance.load();
}
private static final boolean logStartupPerformanceIssues = Boolean.getBoolean(SupportPlugin.class.getCanonicalName() + ".threadDumpStartup");

This comment has been minimized.

@christ66

christ66 Jul 13, 2016

Member

@stephenc would it be easier if we piggybacked off of the environment variable: -Djenkins.model.Jenkins.logStartupPerformance=true instead of creating a custom one?

This comment has been minimized.

@stephenc

stephenc Jul 13, 2016

Member

Whatever you want, but if this causes issues, may need to turn it off separately to my mind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment