CPU load and utlization
-
I am trying to understand the difference between CPU load and CPU utilization. I setup both of those DCI's along with a custom DCI for SQL Server CPU. I graphed them over the weekend.
It seems during our nightly maintenance tasks, (this includes a 15 GB database restore), the SQL ServerCPU pegged out at 100%. The CPU utilization pegged out just over 50% and the CPU load barely reached 5.
I am guessing that CPU Utilization and SQL Server CPU were off by a factor of 2 due to the server being a dual processor. If I remember correctly, a processes cpu can reach 200% if it happens to be pegging both CPU's, and CPU utilization is the total CPU for all processors.
But what is CPU Load meassuring?
Thank you,
Kevin -
Hello!
CPU load is an average length of processor queue (number of processes ready for execution but waiting for free CPU time slot) for last minute. This measure is widely used in UNIX world, often called "load average".
Best regards,
Victor -
Thank You, that makes more sense.
Going back to the % CPU time for a process:
Counter = UserProcess.SQLServer.CPU:"\Process(sqlservr)\% Processor Time":60:A:INT:Average % CPU Time for sqlservr.exe over past minuteIs there a way to divide this number by the number of CPU's? I am guessing this will need to be a script of some sort. I don't know how hyper-threading affects this counter as well.
Thank you,
Kevin -
You mean just divide value to a constant number of processors? Currently you can do it on server side by using transformation script in DCI. If you have two processors, your transformation script can look like this:
$1 / 2Drawback of this method is that you cannot create an universal template which can be used on machines with different number of CPUs, because CPU number is hard coded as a constant.
Best regards,
Victor -
Thanks again for your assistance. I tried using this transfomration above at a template level but it did not seem to work. I also tried the following transfromation which did not seem to impact the results either.
sub main() { return ($i / 2) }Step 1 is set at "Keep original value"
When I have a lot of CPU activity, it still show the SQL Server CPU at roughlt 2x the CPU utilization.
Thank you,
Kevin -
You should use $1 instead of $i. Do you use $1 in when trying short form? Also, you example has syntax error - there are missing ; after return statement.
It should be like this:sub main() { return ($1 / 2); }Best regards,
Victor -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login