Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Beyond top: Command-Line Monitoring on the JVM ...
Search
Colin Jones
October 29, 2015
Programming
710
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Beyond top: Command-Line Monitoring on the JVM (JavaOne 2015)
A session from JavaOne 2015
Colin Jones
October 29, 2015
More Decks by Colin Jones
See All by Colin Jones
A Bug's Life: What if `select` is Broken After All?
trptcolin
0
220
Underestimated costs of microservice architectures
trptcolin
3
1.6k
FP vs. OOP: Beyond the Bikeshed
trptcolin
0
480
Diving into the Details with DTrace! (RubyConf 2016 edition)
trptcolin
2
570
Diving into the Details with DTrace
trptcolin
3
550
Adopting FP: the good, the familiar, and the unknown
trptcolin
0
300
Finding out what's *really* going on, with DTrace!
trptcolin
1
430
Beyond top: Command-Line Monitoring on the JVM (ClojureRemote)
trptcolin
0
180
ZooKeeper: Wait-free coordination for Internet-scale systems
trptcolin
2
250
Other Decks in Programming
See All in Programming
Kotlinの15年とServer-Side Kotlin
n_takehata
1
190
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
560
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
15
8.4k
GraphQL の onError と Nullability のこれから
quramy
0
200
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
150
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
280
AI-Powered Domain-Driven Design
ziobrando
0
380
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
1
190
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
200
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.4k
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
610
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
3
1.7k
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.7k
Fireside Chat
paigeccino
43
4.1k
Building AI with AI
inesmontani
PRO
1
1.4k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Facilitating Awesome Meetings
lara
57
7.2k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
290
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
610
4 Signs Your Business is Dying
shpigford
187
23k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
810
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
620
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Color Theory Basics | Prateek | Gurzu
gurzu
1
510
Transcript
Beyond top(1) Command-Line Monitoring on the JVM Colin Jones @trptcolin
8th Light
None
What to expect
command-line tooling
on the JVM
introspection & serviceability
--all-flags=false
war stories
real-life usage (well, re-enacted anyway)
A long time ago in a software shop far, far
away…
Things are going pretty well
What does this thing look like? app-architecture Postgres Web /
API Application Server Load Balancer Periodic Job Application Server 3rd-party Service A 3rd-party Service B Monitored email account End users: native mobile app Admin users: desktop browsers
But strange things are afoot
the server sometimes gets really slow
the team has to manually restart the application server
incident response time is ~5 minutes
Yes, strange things are afoot
Pain, frustration, anger
Just the facts
sometimes, things get slow
all requests seem to be affected
the JVM stays up
restart the JVM and everything is fine
What could it be?
Demo
More facts, please!
constant full GCs
what’s in the heap
what application code was running
The right tools for the job
vmstat system-level: CPU, memory, disk, context switching
top per-process: CPU & memory
jps what’s our PID?
jstack status of all threads (right now-ish!)
jcmd what can’t it do?! jcmd [PID] help (sorry, JVM
6 users: see jinfo/jmap/jstack)
jstat GC classloader compiler
Mystery solved!
Now “just” fix it
idea 1: eliminate the leak
idea 2: eliminate the cache altogether?
idea 3: delete the feature
idea 4: full-text search engine
So we’re good now… until the next incident
Lessons
“it’s slow” could mean lots of things
“high CPU” could mean lots of things
collecting data is crucial in a crisis
reproducing the issue helps me sleep at night
Other “right tools for the job”
Heap analyzers
Profilers
Constant monitoring & alerting
Dynamic tracing
Learning more
Books
operators are standing by! man jstat man jstack jcmd [PID]
help [COMMAND] etc.
Thank you! Colin Jones @trptcolin 8th Light