@@ -416,18 +416,102 @@ local osMemoryUsagePanel = {
416
416
},
417
417
};
418
418
419
- local memoryUtilizationPanel = {
419
+ local memoryManagerPanel = {
420
420
datasource: promDatasource,
421
421
targets: [
422
422
prometheus.target(
423
- 'mssql_memory_utilization_percentage{instance=~"$instance", job=~"$job"}' ,
423
+ 'mssql_server_total_memory_bytes{instance=~"$instance", job=~"$job"}' ,
424
+ datasource=promDatasource,
425
+ legendFormat='{{instance}} - total' ,
426
+ ),
427
+ prometheus.target(
428
+ 'mssql_server_target_memory_bytes{instance=~"$instance", job=~"$job"}' ,
429
+ datasource=promDatasource,
430
+ legendFormat='{{instance}} - target' ,
431
+ ),
432
+ ],
433
+ type: 'timeseries' ,
434
+ title: 'Memory manager' ,
435
+ description: 'The committed memory and target committed memory for the SQL Server memory manager. See https://learn.microsoft.com/en-us/sql/relational-databases/performance-monitor/monitor-memory-usage?view=sql-server-ver16#isolating-memory-used-by-' ,
436
+ fieldConfig: {
437
+ defaults: {
438
+ color: {
439
+ mode: 'palette-classic' ,
440
+ },
441
+ custom: {
442
+ axisCenteredZero: false ,
443
+ axisColorMode: 'text' ,
444
+ axisLabel: '' ,
445
+ axisPlacement: 'auto' ,
446
+ barAlignment: 0 ,
447
+ drawStyle: 'line' ,
448
+ fillOpacity: 51 ,
449
+ gradientMode: 'none' ,
450
+ hideFrom: {
451
+ legend: false ,
452
+ tooltip: false ,
453
+ viz: false ,
454
+ },
455
+ lineInterpolation: 'linear' ,
456
+ lineStyle: {
457
+ fill: 'solid' ,
458
+ },
459
+ lineWidth: 1 ,
460
+ pointSize: 5 ,
461
+ scaleDistribution: {
462
+ type: 'linear' ,
463
+ },
464
+ showPoints: 'auto' ,
465
+ spanNulls: false ,
466
+ stacking: {
467
+ group: 'A' ,
468
+ mode: 'normal' ,
469
+ },
470
+ thresholdsStyle: {
471
+ mode: 'off' ,
472
+ },
473
+ },
474
+ mappings: [],
475
+ min: 0 ,
476
+ thresholds: {
477
+ mode: 'absolute' ,
478
+ steps: [
479
+ {
480
+ color: 'green' ,
481
+ value: null ,
482
+ },
483
+ ],
484
+ },
485
+ unit: 'bytes' ,
486
+ },
487
+ overrides: [],
488
+ },
489
+ options: {
490
+ legend: {
491
+ calcs: [],
492
+ displayMode: 'list' ,
493
+ placement: 'bottom' ,
494
+ showLegend: true ,
495
+ },
496
+ tooltip: {
497
+ mode: 'multi' ,
498
+ sort: 'none' ,
499
+ },
500
+ },
501
+ };
502
+
503
+ local committedMemoryUtilizationPanel = {
504
+ datasource: promDatasource,
505
+ targets: [
506
+ prometheus.target(
507
+ '100 * mssql_server_total_memory_bytes{instance=~"$instance", job=~"$job"} / clamp_min(mssql_available_commit_memory_bytes{instance=~"$instance", job=~"$job"},1)' ,
424
508
datasource=promDatasource,
425
509
legendFormat='{{instance}}' ,
426
510
),
427
511
],
428
512
type: 'gauge' ,
429
- title: 'Memory utilization' ,
430
- description: 'Utilization of memory being used from the working set. ' ,
513
+ title: 'Committed memory utilization' ,
514
+ description: 'The committed memory utilization ' ,
431
515
fieldConfig: {
432
516
defaults: {
433
517
color: {
@@ -813,17 +897,18 @@ local transactionLogExpansionsPanel = {
813
897
batchRequestsPanel { gridPos: { h: 8 , w: 12 , x: 12 , y: 0 } },
814
898
severeErrorsPanel { gridPos: { h: 8 , w: 12 , x: 0 , y: 8 } },
815
899
deadlocksPanel { gridPos: { h: 8 , w: 12 , x: 12 , y: 8 } },
816
- osMemoryUsagePanel { gridPos: { h: 8 , w: 16 , x: 0 , y: 16 } },
817
- memoryUtilizationPanel { gridPos: { h: 8 , w: 8 , x: 16 , y: 16 } },
900
+ osMemoryUsagePanel { gridPos: { h: 8 , w: 24 , x: 0 , y: 16 } },
901
+ memoryManagerPanel { gridPos: { h: 8 , w: 16 , x: 0 , y: 24 } },
902
+ committedMemoryUtilizationPanel { gridPos: { h: 8 , w: 8 , x: 16 , y: 24 } },
818
903
],
819
904
if $._config.enableLokiLogs then [
820
- errorLogsPanel { gridPos: { h: 8 , w: 24 , x: 0 , y: 24 } },
905
+ errorLogsPanel { gridPos: { h: 8 , w: 24 , x: 0 , y: 32 } },
821
906
] else [],
822
907
[
823
- databaseRow { gridPos: { h: 1 , w: 24 , x: 0 , y: 32 } },
824
- databaseWriteStallDurationPanel { gridPos: { h: 8 , w: 12 , x: 0 , y: 33 } },
825
- databaseReadStallDurationPanel { gridPos: { h: 8 , w: 12 , x: 12 , y: 33 } },
826
- transactionLogExpansionsPanel { gridPos: { h: 8 , w: 24 , x: 0 , y: 41 } },
908
+ databaseRow { gridPos: { h: 1 , w: 24 , x: 0 , y: 40 } },
909
+ databaseWriteStallDurationPanel { gridPos: { h: 8 , w: 12 , x: 0 , y: 41 } },
910
+ databaseReadStallDurationPanel { gridPos: { h: 8 , w: 12 , x: 12 , y: 41 } },
911
+ transactionLogExpansionsPanel { gridPos: { h: 8 , w: 24 , x: 0 , y: 49 } },
827
912
],
828
913
])
829
914
),
0 commit comments