Videos CgsWxRUY5Eo
AI Agents for Performance: Ship Faster, Pay Less — Rajat Shah, Netflix
Scene timeline
72 shot(s).
keyframes kept every frame deduplicated
What was stored
- cues
- 257
- whisperx 257
- chunks
- 57
- from 257 cues
- keyframes
- 52
- kept of 72 captured
- frames with text
- 52
- 776 lines read
- chapters
- 15
- from the source metadata
- keyframe bytes
- 6.9 MB
- word timings on 257 cues
Provenance
| stage | state | model | started | took |
|---|---|---|---|---|
fetch |
done | — | 2026-08-09 22:24 | 0s |
stt |
done | — | 2026-08-09 06:16 | 39s |
chunk |
done | — | 2026-08-09 06:17 | 0s |
text_embed |
done | — | 2026-08-10 19:39 | 0s |
keyframe |
done | — | 2026-08-09 06:17 | 2m 05s |
ocr |
done | — | 2026-08-09 06:19 | 21s |
frame_embed |
done | — | 2026-08-10 19:39 | 9s |
Frames, and what the machine read
-
- AlEngineer0.97
- World'sFair1.00
- SAN FRANCISCO0.98
- JUNE 29 - JULY 2, 20260.95
- Al Agents for Performance0.99
- Ship Faster, Pay Less0.99
- A practitioner's guide to catalog-backed performance agents.1.00
- Rajat Shah·Staff Software Engineer0.98
- Al Platform, Netflix0.96
-
- PART 011.00
- The Problem1.00
- Why Performance Engineering doesn't scale.1.00
- What it costs.1.00
- Rajat Shah · Al Platform, Netflix0.97
-
- THE VIBE CODING ERA1.00
- We ship 10x faster now.0.99
- Rajat Shah · Al Platform, Netflix0.97
-
- THE VIBE CODING ERA0.98
- We ship 10x faster now.1.00
- Our CPU bills ship 10x faster too.1.00
- Vibe coding giveth. The AWS invoice taketh away.1.00
- Rajat Shah· Al Platform, Netflix0.98
-
- THE NEW PROBLEM1.00
- Your Al ships code. Not0.99
- always fast code.0.97
- LLMs don't know your platform's0.99
- performance patterns.0.99
- Rajat Shah· Al Platform, Netflix0.97
-
- THE STATUS QUO1.00
- What a (human) perf engineer does0.98
- today1.00
- TRIGGER1.00
- Run the profiler on the0.99
- production instance.1.00
- 21.00
- 31.00
- 41.00
- 51.00
- Rajat Shah · Al Platform, Netflix0.97
-
- THE STATUS QUO0.99
- What a (human) perf engineer does1.00
- today1.00
- Complete Visibility1.00
- Java Mixed-Mode Flame Graph via Linux perf_events1.00
- TRIGGER1.00
- SQUINT1.00
- Run the profiler on the0.99
- production instance.1.00
- Stare at the colors for 201.00
- minutes straight.1.00
- (JVM)1.00
- C++1.00
- Java1.00
- Java1.00
- (User)1.00
- C0.99
- (Inlined)1.00
- C0.99
- (Kernel)1.00
- 21.00
- 31.00
- DOWNLOAD1.00
- Export the flamegraph for1.00
- local analysis.1.00
- Rajat Shah· Al Platform, Netflix0.97
-
- THE STATUS QUO1.00
- What a (human) perf engineer does0.99
- today1.00
- TRIGGER1.00
- SQUINT1.00
- FIND (?)0.99
- Run the profiler on the0.99
- Stare at the colors for 200.99
- Maybe identify the root cause1.00
- production instance.0.99
- minutes straight.0.98
- of the bug.0.99
- 21.00
- 31.00
- 41.00
- 51.00
- 61.00
- DOWNLOAD1.00
- SEARCH1.00
- Export the flamegraph for0.98
- Search cryptic function and1.00
- local analysis.1.00
- frame names.1.00
- Rajat Shah· Al Platform, Netflix0.96
-
- PART 020.99
- The1.00
- Experiment1.00
- Can an LLM read profiling data?1.00
- We ran it against a live service.1.00
- Rajat Shah· Al Platform, Netflix0.98
-
- UNDER THE HOOD0.99
- Every profiler speaks the same language0.99
- PROFILER1.00
- RUNTIME1.00
- WHAT IT CAPTURES0.98
- async-profiler / JFR0.97
- JVM (Java·Kotlin·Scala)0.98
- Call stacks· inclusive + self CPU·100Hz sampling0.98
- py-spy1.00
- Python1.00
- Call stacks·inclusive + self CPU·zero overhead, async-safe0.98
- pprof1.00
- Go1.00
- Call stacks· inclusive + self CPU·goroutine profiles0.97
- PyTorch Profiler0.99
- GPU/Python1.00
- Call stacks·inclusive + self CPU·GPU kernel ti0.97
- Regardless of language or runtime, every profiler yields the same insight: call stacks ranked by inclusive0.99
- cost.1.00
- Rajat Shah· Al Platform, Netflix0.97
-
- UNDER THE HOOD0.96
- Al Agent knows the patterns1.00
- O(N²)loops0.95
- hot method called for every item × every other item0.99
- Loopinvariants1.00
- value recomputed every pass that could be computed once1.00
- Allocation in hot paths0.97
- objects created per call (boxing, streams, lambdas)1.00
- Lock contention / N+1 patterns0.98
- shared state hits on every request; per-item calls that could be batched1.00
- Not guessing. Matching known patterns against actual call st0.99
- Rajat Shah· Al Platform,Netflix0.97
-
- UNDER THE HOOD0.96
- Al Agent knows the patterns1.00
- O(N²)loops0.96
- hot method called for every item × every other item0.99
- Loopinvariants1.00
- value recomputed every pass that could be computed once1.00
- Allocation in hot paths0.96
- objects created per call (boxing, streams, lambdas)1.00
- Lock contention / N+1 patterns0.95
- shared state hits on every request; per-item calls that could be batched1.00
- Not guessing. Matching known patterns against actual call st0.99
- Rajat Shah·Al Platform,Netflix0.99
-
- UNDER THE HOOD·THE DATA0.95
- What the agent reads: ranked method data, not the flame image.0.99
- TensorSet.merge (TensorSet.java:87)1.00
- 8.8% Self0.99
- 11.00
- ↑ EncoderPipeline.process0.98
- ↑ RequestHandler.handle0.99
- 10.2% Incl1.00
- MetricsCounter.resolve (Counter.java:42)1.00
- 4.1% Self1.00
- 21.00
- ↑ RequestRecorder.record0.99
- 4.1% Incl0.98
- ↑ [framework instrumentation]1.00
- ImmutableMap.copyOf1.00
- 1.2% Self0.95
- 31.00
- (ImmutableMap.java:256)0.98
- 3.4% Incl0.99
- ↑ TensorSet.merge← same call path0.95
- self% = method is the leaf doing actual work · inclusive% = full stack cost · call stack traces who called it0.99
- Rajat Shah· Al Platform, Netflix0.98
-
- UNDER THE HOOD·THE DATA0.95
- What the agent reads: ranked method data, not the flame image.0.99
- TensorSet.merge (TensorSet.java:87)1.00
- 8.8% Self0.98
- Agent Analysis1.00
- 11.00
- ↑ EncoderPipeline.process0.98
- ↑ RequestHandler.handle0.99
- 10.2% Incl1.00
- Detected O(N²) Loop0.98
- Rows 1 and 3 share the same call path.0.99
- ImmutableMap.copyOf sits nested0.99
- MetricsCounter.resolve (Counter.java:42)0.99
- 4.1% Self1.00
- inside TensorSet.merge.1.00
- 21.00
- ↑RequestRecorder.record1.00
- 4.1% Incl0.99
- This creates the quadratic hotspot: the0.99
- ↑ [framework instrumentation]0.97
- merge copies all N entries on every single0.97
- reduce step.1.00
- Self% identifies exactly where the CPU is0.98
- ImmutableMap.copyOf1.00
- 1.2% Self1.00
- spent.1.00
- 31.00
- (ImmutableMap.java:256)1.00
- 3.4% Incl1.00
- ↑ TensorSet.merge ← same call path0.94
- self% = method is the leaf doing actual work · inclusive% = full stack cost · call stack traces who called it0.98
- Rajat Shah·Al Platform, Netflix0.96
-
- UNDER THE HOOD0.99
- What the Al Agent does with it0.97
- 011.00
- 020.99
- Parse profiler output1.00
- Check exact commit1.00
- Methods ranked by inclusive CPU and self CPU cost.1.00
- Identifies the precise code version running during the profile.1.00
- Rajat Shah· Al Platform, Netflix0.97
-
- UNDER THE HOOD0.98
- What the Al Agent does with it0.97
- 011.00
- 020.99
- Parse profiler output0.99
- Check exact commit1.00
- Methods ranked by inclusive CPU and self CPU cost.0.99
- Identifies the precise code version running during the profile.0.98
- 031.00
- Filter to repo code1.00
- Focuses on hotspots in owned code; skips library internals.1.00
- Rajat Shah· Al Platform, Netflix0.97
-
- UNDER THE HOOD0.99
- What the Al Agent does with it0.97
- 011.00
- 020.99
- Parse profiler output0.99
- Check exact commit1.00
- Methods ranked by inclusive CPU and self CPU cost.1.00
- Identifies the precise code version running during the profile.0.99
- 031.00
- 041.00
- Filter to repo code1.00
- Trace full call path1.00
- Focuses on hotspots in owned code; skips library internals.1.00
- Reads source of hot methods from entry point to leaf0.98
- Rajat Shah· Al Platform, Netflix0.97
Transcript
257 cues· 4,862 words· 26,740 chars
- 0:00 Hi there.
- 0:02 Welcome to AI Engineer World's Fair 2026 event.
- 0:05 I'm Rajat Shah.
- 0:06 I'm a staff software engineer at Netflix, where I work in the AI platform organization building large-scale distributed systems for machine learning model hosting.
- 0:15 In this talk, I'm here to share how we did improve our performance engineering throughput by introducing AI agents into the mix.
- 0:25 And this is more of a playbook or a practitioner's guide to help you also replicate similar learnings in your own organizations to improve the infrastructure cost and ship faster.
- 0:42 Let's first talk about the problem.
- 0:44 Why does performance engineering doesn't scale?
- 0:46 And what does it cost to actually do it right?
- 0:51 The problem is arising from the fact is that you are authoring code now at a 10x faster speed.
- 0:56 The coding agents are getting better and better at solving problems.
- 1:02 And as more and more engineers adopt it, it gets very easy to produce code
- 1:10 in your system.
- 1:11 And this is slight exaggeration, but the compute cost also is increasing at a similar pace because it doesn't always write the fastest code.
- 1:24 So this is where the problem arises because of that new wipe coding error.
- 1:29 The AI agent ships code.
- 1:31 It is pretty much tuned to ship code fast.
- 1:35 And of course, you could say that as the coding agents are evolving, newer models are coming into play.
- 1:42 They get better and better at simply writing performant code.
- 1:47 But that's not always true.
- 1:50 Agent doesn't know specific details about your platform and your frameworks and your internal code base patterns.
- 1:57 So it tends to just produce code based on what it might have already seen other code bases using or inventing new patterns in your code bases that you did not anticipate an engineer to use as a pattern to use your framework.
- 2:16 So let's look at what a performance engineer typically does.
- 2:21 I'm calling this as a human performance engineer, which is responsible for identifying bottlenecks in a service and fixing them.
- 2:30 Typically, a human would trigger profiling on a single production instance of a fleet of production instances.
- 2:39 You would go and download it, potentially open it in a visualizer.
- 2:44 The raw data that you download typically
- 2:46 great to look at.
- 2:48 It could be, for example, a JSON structure data of the call stack and where the CPU is spent.
- 2:55 So using a visualizer helps you at least see and visualize the call stack and CPU time of various method in your services better.
- 3:07 Once you have that visualizer open, you pretty much end up spending a lot of time in just looking at and finding in this treasure hunt on the potential places where you could improve the code to make it more performant.
- 3:27 This takes a lot of time in order to even learn how to look at it.
- 3:32 And there's a learning curve to it.
- 3:36 And this is where the real bottleneck ends up being.
- 3:38 You end up having to spend straight many, many minutes to identify the bottlenecks.
- 3:46 Once you have identified some code parts and some packages that are spending significant CPU cycles, you would end up searching it in your code bases, in your code repos, and see if it has a potential to improvement.
- 4:01 Hopefully you have luck here and you find a root cause and you produce a code review out.
- 4:10 You merge it and you get some performance wins.
- 4:15 And then you repeat all of this again.
- 4:17 You see the problem, right?
- 4:18 This is a very manual effort and very tedious effort to get right.
- 4:23 And this ends up being a bottleneck if you were to do it across
- 4:27 many of your code bases and code paths.
- 4:30 And that's why this is done very rarely.
- 4:31 People typically end up looking at profiling data only when something is going wrong at 2am and somebody needs to fix a problem because your CPU is unbearable.
- 4:44 So we asked this question internally.
- 4:45 Can an LLM read this profiling data?
- 4:49 The 20 minutes that I mentioned an engineer spends in identifying hot paths, can an LLM agent, which is fed that data, also do it much faster?
- 5:01 And we tried to answer this question through some live services.
- 5:05 So the next couple of slides will be about this experiment and how we do it.
loading
Chapters
- 0:00 Introduction: performance for ML serving
- 2:24 The manual profiling loop today
- 4:46 The experiment: can an LLM read a profile?
- 7:37 From call stack to the exact method
- 9:07 How the agent locates and reads the code
- 11:01 First finding: an O(N) fix, canary confirmed
- 12:41 The same antipattern across seven services
- 15:31 Building a shared pattern catalog
- 17:16 Storing and sharing findings across services
- 19:40 Feeding the catalog to coding agents
- 20:56 Human approval and verification
- 22:13 Canary validation on real traffic
- 24:18 Reactive vs proactive paths
- 26:54 Catching waste before production
- 29:32 Autonomy levels and what is next