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
[GopherCon 2026] Inside Out: Observing Go from...
Search
Donia Chaiehloudj
August 07, 2026
Technology
26
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
[GopherCon 2026] Inside Out: Observing Go from Code to Kernel
Donia Chaiehloudj
August 07, 2026
More Decks by Donia Chaiehloudj
See All by Donia Chaiehloudj
[KCD Czech] eBPF Meets the GPU: Future of AI Infra Observability
doniacld
0
190
[KubeCon EU 2026, Observability Day] Cilium Updates
doniacld
0
46
[KubeCon EU 2026, Isovalent Booth Session] When IPv6 only cluster meets the real internet
doniacld
0
40
[KubeCon EU 2026, Isovalent Booth Session] Who Owns This IP? Debugging L2 in Kubernetes
doniacld
0
38
eBPF Hookpoint Gotchas: Why Your Program Fires (or Fails) in Unexpected Ways
doniacld
0
85
Cloud Native University NA 2025: From Squire to Network Knight - Defending the Kubernetes Castle the Cloud Native Way
doniacld
0
160
[cTENcf] eBPF and Go: The Core of Modern Kubernetes Networking
doniacld
1
120
Aladdin & the eBPF lamp: Travel in the kernel
doniacld
3
210
[RivieraDev] An Intro to eBPF with Go: The Foundation of Modern Kubernetes Networking
doniacld
0
120
Other Decks in Technology
See All in Technology
Jetson Orin Nanoとk3sとローカルLLMで音声文字起こしシステム作ってみた
y_sera15
0
120
味覇で作るパスタが美味い - 20261001_yabaubuki.dev
livesense
PRO
0
130
AIは「聞けば答える」から「任せると自分で進める」へ - JACTIMペナン地域部会・ペナン三水会講演
knishioka
0
110
【Data Engineering Summit2026_登壇資料】医療ビッグデータ×AIエージェントを支えるデータ基盤とハーネスエンジニアリング
jmdc_presentation
0
140
go-sqletch
moznion
0
140
今さら理解するウェブフォントver.2026
takanorip
3
700
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
5
3.7k
AI駆動開発の時代になったのでトヨタ生産方式から見直す
terurou
7
5.9k
Refining Active Record
shugo
0
110
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
180
ai_cording_with_k8s_knowledge.pdf
mochizuki875
1
350
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
0
140
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
Paper Plane
katiecoart
PRO
5
54k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Product Roadmaps are Hard
iamctodd
55
13k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Chasing Engaging Ingredients in Design
codingconduct
0
360
Designing for humans not robots
tammielis
254
26k
Are puppies a ranking factor?
jonoalderson
2
4k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
630
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Transcript
Inside Out: Observing Go from Code to Kernel Donia Chaiehloudj,
Software Engineer & Community GopherCon 2026, Seattle © 2024 Isovalent. All Rights Reserved. 1
A bit about myself • • • • Software Engineer
& OSS Pollinator 🐝 at Isovalent @Cisco Co-wrote a book to learn Go KCD Provence Organiser (CFP open) 🥐 🥖 Know me for my talk about my henhouse and TinyGo © 2025 Isovalent. All Rights Reserved. 2
./ship --env prod © 2025 Isovalent. All Rights Reserved. 3
Sometimes… something goes wrong © 2025 Isovalent. All Rights Reserved.
4
Letʼs fix the issue! © 2025 Isovalent. All Rights Reserved.
5
DON’T WORRY I GOT YOUR BACK © 2025 Isovalent. All
Rights Reserved. 6
Observability gives us evidence to investigate a system. © 2025
Isovalent. All Rights Reserved. 7
Start where the symptom is visible © 2025 Isovalent. All
Rights Reserved. 8
Start where the symptom is visible © 2025 Isovalent. All
Rights Reserved. 9
1. Application-level Observability © 2024 Isovalent. All Rights Reserved. 10
Pillars of Observability metrics © 2025 Isovalent. All Rights Reserved.
logs traces 11
Pillars of Observability metrics © 2025 Isovalent. All Rights Reserved.
logs traces 12
© 2025 Isovalent. All Rights Reserved. 13
Request Demo © 2025 Isovalent. All Rights Reserved. 14
© 2025 Isovalent. All Rights Reserved. 15
© 2025 Isovalent. All Rights Reserved. 16
Original code profile, err = fetchProfile(ctx) // ... recommendations, err
= fetchRecmdt(ctx) // ... inventory, err = fetchInventory(ctx) // ... © 2025 Isovalent. All Rights Reserved. 17
Code after the fix group, ctx := errgroup.WithContext(ctx) // one
sub request fails -> main request fails group.Go(func() error { var err error profile, err = fetchProfile(ctx) return err }) // add a goroutine to the group group.Go(func() error { var err error recommendations, err = fetchRecmdt(ctx) return err }) group.Go(func() error { var err error inventory, err = fetchInventory(ctx) return err }) if err := group.Wait(); err != nil { return err } © 2025 Isovalent. All Rights Reserved. // wait for the all goroutines 18
Fixed Demo © 2025 Isovalent. All Rights Reserved. 19
© 2025 Isovalent. All Rights Reserved. 20
Missing cancellation goroutine still running © 2025 Isovalent. All Rights
Reserved. 21
Nested retries © 2025 Isovalent. All Rights Reserved. 22
Narrow down to the Go runtime © 2025 Isovalent. All
Rights Reserved. 23
2. Inside the Go Runtime © 2024 Isovalent. All Rights
Reserved. 24
Inside the runtime: example starts workers GET /work Client Backend
Service Worker 200 OK Prometheus instrumentation © 2025 Isovalent. All Rights Reserved. 25
Request Demo © 2025 Isovalent. All Rights Reserved. 26
© 2025 Isovalent. All Rights Reserved. 27
pprof code instrumentation import ( "net/http" _ "net/http/pprof" ) go
func() { log.Println(http.ListenAndServe( "localhost:6061", nil, )) }() // add blank import // expose pprof profiles metrics Access pprof metrics go tool pprof http://localhost:6061/debug/pprof/profile © 2025 Isovalent. All Rights Reserved. 28
pprof Demo © 2025 Isovalent. All Rights Reserved. 29
© 2025 Isovalent. All Rights Reserved. 30
Original code results := make(chan Result) go func() { result
:= doWork(context.Background()) results <- result // leaks: blocks forever }() select { case result := <-results: writeResult(w, result) case <-r.Context().Done(): return } © 2025 Isovalent. All Rights Reserved. 31
Code after the fix ctx := r.Context() results := make(chan
Result) go func() { result, err := doWork(ctx) if err != nil { return } // use request context select { case results <- result: case <-ctx.Done(): return } }() // exit when context is cancelled select { case result := <-results: writeResult(w, result) case <-ctx.Done(): return } © 2025 Isovalent. All Rights Reserved. 32
Fixed Demo © 2025 Isovalent. All Rights Reserved. 33
© 2025 Isovalent. All Rights Reserved. 34
Other pprof use cases: retained allocation A tiny slice can
retain a huge array payload := make([]byte, 100<<20) token := payload[:100] cache.Store(key, token) © 2025 Isovalent. All Rights Reserved. // referencing payload slice 35
Other pprof use cases: retained allocation A tiny slice can
retain a huge array payload := make([]byte, 100<<20) token := payload[:100] cache.Store(key, token) // referencing payload slice heap profile inuse_space bytes still retained inuse_objects objects still alive © 2025 Isovalent. All Rights Reserved. 36
Other pprof use cases: retained allocation A tiny slice can
retain a huge array payload := make([]byte, 100<<20) token := payload[:100] cache.Store(key, token) // referencing payload slice heap profile inuse_space bytes still retained inuse_objects objects still alive Make a copy tokenCopy := append([]byte(nil), token...) © 2025 Isovalent. All Rights Reserved. // copy the slice’s values 37
Other pprof use cases: expensive allocation Regexp computation for _,
line := range lines { re := regexp.MustCompile(`...`) matches := re.FindAllString(line, -1) process(matches) } © 2025 Isovalent. All Rights Reserved. 38
Other pprof use cases: expensive allocation Regexp computation allocations profile
for _, line := range lines { re := regexp.MustCompile(`...`) matches := re.FindAllString(line, -1) process(matches) } alloc_space total bytes allocated over time alloc_objects total objects allocated over time © 2025 Isovalent. All Rights Reserved. 39
Other pprof use cases: expensive allocation Regexp computation allocations profile
for _, line := range lines { re := regexp.MustCompile(`...`) matches := re.FindAllString(line, -1) process(matches) } alloc_space total bytes allocated over time alloc_objects total objects allocated over time Outside of a loop var re = regexp.MustCompile(`...`) for _, line := range lines { matches := re.FindAllString(line, -1) process(matches) } © 2025 Isovalent. All Rights Reserved. 40
Even deeper © 2025 Isovalent. All Rights Reserved. 41
3. Beyond the process with eBPF © 2024 Isovalent. All
Rights Reserved. 42
Beyond the process with eBPF: example POST /compute { “jobs”:16
} Client Backend Service Launching 16 goroutines 200 OK © 2025 Isovalent. All Rights Reserved. 43
Request baseline / Demo • • • Baseline average latency
for 2 jobs: 1s Under load latency for 16 jobs: 8s Number of available CPUs: 11 © 2025 Isovalent. All Rights Reserved. 44
© 2025 Isovalent. All Rights Reserved. 45
Where is the CPU going? $ go tool pprof cpu.pprof
© 2025 Isovalent. All Rights Reserved. 46
pprof Demo © 2025 Isovalent. All Rights Reserved. 47
© 2025 Isovalent. All Rights Reserved. 48
Where is the CPU going? $ go tool pprof cpu.pprof
Duration: 15.11s, Total samples = 3.52s (23.29%) Only 23,29% of the CPU is in use during the 15s of the requests by this application. We have an Off-CPU problem. © 2025 Isovalent. All Rights Reserved. 49
@doniacld © 2024 Isovalent. All Rights Reserved. 50
What is ? Makes the Linux kernel programmable @doniacld ©
2024 Isovalent. All Rights Reserved. 51
Overview of Userspace App Events: • File is opening •
Network packet is received syscalls Linux Kernel @doniacld © 2024 Isovalent. All Rights Reserved. event Program 52
eBPF Demo © 2025 Isovalent. All Rights Reserved. 53
© 2025 Isovalent. All Rights Reserved. 54
© 2025 Isovalent. All Rights Reserved. 55
Overview of © 2024 Isovalent. All Rights Reserved. tools 56
offcputime Demo © 2025 Isovalent. All Rights Reserved. 57
© 2025 Isovalent. All Rights Reserved. 58
© 2025 Isovalent. All Rights Reserved. 59
Off-CPU flamegraph of the service ℹHow to read Each box
= time spent waiting on CPU © 2025 Isovalent. All Rights Reserved. 60
CPU Configuration and Throttling Requests started Requests completed Quota Exceeded
T#10 … (20ms) T#10 … (20ms) T#10. (10ms) … … … T#3 … (20ms) Threads Throttled T#3 … (20ms) Threads Throttled T#3. (10ms) T#2 … (20ms) Idle for 80ms … waiting next period T#2 … (20ms) Idle for 80m … waiting next period T#2. (10ms) T#1 … (20ms) 0 20 T#1 … (20ms) T#1. (10ms) 100 200 Time (ms) src: https://medium.com/@alexandru.lazarev/cpu-limits-in-kubernetes-why-your-pod-is-idle-but-still-throttled-a-deep-dive-into-what-really-136c0cdd62ff © 2025 Isovalent. All Rights Reserved. 61
Allocate CPU intentionally # Before services: app: cpus: "0.25" ©
2025 Isovalent. All Rights Reserved. 62
Allocate CPU intentionally # Before services: app: cpus: "0.25" ©
2025 Isovalent. All Rights Reserved. # After services: app: cpus: "2.0" 63
Demo after configuration change © 2025 Isovalent. All Rights Reserved.
64
© 2025 Isovalent. All Rights Reserved. 65
© 2025 Isovalent. All Rights Reserved. 66
Other eBPF Observability use cases • Network issues • Disk/IO
issues © 2025 Isovalent. All Rights Reserved. 67
You may already be using eBPF © 2025 Isovalent. All
Rights Reserved. 68
Takeaways t? re? 🔎 pprof } ? © 2025 Isovalent.
All Rights Reserved. 69
Thanks! 🧪 Demo Repository: github.com/doniacld/gophercon26-obs-code2kernel 📘Resources: • Profiling Go programs
with pprof: https://jvns.ca/blog/2017/09/24/profiling-go-with-pprof/ • eBPF docs: https://docs.ebpf.io/ • off-CPU analysis blog post: https://www.brendangregg.com/offcpuanalysis.html 🔗 Want to connect? Donia Chaiehloudj / @doniacld © 2025 Isovalent. All Rights Reserved. 70