Today I was giving presentation at “Powered by MVP” event in Lithuania.
The topic: what to do, when programs leak, crash and misbehave in many other ways.
The summary: there are tools that can help you finding the cause problem and solving them. They only require some time to learn and some more time to master, but otherwise – it is much better than automatic IIS pool recycling because of a faulty app.
I would suggest the following way of mastering this part of skills.
Familiarize yourself with the subject like memory management
- Read this book: http://www.amazon.co.uk/gp/product/1906434409
- Read about Garbage Collection on MSDN: http://msdn.microsoft.com/en-us/library/ee787088.aspx
- Read MSDN magazine post on identifying and preventing memory leaks: http://msdn.microsoft.com/en-us/magazine/cc163491.aspx
Equip yourself with tools
- Grab sysinternals suite here. Familiarize with tools. I mean, even if just your PC startup is too long, check autoruns – I bet you’ll be amazed. Process Explorer and Process Dump – are the two developers tools that you must be familiar with.
- Windows SDK, where the WinDBG lies hidden
- Visual Studio
- CLR Profiler
- Any other third party tool like: Memory profiler from SciTech, Red Gates ANTS Memory profiler, JetBrains Profiler
Learn performance counters related to memory and performance. Don’t just say slow. It is not important. It is important to know why it is slow. Performance counters often can help answer that question.
Try some samples with those tools, read help materials and additional information on those, like:
- More on SOS extensions: http://msdn.microsoft.com/en-us/library/bb190764.aspx
- Crash dump analysis checklist: http://www.dumpanalysis.org/blog/index.php/2007/06/20/crash-dump-analysis-checklist/
- http://windbg.info/
Learn further
Read books like: “Windows Internals” and “Advanced Windows Debugging” (Recommended by @alejacma).
Start reading really interesting blogs on the subject, like:
- Blog of @TessFerrandez
- Blog of @alejacma
I guess that’s it for todays session. I hope you liked it.
If you didn’t understood everything, well – don’t say that I didn’t warned you about session being @ 400 level . Anyway, don’t worry – step by step you can learn those things fairly quickly. And sometimes, they can help a lot.