Presentations and Talks covering '.NET Internals'
12 Jul 2018 - 1747 wordsI’m constantly surprised at just how popular resources related to ‘.NET Internals’ are, for instance take this tweet and the thread that followed:
If you like learning about '.NET Internals' here's a few talks/presentations I've watched that you might also like. First 'Writing High Performance Code in .NET' by Bart de Smet https://t.co/L5S9BsBlWe
— Matt Warren (@matthewwarren) July 9, 2018
All I’d done was put together a list of Presentations/Talks (based on the criteria below) and people really seemed to appreciate it!!
Criteria
To keep things focussed, the talks or presentations:
- Must explain some aspect of the ‘internals’ of the .NET Runtime (CLR)
- i.e. something ‘under-the-hood’, the more ‘low-level’ the better!
- e.g. how the GC works, what the JIT does, how assemblies are structured, how to inspect what’s going on, etc
- Be entertaining and worth watching!
- i.e. worth someone giving up 40-50 mins of their time for
- this is hard when you’re talking about low-level details, not all speakers manage it!
- Needs to be a talk that I’ve watched myself and actually learnt something from
- i.e. I don’t just hope it’s good based on the speaker/topic
- Doesn’t have to be unique, fine if it overlaps with another talk
- it often helps having two people cover the same idea, from different perspectives
If you want more general lists of talks and presentations see Awesome talks and Awesome .NET Performance
List of Talks
Here’s the complete list of talks, including a few bonus ones that weren’t in the tweet:
- PerfView: The Ultimate .NET Performance Tool by Sasha Goldshtein
- Writing High Performance Code in .NET by Bart De Smet
- State of the .NET Performance by Adam Sitnik
- Let’s talk about microbenchmarking by Andrey Akinshin
- Safe Systems Programming in C# and .NET (summary) by Joe Duffy
- FlingOS - Using C# for an OS by Ed Nutting
- Maoni Stephens on .NET GC by Maoni Stephens
- What’s new for performance in .NET Core 2.0 by Ben Adams
- Open Source Hacking the CoreCLR by Geoff Norton
- .NET Core & Cross Platform by Matt Ellis
- .NET Core on Unix by Jan Vorlicek
- Multithreading Deep Dive by Gael Fraiteur
- Everything you need to know about .NET memory by Ben Emmett
I also added these 2 categories:
- ‘Channel 9’ Talks
- So many great talks featuring the Microsoft Engineers who work on the .NET runtime
- Talks I plan to watch (but haven’t yet)
If I’ve missed any out, please let me know in the comments (or on twitter)
PerfView: The Ultimate .NET Performance Tool by Sasha Goldshtein (slides)
In fact, just watch all the talks/presentations that Sasha has done, they’re great!! For example Modern Garbage Collection in Theory and Practice and Making .NET Applications Faster
This talk is a great ‘how-to’ guide for PerfView, what it can do and how to use it (JIT stats, memory allocations, CPU profiling). For more on PerfView see this interview with it’s creator, Vance Morrison: Performance and PerfView.
Writing High Performance Code in .NET by Bart De Smet (he also has a some Pluralsight Courses on the same subject)
Features CLRMD, WinDBG, ETW Events and PerfView, plus some great ‘real world’ performance issues
State of the .NET Performance by Adam Sitnik (slides)
How to write high-perf code that plays nicely with the .NET GC, covering Span<T>, Memory<T> & ValueTask
Let’s talk about microbenchmarking by Andrey Akinshin (slides)
Primarily a look at how to benchmark .NET code, but along the way it demonstrates some of the internal behaviour of the JIT compiler (Andrey is the creator of BenchmarkDotNet)
Safe Systems Programming in C# and .NET (summary) by Joe Duffy (slides and blog)
Joe Duffy (worked on the Midori project) shows why C# is a good ‘System Programming’ language, including what low-level features it provides
FlingOS - Using C# for an OS by Ed Nutting (slides)
Shows what you need to do if you want to write and entire OS in C# (!!) The FlingOS project is worth checking out, it’s a great learning resource.
Maoni Stephens on .NET GC by Maoni Stephens who is the main (only?) .NET GC developer. In addition CLR 4.5 Server Background GC and .NET 4.5 in Practice: Bing are also worth a watch.
An in-depth Q&A on how the .NET GC works, why is does what it does and how to use it efficiently
What’s new for performance in .NET Core 2.0 by Ben Adams (slides)
Whilst it mostly focuses on performance, there is some great internal details on how the JIT generates code for ‘de-virtualisation’, ‘exception handling’ and ‘bounds checking’
Open Source Hacking the CoreCLR by Geoff Norton
Making .NET Core (the CoreCLR) work on OSX was mostly a ‘community contribution’, this talks is a ‘walk-through’ of what it took to make it happen
.NET Core & Cross Platform by Matt Ellis, one of the .NET Runtime Engineers (this one on how made .NET Core ‘Open Source’ is also worth a watch)
Discussion of the early work done to make CoreCLR ‘cross-platform’, including the build setup, ‘Platform Abstraction Layer’ (PAL) and OS differences that had to be accounted for
.NET Core on Unix by Jan Vorlicek a .NET Runtime Engineer (slides)
This talk discusses which parts of the CLR had to be changed to run on Unix, including exception handling, calling conventions, runtime suspension and the PAL
Multithreading Deep Dive by Gael Fraiteur (creator of PostSharp)
Takes a really in-depth look at the CLR memory-model and threading primitives
Everything you need to know about .NET memory by Ben Emmett (slides)
Explains how the .NET GC works using Lego! A very innovative and effective approach!!
Channel 9
The Channel 9 videos recorded by Microsoft deserve their own category, because there’s so much deep, technical information in them. This list is just a selection, including some of my favourites, there are many, many more available!!
- Ian Carmichael: The History and Future of the CLR (2009)
- Maoni Stephens and Andrew Pardoe: CLR 4 Garbage Collector - Inside Background GC (2009)
- Vance Morrison: CLR Through the Years (2009)
- Surupa Biswas: CLR 4 - Resilient NGen with Targeted Patching (2009)
- Suzanne Cook - Developing the CLR, Part I (2005)
- Tour of .NET CLR Base Class Library Team (2005)
- Christopher Brumme - The future of CLR exceptions (2004)
- Anders Hejlsberg - What brought about the birth of the CLR? (2004)
- Jason Zander - Discussing the architecture and secrets of .NET and the CLR (2004)
- Brad Abrams - What is missing from the CLR? (2004)
- Christopher Brumme – Will there be improvements to .NET’s garbage collector? (2004)
Ones to watch
I can’t recommend these yet, because I haven’t watched them myself! (I can’t break my own rules!!).
But they all look really interesting and I will watch them as soon as I get a chance, so I thought they were worth including:
- C# and .NET - Advanced topics (££) by Gergely Kalapos
- High Performance Coding with .NET Core and C# (££) also by Gergely Kalapos
- Patterns for high-performance C# by Federico Andres Lois
- Manual memory management in .NET Framework by Adam Furmanek (blog)
- Internals of Exceptions by Adam Furmanek
- Beyond step-by step debugging in Visual Studio by Tess Ferrandez
- Hacking .NET(C#) Application: Code of the Hacker by Jon McCoy
- So you want to create your own .NET runtime? (abstract) by Chris Bacon
- Advanced .NET debugging techniques from a real world investigation by Christophe Nasarre and Kevin Gosse (recording and slides)
- Staying Friendly with the GC by Oren Eini (Ayende Rahien) (slides)
- Scratched Metal by Federico Andres Lois
- Beachhead implements new opcode on CLR JIT by Kouji Matsui
- Everything what you (don’t) know about structures in .NET by Łukasz Pyrzyk (slides)
If this post causes you to go off and watch hours and hours of videos, ignoring friends, family and work for the next few weeks, Don’t Blame Me