SlideShare a Scribd company logo
1 of 21
Download to read offline
© 2019 CloudBees, Inc. All Rights Reserved.© 2019 CloudBees, Inc. All Rights Reserved.
Jenkins Performance
Avoiding Pitfalls, Diagnosing Issues, and Scaling for Growth
© 2019 CloudBees, Inc. All Rights Reserved.
About Owen
● Currently a Developer Support Engineer at CloudBees
● Previously, various roles in Ops, QA, Dev Tools and Productivity
● Involved with the Jenkins open source project since 2010
● 20 years as a Linux sysadmin
© 2019 CloudBees, Inc. All Rights Reserved.
About Jenkins
● Created at Sun in 2005; originally named Hudson, forked/renamed to Jenkins in 2010
● Has grown to over 250,000 installations and 1,700 plugins
● Monolithic Java application
● Master/agent architecture
● Plugin-focused architecture
© 2019 CloudBees, Inc. All Rights Reserved.
Jenkins Admin Challenges
● Java performance tuning skills are not universal
● Usage grows organically and load comes from multiple areas
● Jenkins architecture has some quirks
© 2019 CloudBees, Inc. All Rights Reserved.
Common Performance Issues
● Poor disk performance
● Unoptimized memory/GC settings
● REST API abuse
● Non-performant plugins
© 2019 CloudBees, Inc. All Rights Reserved.
Initial Setup Best Practices
© 2019 CloudBees, Inc. All Rights Reserved.
Initial Configuration
● Rotate build history
● Use a JDK install of Java, not a JRE
● Use SSD storage
● Use NFS v4.1
● Use the G1 garbage collector
● Enable GC logging
● Set heap size explicitly; 2-4GB starting point
● Monitor CPU, IO performance, and JVM-specific memory metrics
● Install the Support Core plugin
● https://tinyurl.com/jenkins-jvm-args - Recommended JVM settings for Jenkins
© 2019 CloudBees, Inc. All Rights Reserved.
Diagnosing Performance Issues
© 2019 CloudBees, Inc. All Rights Reserved.
Initial Diagnosis
● Check JVM memory metrics - max heap size, heap in use vs. free heap
● Check storage performance/availability
● Check dmesg log
● CPU usage is often a distraction from the real issue
● Main Jenkins service log
● “Slow requests” logs (in slow-requests dir)
© 2019 CloudBees, Inc. All Rights Reserved.
Slow Request Log
87350msec elapsed in Handling GET / from 172.26.22.250 : qtp739498517-1292250 View/index.jelly
UptimeColumn/column.jelly
jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:370)
jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:346)
jenkins.model.lazy.LazyLoadRunMapEntrySet$1.next(LazyLoadRunMapEntrySet.java:74)
jenkins.model.lazy.LazyLoadRunMapEntrySet$1.next(LazyLoadRunMapEntrySet.java:63)
java.util.AbstractMap$2$1.next(AbstractMap.java:418)
org.jenkinsci.plugins.uptime.DefaultUptimeService.getUptimePercentage(DefaultUptimeService.java:62)
org.jenkinsci.plugins.uptime.UptimeColumn.getShortName(UptimeColumn.java:53)
sun.reflect.GeneratedMethodAccessor425.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
...
© 2019 CloudBees, Inc. All Rights Reserved.
Slow Request Log
This plugin adds an "Uptime" column in the list view that shows the percentage of time that a job has been building successfully since its first build.
© 2019 CloudBees, Inc. All Rights Reserved.
Slow Request Log
This plugin adds an "Uptime" column in the list view that shows the percentage of time that a job has been building successfully since its first build.
© 2019 CloudBees, Inc. All Rights Reserved.
GC and Thread Dump Analysis
● https://gceasy.io / https://fastthread.io
● Upload a thread dump or GC log for fast analysis
● Free basic version, paid full-featured version
● Paid can be run on-premise if desired
© 2019 CloudBees, Inc. All Rights Reserved.
GC Analysis
© 2019 CloudBees, Inc. All Rights Reserved.
Thread Dump Analysis
© 2019 CloudBees, Inc. All Rights Reserved.
Thread Dump Analysis
© 2019 CloudBees, Inc. All Rights Reserved.
Scaling Horizontally
© 2019 CloudBees, Inc. All Rights Reserved.
When To Scale Out
● “It depends.”
● Jenkins is memory- and IO-bound; monitor them
● Avoid huge masters with thousands of jobs, etc.
● Segment masters logically: by team, business area, etc.
● Rule of thumb: no more than 16GB heap
© 2019 CloudBees, Inc. All Rights Reserved.
How To Scale Out
● OSS users: DIY
○ Spin up new master
○ Migrate config, validate
○ Migrate jobs, validate
○ Configuration as Code makes this easier now
● CloudBees customers: magic
○ CloudBees JOC for master management
○ One-click to spin up new masters
○ Enforce common policy and configuration
○ Centralize auth
○ Easily move jobs between masters
○ Easily trigger jobs across masters
© 2019 CloudBees, Inc. All Rights Reserved.
Resources
● http://www.cloudbees.com - Enterprise DevOps products including Jenkins, OSS Jenkins support, etc.
● http://gceasy.io - Online analysis of Java GC logs
● http://fastthread.io - Online analysis of Java thread dumps
● https://tinyurl.com/jenkins-jvm-args - Recommended JVM settings for Jenkins
● https://tinyurl.com/jenkins-thread-dump - How to get a thread dump from Jenkins
● @literatesavant - Tweet me if you have questions or need help!
© 2019 CloudBees, Inc. All Rights Reserved.
Thanks!

