microsoft / SqlNexus

SQL Nexus is a tool that helps you identify the root cause of SQL Server performance issues. It loads and analyzes performance data collected by SQL LogScout, SQLDiag or PSSDiag. It can dramatically reduce the amount of time you spend manually analyzing data.
MIT License
356 stars 101 forks source link

Best Practice Summary may incorrectly state Power Plan issue. #145

Open gambit9009 opened 2 years ago

gambit9009 commented 2 years ago

The perfstatsanalysis script creates an sp called "proc_PowerPlan".

if not exists (select * from tbl_PowerPlan where ActivePlanName like '%High Performance%')

So if the power plan name is not fully spelled out like that, it may flag "Power Plan is not set to high performance". But, at least in later Windows, you can rename your power plan. PC manufactures may have their own names for plans, etc. Someone could use the High Perf plan and change settings to it, without renaming it. The actual settings under the power plan, like CPU throttling, are really what we are concerned with, and not the name of the plan.

  1. Need to consider for SQL Nexus, at least changing the message that server "might not" have proper power plan...and then be helpful and actually concatenate the power plan name we do see in the message. Might help stop having to look up false positives about the server's power plan.
  2. PSSDiag captures __SQL_Base_Power_Plan_Startup.txt and that appears to be what gets added to tbl_PowerPlan. But also _SQL2019_MiscPssdiagInfo_Startup.OUT captures powerplan in --ServerProperty-- which gets added into tbl_ServerProperties by Nexus. "proc_PowerPlan" consider updating to check both places if one doesn't have it.
  3. See also DiagManager issue 148 as we may decide to change what we collect. https://github.com/microsoft/DiagManager/issues/148