Skip to content

Commit dd66b83

Browse files
committed
#3692 sp_BlitzFirst memory pressure
Adds new warning for sys.dm_os_memory_health_history. Closes #3692.
1 parent 9fa0416 commit dd66b83

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

Documentation/sp_BlitzFirst_Checks_by_Priority.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Before adding a new check, make sure to add a Github issue for it first, and hav
66

77
If you want to change anything about a check - the priority, finding, URL, or ID - open a Github issue first. The relevant scripts have to be updated too.
88

9-
CURRENT HIGH CHECKID: 51
10-
If you want to add a new check, start at 52.
9+
CURRENT HIGH CHECKID: 52
10+
If you want to add a new check, start at 53.
1111

1212
| Priority | FindingsGroup | Finding | URL | CheckID |
1313
|----------|---------------------------------|---------------------------------------|-------------------------------------------------|----------|
@@ -23,6 +23,7 @@ If you want to add a new check, start at 52.
2323
| 1 | SQL Server Internal Maintenance | Data File Growing | https://www.brentozar.com/go/instant | 4 |
2424
| 1 | SQL Server Internal Maintenance | Log File Growing | https://www.brentozar.com/go/logsize | 13 |
2525
| 1 | SQL Server Internal Maintenance | Log File Shrinking | https://www.brentozar.com/go/logsize | 14 |
26+
| 10 | Server Performance | Memory Dangerously Low Recently | https://www.brentozar.com/go/memhist | 52 |
2627
| 10 | Server Performance | Poison Wait Detected | https://www.brentozar.com/go/poison | 30 |
2728
| 10 | Server Performance | Target Memory Lower Than Max | https://www.brentozar.com/go/target | 35 |
2829
| 10 | Azure Performance | Database is Maxed Out | https://www.brentozar.com/go/maxedout | 41 |

sp_BlitzFirst.sql

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2617,6 +2617,27 @@ If one of them is a lead blocker, consider killing that query.'' AS HowToStopit,
26172617
END
26182618
END
26192619

2620+
2621+
2622+
/* Server Performance - Memory Dangerously Low Recently - CheckID 52 */
2623+
IF (@Debug = 1)
2624+
BEGIN
2625+
RAISERROR('Running CheckID 52',10,1) WITH NOWAIT;
2626+
END
2627+
IF EXISTS (SELECT * FROM sys.all_objects WHERE name = 'dm_os_memory_health_history')
2628+
BEGIN
2629+
INSERT INTO #BlitzFirstResults (CheckID, Priority, FindingsGroup, Finding, URL, Details)
2630+
SELECT TOP 1 52 AS CheckID,
2631+
10 AS Priority,
2632+
'Server Performance' AS FindingGroup,
2633+
'Memory Dangerously Low Recently' AS Finding,
2634+
'https://www.brentozar.com/go/memhist' AS URL,
2635+
N'As recently as ' + CONVERT(NVARCHAR(19), snapshot_time, 120) + N', memory health issues are being reported in sys.dm_os_memory_health, indicating extreme memory pressure.' AS Details
2636+
FROM sys.dm_os_memory_health_history
2637+
WHERE severity_level > 1;
2638+
END
2639+
2640+
26202641
RAISERROR('Finished running investigatory queries',10,1) WITH NOWAIT;
26212642

26222643

0 commit comments

Comments
 (0)