More Related Content

What's hot

DevOps World | Jenkins World 2018 and The Future of Jenkins
DevOps World | Jenkins World 2018 and The Future of JenkinsDevOps World | Jenkins World 2018 and The Future of Jenkins
DevOps World | Jenkins World 2018 and The Future of JenkinsNigel Charman
 
How to make your Webpack builds 10x faster
How to make your Webpack builds 10x fasterHow to make your Webpack builds 10x faster
How to make your Webpack builds 10x fastertrueter
 
CMS Tools for Developers- Owen Harris
CMS Tools for Developers- Owen HarrisCMS Tools for Developers- Owen Harris
CMS Tools for Developers- Owen HarrisWordCamp New Zealand
 
Liz Quilty – Security, Scaling & High End Hosting for WordPress sites
Liz Quilty – Security, Scaling & High End Hosting for WordPress sitesLiz Quilty – Security, Scaling & High End Hosting for WordPress sites
Liz Quilty – Security, Scaling & High End Hosting for WordPress sitesWordCamp New Zealand
 
Cache first cloud native microservices
Cache first cloud native microservicesCache first cloud native microservices
Cache first cloud native microservicesMesut Celik
 
Cloud Spanner をより便利にする運用支援ツールの紹介
Cloud Spanner をより便利にする運用支援ツールの紹介Cloud Spanner をより便利にする運用支援ツールの紹介
Cloud Spanner をより便利にする運用支援ツールの紹介gree_tech
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactChen-Tien Tsai
 
Production optimization with React and Webpack
Production optimization with React and WebpackProduction optimization with React and Webpack
Production optimization with React and Webpackk88hudson
 
Cornel Popescu - Protectia datelor in cloud: de ce si cum se face
Cornel Popescu - Protectia datelor in cloud: de ce si cum se faceCornel Popescu - Protectia datelor in cloud: de ce si cum se face
Cornel Popescu - Protectia datelor in cloud: de ce si cum se faceAvaelgo
 
Jenkins X intro (from google app dev conference)
Jenkins X intro (from google app dev conference)Jenkins X intro (from google app dev conference)
Jenkins X intro (from google app dev conference)Michael Neale
 
Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4Vijay Shukla
 
WebAssembly with Rust
WebAssembly with RustWebAssembly with Rust
WebAssembly with RustKnoldus Inc.
 
DevOps, Cloud, and the Death of Backup Tape Changers
DevOps, Cloud, and the Death of Backup Tape ChangersDevOps, Cloud, and the Death of Backup Tape Changers
DevOps, Cloud, and the Death of Backup Tape Changerske4qqq
 
The Velvet Revolution: Modernizing Traditional ASP.NET Apps with Docker
The Velvet Revolution: Modernizing Traditional ASP.NET Apps with DockerThe Velvet Revolution: Modernizing Traditional ASP.NET Apps with Docker
The Velvet Revolution: Modernizing Traditional ASP.NET Apps with DockerElton Stoneman
 
Web development using nodejs
Web development using nodejsWeb development using nodejs
Web development using nodejsVaisakh Babu
 
Infrastructure Management in GCP
Infrastructure Management in GCPInfrastructure Management in GCP
Infrastructure Management in GCPDana Hoffman
 
Interoperable OpenStack guest provisioning with Cloudbase-Init
Interoperable OpenStack guest provisioning with Cloudbase-InitInteroperable OpenStack guest provisioning with Cloudbase-Init
Interoperable OpenStack guest provisioning with Cloudbase-InitAlessandro Pilotti
 

What's hot (20)

DevOps World | Jenkins World 2018 and The Future of Jenkins
DevOps World | Jenkins World 2018 and The Future of JenkinsDevOps World | Jenkins World 2018 and The Future of Jenkins
DevOps World | Jenkins World 2018 and The Future of Jenkins
 
How to make your Webpack builds 10x faster
How to make your Webpack builds 10x fasterHow to make your Webpack builds 10x faster
How to make your Webpack builds 10x faster
 
CMS Tools for Developers- Owen Harris
CMS Tools for Developers- Owen HarrisCMS Tools for Developers- Owen Harris
CMS Tools for Developers- Owen Harris
 
Liz Quilty – Security, Scaling & High End Hosting for WordPress sites
Liz Quilty – Security, Scaling & High End Hosting for WordPress sitesLiz Quilty – Security, Scaling & High End Hosting for WordPress sites
Liz Quilty – Security, Scaling & High End Hosting for WordPress sites
 
Cache first cloud native microservices
Cache first cloud native microservicesCache first cloud native microservices
Cache first cloud native microservices
 
Cloud Spanner をより便利にする運用支援ツールの紹介
Cloud Spanner をより便利にする運用支援ツールの紹介Cloud Spanner をより便利にする運用支援ツールの紹介
Cloud Spanner をより便利にする運用支援ツールの紹介
 
DotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + reactDotNet MVC and webpack + Babel + react
DotNet MVC and webpack + Babel + react
 
Production optimization with React and Webpack
Production optimization with React and WebpackProduction optimization with React and Webpack
Production optimization with React and Webpack
 
Cornel Popescu - Protectia datelor in cloud: de ce si cum se face
Cornel Popescu - Protectia datelor in cloud: de ce si cum se faceCornel Popescu - Protectia datelor in cloud: de ce si cum se face
Cornel Popescu - Protectia datelor in cloud: de ce si cum se face
 
Jenkins X intro (from google app dev conference)
Jenkins X intro (from google app dev conference)Jenkins X intro (from google app dev conference)
Jenkins X intro (from google app dev conference)
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
 
Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4
 
WebAssembly with Rust
WebAssembly with RustWebAssembly with Rust
WebAssembly with Rust
 
DevOps, Cloud, and the Death of Backup Tape Changers
DevOps, Cloud, and the Death of Backup Tape ChangersDevOps, Cloud, and the Death of Backup Tape Changers
DevOps, Cloud, and the Death of Backup Tape Changers
 
Cafe con deployment
Cafe con deploymentCafe con deployment
Cafe con deployment
 
The Velvet Revolution: Modernizing Traditional ASP.NET Apps with Docker
The Velvet Revolution: Modernizing Traditional ASP.NET Apps with DockerThe Velvet Revolution: Modernizing Traditional ASP.NET Apps with Docker
The Velvet Revolution: Modernizing Traditional ASP.NET Apps with Docker
 
Web development using nodejs
Web development using nodejsWeb development using nodejs
Web development using nodejs
 
Infrastructure Management in GCP
Infrastructure Management in GCPInfrastructure Management in GCP
Infrastructure Management in GCP
 
XDS15: Project Raisin
XDS15: Project RaisinXDS15: Project Raisin
XDS15: Project Raisin
 
Interoperable OpenStack guest provisioning with Cloudbase-Init
Interoperable OpenStack guest provisioning with Cloudbase-InitInteroperable OpenStack guest provisioning with Cloudbase-Init
Interoperable OpenStack guest provisioning with Cloudbase-Init
 

Similar to Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for Growth

