Slide 1

Slide 1 text

Profiling .NET Server Applications Tugberk Ugurlu Redgate Software @tourismgeek http://tugberkugurlu.com

Slide 2

Slide 2 text

tugberkugurlu.com

Slide 3

Slide 3 text

@tourismgeek

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

@redgate @RedGateCareers red-gate.com/careers

Slide 7

Slide 7 text

Agenda • Nature of Server Applications • Profiling Application Logs and Server • Profiling Performance Problems • Profiling Memory Problems • Load Testing

Slide 8

Slide 8 text

Server Applications • Applications Runs under IIS • Windows Services • Self-hosted Web Applications • Worker processes

Slide 9

Slide 9 text

Characteristics of Server Applications • Stateless • Multiple Instances • Concurrent • Spreaded and Connected • Multiple Versions at the Same Time

Slide 10

Slide 10 text

v1api.example.com v1api.example.com DB Worker-1 Worker-2 Worker-3 Worker-4 Message Queue System v2api.example.com v1api.example.com

Slide 11

Slide 11 text

“Sometimes, you need all the connected process data to identify the problem.

Slide 12

Slide 12 text

Logging • Rich Logging • Application Logs • Server Logs • Storing the Logs (Elasticsearch) • Centralized Logging (Logstash) • Analysing the logs (Kibana) • Log correlation

Slide 13

Slide 13 text

Logging - Log Correlation

Slide 14

Slide 14 text

DEMO TIME

Slide 15

Slide 15 text

Application Performance Profiling • Identifying the problem • Pining the problem down

Slide 16

Slide 16 text

ANTS Performance Profiler from Redgate

Slide 17

Slide 17 text

ANTS Performance Profiler from Redgate

Slide 18

Slide 18 text

DEMO TIME

Slide 19

Slide 19 text

Application Memory Profiling • Identifying Memory Problems • Taking memory snapshots to analyse • Pinning the problem down

Slide 20

Slide 20 text

ANTS Memory Profiler from Redgate

Slide 21

Slide 21 text

ANTS Memory Profiler from Redgate

Slide 22

Slide 22 text

ANTS Memory Profiler from Redgate

Slide 23

Slide 23 text

DEMO TIME

Slide 24

Slide 24 text

WinDbg and ProcDump • Dump file and WinDbg • WinDbg: https://msdn.microsoft.com/en- us/windows/hardware/hh852365.aspx • ProcDump: https://technet.microsoft.com/en- gb/sysinternals/dd996900.aspx C:\>procdump -ma outlook -p "\Process(Outlook)\Handle Count" 10000

Slide 25

Slide 25 text

Server Profiling • Event Logs • Performance Counters

Slide 26

Slide 26 text

Performance Counters

Slide 27

Slide 27 text

Event Logs

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

Load Testing

Slide 30

Slide 30 text

Load Testing

Slide 31

Slide 31 text

Network Profiling • Network problems • Watching what is being sent and recived • Fiddler • Wireshark

Slide 32

Slide 32 text

www.red-gate.com/dotnet-tips

Slide 33

Slide 33 text

Resources • ANTS Performance Profiler and ASP.NET 5: http://bit.ly/1LYO86Y • ASP.NET 5 Log Correlation: http://bit.ly/1Wiv08B • Assembly Memory Leak Sample: http://bit.ly/1HfbTWi • Memory Profiling an Application on IIS: http://bit.ly/1M0rEm7 • Performance Counters with PowerShell: http://bit.ly/1LFiuNO • Diving into Diagnostics on ASP.NET 5: http://bit.ly/1WmqJB2