Free SQL Server Performance Monitoring: Where Things Are And Where Things Are Going
Chapters
- 00:00:00 – Introduction
- 00:00:33 – Update on Performance Monitor Project
- 00:01:19 – Server Size and Cost Analysis
- 00:02:19 – Storage Growth Tab Overview
- 00:03:17 – Locking and Index Analysis
- 00:04:19 – High Impact Queries and Connections
- 00:05:33 – Monitoring Tool Overview
- 00:06:55 – Query Store and Graphs
- 00:08:09 – Built-in Plan Viewer
- 00:09:04 – Memory Analysis
- 00:10:09 – File IO and TempDB
- 00:11:34 – Agent Jobs and Server Configuration
- 00:12:20 – Future Plans for Monitoring Tool
- 00:13:39 – New Full Dashboard
- 00:15:00 – Alerting and Notifications
Full Transcript
Erik Darling here with Darling Data, the one, the only, the monitoring tool mogul of SQL Server. Today I wanted to sort of update people on the state of the performance monitor project because there are some things that are useful to the general population that I feel like I should bring up.
So the current version of the performance monitor is 3.1. If it’s been a while since you’ve tried this thing out, I would suggest giving it another shot because there have been some really, really big improvements, not only in the collected data and sort of visualization and printification of things, but also in the UI, UX, the sort of experience that you get out of it.
The So The So The So The First Thing I Want To Walk Through I guess some of the new stuff in here. If it’s again if it’s been a while since you’ve looked at it there are some things that you may have missed in the meantime.
If It’s Again if It’s Again If It’s Again If It’s Again If It’s Again If It’s Again If It’s Again If It’s Again If It’s Again If It’s Again If It’s Again If It’s Again If It’s Gone lrllrlrlrlrlrlrlrlrlp. Sort of where your servers are at with, you know, like if you’re your right size wrong size. If you need to up size down size like where you need to go and what you can do to sort of save money on your servers.
There’s a utilization tab that talks through that talks about how hardware is used on this if you are over provisioned under provision things like that. There’s this neat database resources tab which sort of breaks down by database which ones are doing the most work from a variety of perspectives. There is a new storage growth tab and if you right click on anything in here and you click show objects.. see that was fast even though it was a little behind. It’s not bad for opening a new window. You can see in here like which objects and this is just the hammerdb database. You can see which objects in here where growing the fastest and like how much they grow by. So order line is up at the top and speed is at the bottom or time line in the top.
right and you can see all the sort of growth trends for for that if you go into locking and contention this is currently for all databases but if we focus this to hammer db tpcc it makes the picture a little bit more clear where we can see which indexes specifically are hot spots in your database right so you can see like which ones get locked the most which ones get written to the most which ones spend the most time being read and all that stuff and of course how big they are that’s up over my head there there’s the database sizes tab which breaks down sort of databases by size and by database and files and all the sizes and whatnot there’s index analysis which runs sp index cleanup if you have that sort procedure installed it can tell you which indexes you can get rid of merge together all that good stuff there’s this tab here called optimization which tells you which uh right right resources you could stand to tune up the most and gives you some queries that relate to those resources. Then there’s the high impact queries one. This one will show you which queries do the worst amount of work across all your databases and which ones. One thing that I can’t fix is whenever I switch RDP sessions, the DPI gets messed up and things start showing up in weird places. That I haven’t figured out yet, but I’m working on it. And then if you need to figure out which applications do the most sort of connection work to your servers, there’s that. And then there’s a whole inventory of servers, which breaks down the name, the edition, the version, host OS, what kind of hardware is assigned to it, all that good stuff. And that’s before we even get into the performance monitoring part. There’s also a recommendations tab, which will look at all of the wonderful collected data that we have.
Tell you about the problems that you’re having just at a very high level. There’s all sorts of criticals and warnings and things that you can look at in here. And there are options for some of them. If you want to generate a prompt to start an MCP or another sort of investigation into things, you can do that. And then some of them will even have ways that you can fix some of these. Some of them will have buttons that say, hey, you want to fix this? We can fix this right now. Coming back, coming into the actual monitoring part.
Well, we’ve got this lovely overview of all the server resources right here. And it sort of gives you this lineup line so you can see exactly along the chart what was happening. And you’ve got this little hover overview thing that will tell you about which metrics were spiking, if they were up from prior samples. But I guess if you’re looking at a graph, it’s pretty easy to tell if something is up from a prior sample because the line goes up. But it’s just a handy way to see like what percentages of things and like what counts of things are up from a prior sample.
So you can see all the different metrics that were happening at any given time on a server. We have our wonderful weight stats tab. And one thing that has driven me nuts about every other monitoring tool is weight stats graphing is when you look at weight stats, they’re just like, here’s all of them. And if you have a spike in a weight you don’t care about, like let’s say backups, backup weights dominate this crazy chunk of graphs. And you don’t want to see backup weights. You want to see your other weights that are more pertinent to your workload. You can choose which weights you want to see over here.
It’s very, very easy. And you can also do a little bit of math here and there. So, if you’re looking at this graph, you can see that it’s very, very useful. We also have our queries tabs. And one thing that is worth pointing out is, before we go any further, is one thing that is really hard to do with a lot of other monitoring tools is figure out like which things are a root cause of a thing, right? So if we look at this graph and we say, wow, that sure is a lot of LCK MX weights. I wonder which queries were involved in there. We can right click on the graph and we can say, show queries with LCK MX weights. And we get a whole window here.
Of queries that were involved with LCK MX weights. We can get right to the root of problems, right? So back to queries. We have this graph, which kind of gives us different sources of queries and what was going on with them. Query duration, procedure duration, duration from query store. And of course, executions right behind me. So we can see spikes and when queries executed, which is a great thing to have. We have active queries, which is a snapshot of queries that were running over various points in time.
You can see all these LCK MX queries and LCK MU queries behind me. It’s crazy. We also get queries by duration. And we have a little breakdown over here of CPU by database, if you’re interested. The little button there, you can push if you want to see that.
So this is gathering from query stats. We have this one, which is gathering from procedure stats. And these time slicers, you can move them around so that you can focus in on like big jumps and things. And it’s very, very useful for that, right? So all this stuff you can do in here, very, very useful. We have query store, of course. We actually collect query store data, unlike a lot of other monitoring tools. I’m not going to name any names, but you all stink. And then over here, we have a query heat map where we can see at what points various queries ran and sort of which ones stick out the most in the workload. So this kind of gives you some visual indicators of when bad stuff happened and which queries were involved in that. And then a little notification that’s going to pop up, of course, while I’m recording this video in the wrong place.
That’s good too, right? Again, I’m working on that. All right. So all sorts of good things in here. We have a plan viewer. The plan viewer is probably most useful if we go get a query for it. So when we collect plans or we fetch data from your server, we have a built-in plan viewer. So you don’t have to even leave your monitoring tool in order to get a query plan information.
And the great thing about this is it’s not just, oh, here’s a query plan, figure it out. This is all primed with advice from me, how I would analyze query plans. It goes in, breaks, goes through the XML and the stats and everything else. And it helps you figure out where in the query plan you should focus and what you should fix and change.
All right. Pretty standard CPU graph. And again, anything, any one of these graphs, you can say show active queries at this time, and we’ll give you active queries at that time. We got memory. We got all sorts of memory. We have an overview where you can see total target buffer pool memory grants.
We got breaks down by memory clerks. So if you’re troubleshooting weird memory issues, you can see which clerks are clogging up the most of it. We start with the top five by default, but you know, that’s probably the most interesting thing. I don’t know.
We get stuff for memory grants, right? So we can see all of these good information about when queries asked for memory, if they waited for memory, if they got forced to use a lower grant, we have all that stuff. This graph is empty because I don’t have memory pressure on my server.
Because unlike you, I have enough memory for my server. Right? I, you, you never do. I I, I’ve seen your servers. Uh, we’ve got file IO, two different ways, right? Well, one is by latency, and we’ve got reads and writes for all latency, and we’ve got throughput so we can see how fast things are moving. Right? Two good ways of measuring the, the, how fast, how good your disks are, how well your disks are doing, right? Uh, English. It’s, it’s a, it’s a wonderful language. Uh, we’ve got TempDB here. Uh, we, we can see when TempDB grows and shrinks. So if you’re curious what was happening in there. We can do that. And then you can right click and you can say, hey, what queries were running then? And you can figure out which queries caused your TempDB growth. It’s all wonderful, wonderful stuff, right? We’ve got blocking. We’ve got blocking and deadlocks galore. We’ve got current weights around blocking. Again, it’s a beautiful thing.
We’ve got block process reports that fully spell out exactly which queries were involved in your blocking problems. We’ve got the deadlock XML report, which fully spells out all the queries that were involved in deadlocks. We’ve got Perfmon counters. If you’re that kind of person who enjoys Perfmon, and if you’re the kind of person who’s maybe a little unsure about Perfmon, we’ve got Perfmon packs up here, right? And what this will give you is if you are troubleshooting a specific issue and you want to see Perfmon counters that are related to that issue, you no longer have to remember the name of every Perfmon counter. You can look at memory pressure. You can look at memory pressure. You can look at memory pressure. You can look at CPU pressure. We can look at CPU pressure. We can look at I.O. pressure. We can look at 10 dB pressure. We can look at locking and blocking. We can do all this stuff, and we don’t have to remember the name of every single, gosh darn, Perfmon counter that is relevant to us, right?
If you care about agent jobs, we can see which agent jobs are running. Hey, what’s going on right now? Who’s running that agent job? Agent. Ah, that’s not surprising. Why are they doing that? It’s just scheduled. Man, there’s nothing you can… You can kill it. You can kill it.
You can kill it if you want. I don’t know. All right. We tell you about your server configuration at many different levels, right? Server configuration, database configuration, database scope configurations. If you have any trace flags active, apparently I don’t.
That’s cool, though. I don’t need them. I’m good, and I can make SQL Server work fine without them. That’s my superpower. We’ve got a daily summary. This one isn’t very interesting for me. It just shows the worst of the things that happen during the day. I wouldn’t take this one too seriously.
I would… I wouldn’t spend too much time on this one. It’s just kind of like, what’s going on here? Oh, that… Ah, yeah, I know about that. And then we’ve got stuff that will tell you how well the monitoring tool is working. A general collection health summary, a log of every collector that has run… Well, not every collector. It’s like the last 24 hours. So you can see if anything is screwing up. And then if you want to figure out if any of your collectors are taking too long, we have a collection trends tab. So you can see, ah, which one of these things… Is one of these queries taking too long? I don’t know. All right. So look here. Our block process report, query took a second one time. Ah, bummer. All right. Anyway, that’s a sort of speed walk through the monitoring tool as it currently lives. And I don’t… This is just… This is the light version. But what’s really exciting to me is where I am going with things in the future, right? This is just what you get now for free. It’s great, right? And you can see screens popping up here. So you get a little preview. That wasn’t intentional. This is just how things are working.
The next thing that I’m doing with the monitoring tool is I am getting rid of the full dashboard, meaning I am getting rid of the thing that creates a database and agent jobs and does all this stuff locally on a server. Far and away, every time I look at the downloads and the sort of trends for what people are using, what they’re doing with it, everyone loves light.
But light… But I need something that is more powerful. So what I’m working on now, that Fable is back. And, you know, I’m not like one of those, like, every time a new, like, Opus 4.7 or 4.8 or 4. whatever drops, it’s like, the most powerful and capable, blah, blah, blah. That stuff is like water off my duck’s butt.
But I don’t have a duck. I wish I did. But I don’t buy into a lot of that. But Fable really is pretty amazing for this thing that I need to do. So what I’m doing now is I’m working on a headless Windows service. The viewer will be portable. This is not replacing light. This is going to be the new full, right? So it’s going to be backed by Postgres with timescale, because timescale is great for very compressed data, and making queries against that data very fast. It’s good for exactly the type of data that we’re collecting here. And what was the other part?
Yeah, it’s got the headless Windows service, the Postgres and timescale backend, and the portable viewer, right? So that’s the next sort of iteration with these things for me. And that’s where I’m going with it next. Now, that doesn’t mean that I’ve shown you everything from the monitoring tool that I need to. One thing that is very important for you to know about is that there are settings for this thing. Like you can opt in to have an MCP server startup with your monitoring tool. And you can have the robot friends talk directly to your monitoring data and just your monitoring data. They don’t talk to anything on the server. They just look at what got collected and say, Oh, yeah, that’s great. I can I can, I can figure this out. We’ve got all sorts of stuff for notifications and alerts. So if you’re looking for alerts, right, you can you can configure all of this stuff and you can decide when you want to get alerted for things and you can decide what alert channel you want to use. For example, if you want to get email alerts, you can get email alerts. If you want to send notifications to Slack or to teams, you can send notifications to Slack or teams, right? You’ve got all sorts of web hooks and stuff in here that you can hook this up to and you can make you can get alerts where wherever you fetch alerts from, right?
Not everyone cares about email. Not everyone uses teams. Not everyone uses Slack. So you get alerts where you live, right? So that’s that’s pretty cool, too. And this is all free. And even the new thing is going to be free, right? This is just a free open source monitoring tool that does the work that a lot of paid monitoring tools just won’t do because they’re lazy and they’re not good at their jobs. Anyway, it’s real hot here today. So I’m done. I got to turn these lights off before I fall over. But thank you for watching. I hope you enjoyed yourselves.
I hope you enjoyed this video. And I’ll see you in the next one. Bye bye. I hope you learned something. I hope you will download this monitoring tool. You can get it from my GitHub repo. Or if you want a short way to get to my GitHub repo, it’s code.erikdarling.com. Remember, that’s Eric with a K, right? If you go to Eric with a C, I don’t know where you’re going to end up. You could end up in an organ harvesting ring. I don’t know. But, you know, be careful out there. So code.erikdarling.com if you want to get this. It’s a performance monitor repo, totally free, totally open source. You can see everything it’s doing. And if you’re interested in keeping up with the new version of this, just keep your eyes on things. I hope to have something probably by the end of the month that will be fully fleshed out for that. Anyway, thank you for watching. Once again, I’m going to go fall over in my own sweat now. Thank you. Goodbye.
Going Further
If this is the kind of SQL Server stuff you love learning about, you’ll love my training. Blog readers get 25% off the Everything Bundle — over 100 hours of performance tuning content. Need hands-on help? I offer consulting engagements from targeted investigations to ongoing retainers. Want a quick sanity check before committing to a full engagement? Schedule a call — no commitment required.