OSDC 2019 | Introducing Kudo – Kubernetes Operators the easy way by Matt Jarvis
OSDC 2019 | Introducing Kudo – Kubernetes Operators the easy way by Matt JarvisOSDC 2019 | Introducing Kudo – Kubernetes Operators the easy way by Matt Jarvis
OSDC 2019 | Introducing Kudo – Kubernetes Operators the easy way by Matt JarvisNETWAYS
 
SemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSumanMitra22
 
GitOps, Jenkins X &Future of CI/CD
GitOps, Jenkins X &Future of CI/CDGitOps, Jenkins X &Future of CI/CD
GitOps, Jenkins X &Future of CI/CDRakuten Group, Inc.
 
Docker and Jenkins [as code]
Docker and Jenkins [as code]Docker and Jenkins [as code]
Docker and Jenkins [as code]Mark Waite
 
Continuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and HelmContinuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and HelmDavid Currie
 
What’s new for Developers in IBM Domino & Domino Designer 9.0.1
What’s new for Developers in IBM Domino & Domino Designer 9.0.1What’s new for Developers in IBM Domino & Domino Designer 9.0.1
What’s new for Developers in IBM Domino & Domino Designer 9.0.1IBM Connections Developers
 
We4IT lcty 2013 - infra-man - whats new in ibm domino application development
We4IT lcty 2013 - infra-man - whats new in ibm domino application developmentWe4IT lcty 2013 - infra-man - whats new in ibm domino application development
We4IT lcty 2013 - infra-man - whats new in ibm domino application developmentWe4IT Group
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins UsersJules Pierre-Louis
 
Distributed Docker Pipeline Architecture with CloudBees Jenkins Enterprise
Distributed Docker Pipeline Architecture with CloudBees Jenkins EnterpriseDistributed Docker Pipeline Architecture with CloudBees Jenkins Enterprise
Distributed Docker Pipeline Architecture with CloudBees Jenkins EnterpriseKurt Madel
 
Continuous Delivery with CloudBees Core
Continuous Delivery with CloudBees CoreContinuous Delivery with CloudBees Core
Continuous Delivery with CloudBees CoreBhavani Rao
 
Running productioninstance 1-localcopy
Running productioninstance 1-localcopyRunning productioninstance 1-localcopy
Running productioninstance 1-localcopyCloudBees
 
Node.js Deeper Dive
Node.js Deeper DiveNode.js Deeper Dive
Node.js Deeper DiveJustin Reock
 
JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)Graeme_IBM
 
15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloudPolyglotMeetups
 
Powering Test Environments with Amazon EKS using Serverless Tool | AWS Commun...
Powering Test Environments with Amazon EKS using Serverless Tool | AWS Commun...Powering Test Environments with Amazon EKS using Serverless Tool | AWS Commun...
Powering Test Environments with Amazon EKS using Serverless Tool | AWS Commun...Chargebee
 
15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloudBilly Korando
 
Drupal Solutions Comparison For Multiple Sites With Related Content - Acquia ...
Drupal Solutions Comparison For Multiple Sites With Related Content - Acquia ...Drupal Solutions Comparison For Multiple Sites With Related Content - Acquia ...
Drupal Solutions Comparison For Multiple Sites With Related Content - Acquia ...Sumeet Pareek
 
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
Edge 2016 Session 1886  Building your own docker container cloud on ibm power...Edge 2016 Session 1886  Building your own docker container cloud on ibm power...
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...Yong Feng
 
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...CloudBees
 

Similar to Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for Growth (20)

OSDC 2019 | Introducing Kudo – Kubernetes Operators the easy way by Matt Jarvis
OSDC 2019 | Introducing Kudo – Kubernetes Operators the easy way by Matt JarvisOSDC 2019 | Introducing Kudo – Kubernetes Operators the easy way by Matt Jarvis
OSDC 2019 | Introducing Kudo – Kubernetes Operators the easy way by Matt Jarvis
 
SemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptx
 
GitOps, Jenkins X &Future of CI/CD
GitOps, Jenkins X &Future of CI/CDGitOps, Jenkins X &Future of CI/CD
GitOps, Jenkins X &Future of CI/CD
 
Docker and Jenkins [as code]
Docker and Jenkins [as code]Docker and Jenkins [as code]
Docker and Jenkins [as code]
 
Continuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and HelmContinuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and Helm
 
