15 July,2015 by Tom Collins
Question: How can I find CurrentClockSpeed and MaxClockSpeed using Powershell?
I’d like to audit our servers and identify inefficiencies around processor consumption. The VM administrator on site claims the servers are being under utilised therefore there is no justification to request another VM server.
The figures they’ve presented seem inaccurate . They are based on smoothing out peaks over a period of time – which is not an accurate methodology in understanding how CPU is utilised by SQLServer
Answer: This is one of those questions which I get from DBAs . In an age of cost – cutting , justifying resource usage and having to report on SQL Server resource consumption is part of the job.
Some background information on CPU
SQL Server – More processor speed or cpu cores - SQL Server DBA
Number of physical processors with Powershell – number of cores
To get the maxclockspeed and currentclockspeed I use the Windows Management Instrumentation(WMI) Object – win32_processor.
The Powershell cmdlet Get-WmiObject is used. Here is a powershell script:
Get-WmiObject win32_processor | select -First 1 -Property name, currentclockspeed, maxclockspeed | Format-List
When the server is under load and the currentclockspeed is persistently lower than the maxclockspeed, it is worth considering changing the Windows Power Options. The default build is Balanced – which has an impact of redistributing clockspeed based on energy consumption and performance algorithm.
Changing the Power Option to Performance changes the relationship between Performance and Energy Consumption i.e favouring performance at the cost of increased energy consumption.
SQL Server – Performance Top Queries by Total CPU Time - SQL ...
SQL Server - How much resource is a SQL database using - memory, disk, IOPS,CPU
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |