How to Troubleshoot Apps for the Modern Connected Worker
Sql server baselines
1. SQL Server :
Performance and Baseline
Measurements
Mike Walsh – Linchpin People
2. Mike Walsh
SQL Server MVP since 2011
Seacoast SQL User Group
SQL Server Consultant
Partner at Linchpin People
Blog:
Straightpath SQL Blog
Linchpin People Blog
3. Agenda
Baselines – What/Why/How are they?
Tools and Scripts
PAL
Wait and IO Statistics Collection
“Glenn Berry Scripts”
Telling a performance story
4. PAL – Part 1
Performance Analysis For Logs
Perfmon
Template Files
PAL Demo
Show the tool
Talk about perfmon
Start collection and kick off a workload
5. Baseline &
Benchmark
Discussion
While our workload runs.. Let’s talk about baselines…
What are they?
What can they do for us?
How can we review and use them?
Why should you all be collecting and reviewing them?
6. Wait Statistics
What are they?
What do we do with the information?
Trending vs Static
DEMO
Look at wait statistics
Look at interval wait statistics
7. File/IO Stats
SQL Server’s View into Latency
Doesn’t always match perfmon… Why?
Perfmon doesn’t always match SAN stats… Why?
DEMO
Looking at Static Stats with Glenn Berry Scripts
Looking at interval stats
8. How’s Your
Server?
Glenn Berry Scripts – Are you shooting yourself in the foot?
Quick Talk about the Linchpin People WellDBA™ Exam
(not marketeering.. Talk about why it’s good to check your own
servers from time to time.. No matter how you do it.)
What we are looking for that affects performance
DEMO
Running through Glenn Berry Diagnostic Scripts Live
Looking at CPU-Z for CPU Power Saving (it really does kill
performance!)
9. PAL Part 2
Workload is probably done now.
Let’s talk about how to use PAL to analyze our log file.
Instead of talking, let’s show it…
DEMO
Hopefully use the real file from the workload
If not review some already staged files (ala Julia Child)
Look at the insight in PAL for us
Pay attention to the lessons you can get just using PAL (e.g
Forwarded Records definition and solution.. Batch Requests/sec
ratios to other counters, etc)
10. Putting it all
together
What’s the performance story from everything we looked at?
Getting into monthly or quarterly reviews
Picking counters to trend the story over time
Batch requests/sec – busier now than then?
User connections then/now
Basic metrics then/now – capacity planning proactively
Fixing where it hurts
When isn’t it the database/code?
When isn’t it the server?
When is it both? (hint – most of the time)
11. Resources
Blog Posts/How-To Videos
My post on using PAL to generate template with video walkthrough.
My post on how to use CPU-Z to look for dangers of CPU Power saving with video walkthrough.
Old post of mine talking about some other free tools that are great.
Brent Ozar post on doing some perfmon analysis in Excel/CSV format.
Old PAL/Baseline blog post on my blog.
Glenn Berry Diagnostic Scripts
PAL
John Sterrett Wait and IO Statistics Interval Scripts –
Waits File/IO
Great Books
Professional SQL Server 2008 Internals and Troubleshooting (still great– even now)
Professional SQL Server 2012 Internals and Troubleshooting.
DVD Store –What we used to generate load on the server. Great blog post walk through on
setting up from David Klee.
Relog –Tool we discussed to turn blg into CSV (so you never have to store in CSV format from
perfmon…)
CPU-Z –Tool I talk about in the presentation and blog post above.
SP_Whoisactive – Anytime I deliver this session I imagine I’ll always mention this amazing
script from Adam Machanic. Link goes to lots of posts on his blog about the tool and download
link.