What’s new for Developers in IBM Domino & Domino Designer 9.0.1
What’s new for Developers in IBM Domino & Domino Designer 9.0.1What’s new for Developers in IBM Domino & Domino Designer 9.0.1
What’s new for Developers in IBM Domino & Domino Designer 9.0.1
 
We4IT lcty 2013 - infra-man - whats new in ibm domino application development
We4IT lcty 2013 - infra-man - whats new in ibm domino application developmentWe4IT lcty 2013 - infra-man - whats new in ibm domino application development
We4IT lcty 2013 - infra-man - whats new in ibm domino application development
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
 
Distributed Docker Pipeline Architecture with CloudBees Jenkins Enterprise
Distributed Docker Pipeline Architecture with CloudBees Jenkins EnterpriseDistributed Docker Pipeline Architecture with CloudBees Jenkins Enterprise
Distributed Docker Pipeline Architecture with CloudBees Jenkins Enterprise
 
Continuous Delivery with CloudBees Core
Continuous Delivery with CloudBees CoreContinuous Delivery with CloudBees Core
Continuous Delivery with CloudBees Core
 
Code One 2018 maven
Code One 2018   mavenCode One 2018   maven
Code One 2018 maven
 
Running productioninstance 1-localcopy
Running productioninstance 1-localcopyRunning productioninstance 1-localcopy
Running productioninstance 1-localcopy
 
Node.js Deeper Dive
Node.js Deeper DiveNode.js Deeper Dive
Node.js Deeper Dive
 
JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)JVM Multitenancy (JavaOne 2012)
JVM Multitenancy (JavaOne 2012)
 
15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud15 ways-to-optimize-spring-boot-for-the-cloud
15 ways-to-optimize-spring-boot-for-the-cloud
 
Powering Test Environments with Amazon EKS using Serverless Tool | AWS Commun...
Powering Test Environments with Amazon EKS using Serverless Tool | AWS Commun...Powering Test Environments with Amazon EKS using Serverless Tool | AWS Commun...
Powering Test Environments with Amazon EKS using Serverless Tool | AWS Commun...
 
15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud15-ways-to-optimize-spring-boot-for-the-cloud
15-ways-to-optimize-spring-boot-for-the-cloud
 
Drupal Solutions Comparison For Multiple Sites With Related Content - Acquia ...
Drupal Solutions Comparison For Multiple Sites With Related Content - Acquia ...Drupal Solutions Comparison For Multiple Sites With Related Content - Acquia ...
Drupal Solutions Comparison For Multiple Sites With Related Content - Acquia ...
 
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
Edge 2016 Session 1886  Building your own docker container cloud on ibm power...Edge 2016 Session 1886  Building your own docker container cloud on ibm power...
Edge 2016 Session 1886 Building your own docker container cloud on ibm power...
 
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...
Jumping from Continuous Integration to Continuous Delivery with Jenkins Enter...
 

Recently uploaded

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 

