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

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.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
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
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
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
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
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
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
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
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 

Recently uploaded (20)

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...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
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
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
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)
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
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
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
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...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 

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!