Recently uploaded (20)

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 

Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for Growth

  • 1. © 2019 CloudBees, Inc. All Rights Reserved.© 2019 CloudBees, Inc. All Rights Reserved. Jenkins Performance Avoiding Pitfalls, Diagnosing Issues, and Scaling for Growth
  • 2. © 2019 CloudBees, Inc. All Rights Reserved. About Owen ● Currently a Developer Support Engineer at CloudBees ● Previously, various roles in Ops, QA, Dev Tools and Productivity ● Involved with the Jenkins open source project since 2010 ● 20 years as a Linux sysadmin
  • 3. © 2019 CloudBees, Inc. All Rights Reserved. About Jenkins ● Created at Sun in 2005; originally named Hudson, forked/renamed to Jenkins in 2010 ● Has grown to over 250,000 installations and 1,700 plugins ● Monolithic Java application ● Master/agent architecture ● Plugin-focused architecture
  • 4. © 2019 CloudBees, Inc. All Rights Reserved. Jenkins Admin Challenges ● Java performance tuning skills are not universal ● Usage grows organically and load comes from multiple areas ● Jenkins architecture has some quirks
  • 5. © 2019 CloudBees, Inc. All Rights Reserved. Common Performance Issues ● Poor disk performance ● Unoptimized memory/GC settings ● REST API abuse ● Non-performant plugins
  • 6. © 2019 CloudBees, Inc. All Rights Reserved. Initial Setup Best Practices
  • 7. © 2019 CloudBees, Inc. All Rights Reserved. Initial Configuration ● Rotate build history ● Use a JDK install of Java, not a JRE ● Use SSD storage ● Use NFS v4.1 ● Use the G1 garbage collector ● Enable GC logging ● Set heap size explicitly; 2-4GB starting point ● Monitor CPU, IO performance, and JVM-specific memory metrics ● Install the Support Core plugin ● https://tinyurl.com/jenkins-jvm-args - Recommended JVM settings for Jenkins
  • 8. © 2019 CloudBees, Inc. All Rights Reserved. Diagnosing Performance Issues
  • 9. © 2019 CloudBees, Inc. All Rights Reserved. Initial Diagnosis ● Check JVM memory metrics - max heap size, heap in use vs. free heap ● Check storage performance/availability ● Check dmesg log ● CPU usage is often a distraction from the real issue ● Main Jenkins service log ● “Slow requests” logs (in slow-requests dir)
  • 10. © 2019 CloudBees, Inc. All Rights Reserved. Slow Request Log 87350msec elapsed in Handling GET / from 172.26.22.250 : qtp739498517-1292250 View/index.jelly UptimeColumn/column.jelly jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:370) jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:346) jenkins.model.lazy.LazyLoadRunMapEntrySet$1.next(LazyLoadRunMapEntrySet.java:74) jenkins.model.lazy.LazyLoadRunMapEntrySet$1.next(LazyLoadRunMapEntrySet.java:63) java.util.AbstractMap$2$1.next(AbstractMap.java:418) org.jenkinsci.plugins.uptime.DefaultUptimeService.getUptimePercentage(DefaultUptimeService.java:62) org.jenkinsci.plugins.uptime.UptimeColumn.getShortName(UptimeColumn.java:53) sun.reflect.GeneratedMethodAccessor425.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) ...
  • 11. © 2019 CloudBees, Inc. All Rights Reserved. Slow Request Log This plugin adds an "Uptime" column in the list view that shows the percentage of time that a job has been building successfully since its first build.
  • 12. © 2019 CloudBees, Inc. All Rights Reserved. Slow Request Log This plugin adds an "Uptime" column in the list view that shows the percentage of time that a job has been building successfully since its first build.
  • 13. © 2019 CloudBees, Inc. All Rights Reserved. GC and Thread Dump Analysis ● https://gceasy.io / https://fastthread.io ● Upload a thread dump or GC log for fast analysis ● Free basic version, paid full-featured version ● Paid can be run on-premise if desired
  • 14. © 2019 CloudBees, Inc. All Rights Reserved. GC Analysis
  • 15. © 2019 CloudBees, Inc. All Rights Reserved. Thread Dump Analysis
  • 16. © 2019 CloudBees, Inc. All Rights Reserved. Thread Dump Analysis
  • 17. © 2019 CloudBees, Inc. All Rights Reserved. Scaling Horizontally
  • 18. © 2019 CloudBees, Inc. All Rights Reserved. When To Scale Out ● “It depends.” ● Jenkins is memory- and IO-bound; monitor them ● Avoid huge masters with thousands of jobs, etc. ● Segment masters logically: by team, business area, etc. ● Rule of thumb: no more than 16GB heap
  • 19. © 2019 CloudBees, Inc. All Rights Reserved. How To Scale Out ● OSS users: DIY ○ Spin up new master ○ Migrate config, validate ○ Migrate jobs, validate ○ Configuration as Code makes this easier now ● CloudBees customers: magic ○ CloudBees JOC for master management ○ One-click to spin up new masters ○ Enforce common policy and configuration ○ Centralize auth ○ Easily move jobs between masters ○ Easily trigger jobs across masters
  • 20. © 2019 CloudBees, Inc. All Rights Reserved. Resources ● http://www.cloudbees.com - Enterprise DevOps products including Jenkins, OSS Jenkins support, etc. ● http://gceasy.io - Online analysis of Java GC logs ● http://fastthread.io - Online analysis of Java thread dumps ● https://tinyurl.com/jenkins-jvm-args - Recommended JVM settings for Jenkins ● https://tinyurl.com/jenkins-thread-dump - How to get a thread dump from Jenkins ● @literatesavant - Tweet me if you have questions or need help!
  • 21. © 2019 CloudBees, Inc. All Rights Reserved. Thanks!