It is currently November 13th, 2019, 5:58 am

UsageMonitor always reports too high GPU usage for individual processes

Report bugs with the Rainmeter application and suggest features.
User avatar
SilverAzide
Posts: 604
Joined: March 23rd, 2015, 5:26 pm

UsageMonitor always reports too high GPU usage for individual processes

SilverAzide » July 13th, 2018, 1:51 am

Hello,
This issue is similar to the other thread regarding CPU usage exceeding 100% (a problem I have NOT seen). However, I can easily see GPU usage wildly in excess of 100%. Hopefully it is something I am doing and not a problem with the plugin. Here are some simple GPU measures:

Code: Select all

[MeasureGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Percent=0
Index=0

[MeasureTopUsage1]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Percent=0
Index=1

[MeasureTopUsage2]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Percent=0
Index=2

[MeasureTopUsage3]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Percent=0
Index=3

; etc....
And here is a screenshot of the About dialog:
UsageMonitorIssue.png
You can see the min/max values are supposed to be 0-100, but aren't really... The Total seems more like a sum of all the other values, but none of these seem to be percentages. (BTW, Percent=1 is invalid on these measures.)

So is the measure (or perfmon?) really returning percentages? It seems like -- unlike the CPU -- getting the GPU percentage needs something like:

Code: Select all

[MeasureTopUsage1Percentage]
Measure=Calc
Formula=(MeasureTopUsage1 / MeasureGPU * 100)
:confused:

(An easy way to test this is to google "Chrome Experiments" and select a WebGL experiment, like maybe this one.)
You do not have the required permissions to view the files attached to this post.
DeviantArt Gadgets More...
User avatar
tjhrulz
Developer
Posts: 225
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: UsageMonitor always reports too high GPU usage for individual processes

tjhrulz » July 14th, 2018, 1:53 am

Well I was ready to say this is a bug with PerfMon but it actually even better than that.

So GPU unlike CPU comes already computed what the percentage is which is why I thought the was odd. Looking into it in PerfMon it shows the same values, and even in task manager the result can actually end up being over 100%. But here is the thing, Microsoft hides the GPU usage of DWM in task manager so you don't notice it...

So in short you should just add DWM to the blacklist when doing GPU stuff, then the total should reflect correctly. In fact I probably should talk to jsmorley about maybe adding it the the default blacklist for everything since it has little value to an end user.
User avatar
SilverAzide
Posts: 604
Joined: March 23rd, 2015, 5:26 pm

Re: UsageMonitor always reports too high GPU usage for individual processes

SilverAzide » July 14th, 2018, 4:41 am

tjhrulz wrote:So in short you should just add DWM to the blacklist when doing GPU stuff, then the total should reflect correctly. In fact I probably should talk to jsmorley about maybe adding it the the default blacklist for everything since it has little value to an end user.
Excellent news! Thank you for looking into this! :thumbup:
DeviantArt Gadgets More...
xenium
Posts: 391
Joined: January 4th, 2018, 9:52 pm

Re: UsageMonitor always reports too high GPU usage for individual processes

xenium » August 25th, 2019, 3:32 pm

Hi,
I noticed that sometimes, when I open the browser or pages in the browser, the GPU exceeds 100%.

Gpu measure used :

Code: Select all

[MeasureGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Index=0
Blacklist=dwm|csrss
Do I still have to add something to the blacklist ?

Thank you
User avatar
jsmorley
Developer
Posts: 19706
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: UsageMonitor always reports too high GPU usage for individual processes

jsmorley » August 25th, 2019, 4:04 pm

xenium wrote:
August 25th, 2019, 3:32 pm
Hi,
I noticed that sometimes, when I open the browser or pages in the browser, the GPU exceeds 100%.

Gpu measure used :

Code: Select all

[MeasureGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Index=0
Blacklist=dwm|csrss
Do I still have to add something to the blacklist ?

Thank you
Not that I can think of. This skin always seems to work correctly for me:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Index=0

[MeterGPU]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=GPU Total:			[MeasureGPU:2]%

1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19706
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: UsageMonitor always reports too high GPU usage for individual processes

jsmorley » August 25th, 2019, 4:44 pm

And it seems to tally with what I get from HWiNFO, which I actually prefer for this:


HWInfo_GPU.ini

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
OnRefreshAction=[!SnapEdges "0" "#CURRENTCONFIG#"]
MiddleMouseUpAction=["#@#"]

[Metadata]
Name=HWInfo_GPU
Author=JSMorley
Information=Description:|HWInfo Graphics card information
Version=Aug 25, 2019
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

[Variables]
;Variables are set in these files
@Include1="#@#GeneralVariables.inc"
@Include2="#@#HWInfo_GPU.inc"

[MeterAllBackground]
Meter=Image
ImageName=#ImagePath#FlexBack.png
X=5
W=170
H=147
ScaleMargins=3,3,3,3
ImageTint=#BackgroundColor#

[MeasureHWiNFO1]
Measure=Plugin
Plugin=HWiNFO
Group=Sensors
HWiNFOSensorId=#HWiNFOSensorId1#
HWiNFOSensorInstance=#HWiNFOSensorInstance1#
HWiNFOEntryId=#HWiNFOEntryId1#
HWiNFOType=#HWiNFOType1#
MinValue=#HWiNFOMin1#
MaxValue=#HWiNFOMax1#
HWiNFOLogHandler=1
UpdateDivider=2
RegExpSubstitute=1
Substitute="^-9\d\d\d":"0"

[MeasureHWInfo2]
Measure=Plugin
Plugin=HWiNFO
Group=Sensors
HWiNFOSensorId=#HWiNFOSensorId2#
HWiNFOSensorInstance=#HWiNFOSensorInstance2#
HWiNFOEntryId=#HWiNFOEntryId2#
HWiNFOType=#HWiNFOType2#
MinValue=#HWiNFOMin2#
MaxValue=#HWiNFOMax2#
HWiNFOLogHandler=1
UpdateDivider=2
RegExpSubstitute=1
Substitute="^-9\d\d\d":"0"

[MeasureHWInfo3]
Measure=Plugin
Plugin=HWiNFO
Group=Sensors
HWiNFOSensorId=#HWiNFOSensorId3#
HWiNFOSensorInstance=#HWiNFOSensorInstance3#
HWiNFOEntryId=#HWiNFOEntryId3#
HWiNFOType=#HWiNFOType3#
MinValue=#HWiNFOMin3#
MaxValue=#HWiNFOMax3#
HWiNFOLogHandler=1
UpdateDivider=2
RegExpSubstitute=1
Substitute="^-9\d\d\d":"0"

[MeasureHWInfo4]
Measure=Plugin
Plugin=HWiNFO
Group=Sensors
HWiNFOSensorId=#HWiNFOSensorId4#
HWiNFOSensorInstance=#HWiNFOSensorInstance4#
HWiNFOEntryId=#HWiNFOEntryId4#
HWiNFOType=#HWiNFOType4#
MinValue=#HWiNFOMin4#
MaxValue=#HWiNFOMax4#
HWiNFOLogHandler=1
UpdateDivider=2
RegExpSubstitute=1
Substitute="^-9\d\d\d":"0"

[MeasureHWInfo5]
Measure=Plugin
Plugin=HWiNFO
Group=Sensors
HWiNFOSensorId=#HWiNFOSensorId5#
HWiNFOSensorInstance=#HWiNFOSensorInstance5#
HWiNFOEntryId=#HWiNFOEntryId5#
HWiNFOType=#HWiNFOType5#
MinValue=#HWiNFOMin5#
MaxValue=#HWiNFOMax5#
HWiNFOLogHandler=1
UpdateDivider=2
RegExpSubstitute=1
Substitute="^-9\d\d\d":"0"

[MeterTextStyle]
FontFace=#TextFont#
FontColor=#ValueColor#
FontSize=11
StringStyle=Normal
AntiAlias=1
NumOfDecimals=0

[MeterHWInfo1Text]
Meter=String
MeterStyle=MeterTextStyle
X=17
Y=10
StringAlign=Left
Text=#HWInfoDesc1#

[MeterHWInfo1Value]
Meter=String
MeasureName=MeasureHWInfo1
MeterStyle=MeterTextStyle
X=160
Y=0r
StringAlign=Right
Text=#HWInfoValue1#

[MeterHWInfo1Bar]
Meter=Bar
MeasureName=MeasureHWInfo1
BarOrientation=Horizontal
BarImage=#HWInfoBarImage1#
SolidColor=#BarBackColor#
X=19
Y=2R
W=120
H=2

[MeterHWInfo2Text]
Meter=String
MeterStyle=MeterTextStyle
X=17
Y=5R
StringAlign=Left
Text=#HWInfoDesc2#

[MeterHWInfo2Value]
Meter=String
MeasureName=MeasureHWInfo2
MeterStyle=MeterTextStyle
X=160
Y=0r
StringAlign=Right
Text=#HWInfoValue2#

[MeterHWInfo2Bar]
Meter=Bar
MeasureName=MeasureHWInfo2
BarOrientation=Horizontal
BarImage=#HWInfoBarImage2#
SolidColor=#BarBackColor#
X=19
Y=2R
W=120
H=2

[MeterHWInfo3Text]
Meter=String
MeterStyle=MeterTextStyle
X=17
Y=5R
StringAlign=Left
Text=#HWInfoDesc3#

[MeterHWInfo3Value]
Meter=String
MeasureName=MeasureHWInfo3
MeterStyle=MeterTextStyle
X=160
Y=0r
StringAlign=Right
Text=#HWInfoValue3#

[MeterHWInfo3Bar]
Meter=Bar
MeasureName=MeasureHWInfo3
BarOrientation=Horizontal
BarImage=#HWInfoBarImage3#
SolidColor=#BarBackColor#
X=19
Y=2R
W=120
H=2

[MeterHWInfo4Text]
Meter=String
MeterStyle=MeterTextStyle
X=17
Y=5R
StringAlign=Left
Text=#HWInfoDesc4#

[MeterHWInfo4Value]
Meter=String
MeasureName=MeasureHWInfo4
MeterStyle=MeterTextStyle
X=160
Y=0r
StringAlign=Right
NumOfDecimals=2
Text=#HWInfoValue4#

[MeterHWInfo4Bar]
Meter=Bar
MeasureName=MeasureHWInfo4
BarOrientation=Horizontal
BarImage=#HWInfoBarImage4#
SolidColor=#BarBackColor#
X=19
Y=2R
W=120
H=2

[MeterHWInfo5Text]
Meter=String
MeterStyle=MeterTextStyle
X=17
Y=5R
StringAlign=Left
Text=#HWInfoDesc5#

[MeterHWInfo5Value]
Meter=String
MeasureName=MeasureHWInfo5
MeterStyle=MeterTextStyle
X=160
Y=0r
StringAlign=Right
NumOfDecimals=2
Text=#HWInfoValue5#

[MeterHWInfo5Bar]
Meter=Bar
MeasureName=MeasureHWInfo5
BarOrientation=Horizontal
BarImage=#HWInfoBarImage5#
SolidColor=#BarBackColor#
X=19
Y=2R
W=120
H=2

HWInfo_GPU.inc

Code: Select all

[Variables]
; HWInfo_GPU variables

TempUnit=°C

HWInfoDesc1=GPU Temp
HWiNFOSensorId1=0xe0002000
HWiNFOSensorInstance1=0x0
HWiNFOEntryId1=0x1000000
HWiNFOType1=CurrentValue
HWInfoValue1=%1 #TempUnit#
HWInfoBarImage1=#ImagePath#138x2GreenBar.jpg
HWInfoMin1=25
HWInfoMax1=90

HWInfoDesc2=GPU Fan
HWiNFOSensorId2=0xe0002000
HWiNFOSensorInstance2=0x0
HWiNFOEntryId2=0x3000000
HWiNFOType2=CurrentValue
HWInfoValue2=%1 RPM
HWInfoBarImage2=#ImagePath#138x2GreenBar.jpg
HWInfoMin2=0
HWInfoMax2=2000

HWInfoDesc3=GPU Clock
HWiNFOSensorId3=0xe0002000
HWiNFOSensorInstance3=0x0
HWiNFOEntryId3=0x6000000
HWiNFOType3=CurrentValue
HWInfoValue3=%1 Mhz
HWInfoBarImage3=#ImagePath#138x2GreenBar.jpg
HWInfoMin3=300
HWInfoMax3=1950

HWInfoDesc4=GPU Load
HWiNFOSensorId4=0xe0002000
HWiNFOSensorInstance4=0x0
HWiNFOEntryId4=0x7000000
HWiNFOType4=CurrentValue
HWInfoValue4=%1 %
HWInfoBarImage4=#ImagePath#138x2GreenBar.jpg
HWInfoMin4=0
HWInfoMax4=100

HWInfoDesc5=GPU D3D
HWiNFOSensorId5=0xe0002000
HWiNFOSensorInstance5=0x0
HWiNFOEntryId5=0x7000009
HWiNFOType5=CurrentValue
HWInfoValue5=%1 %
HWInfoBarImage5=#ImagePath#138x2GreenBar.jpg
HWInfoMin5=0
HWInfoMax5=100


2.jpg
You do not have the required permissions to view the files attached to this post.
xenium
Posts: 391
Joined: January 4th, 2018, 9:52 pm

Re: UsageMonitor always reports too high GPU usage for individual processes

xenium » August 25th, 2019, 5:04 pm

jsmorley wrote:
August 25th, 2019, 4:04 pm
Not that I can think of. This skin always seems to work correctly for me:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Index=0

[MeterGPU]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=GPU Total:			[MeasureGPU:2]%


1.jpg
CaptureGPU.PNG
Exceeds 100% only sometimes when loading the page in the browser.
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19706
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: UsageMonitor always reports too high GPU usage for individual processes

jsmorley » August 25th, 2019, 5:09 pm

xenium wrote:
August 25th, 2019, 5:04 pm
CaptureGPU.PNG
Exceeds 100% only sometimes when loading the page in the browser.
Not sure why that would be. These computers are not here to stay...

Guess the best advice is to create a Calc measure to limit it:

Code: Select all

[MeasureLimitCPU]
Measure=Calc
Formula=MeasureGPU >100 ? 100 : MeasureGPU

Another thing to try is to set the value of Rollup to 0. Since browsers spawn multiple "instances", I wonder if that is confusing it on the "total".

https://docs.rainmeter.net/manual/plugins/usagemonitor/#Rollup
xenium
Posts: 391
Joined: January 4th, 2018, 9:52 pm

Re: UsageMonitor always reports too high GPU usage for individual processes

xenium » August 25th, 2019, 5:54 pm

jsmorley wrote:
August 25th, 2019, 5:09 pm
Not sure why that would be. These computers are not here to stay...

Guess the best advice is to create a Calc measure to limit it:

Code: Select all

[MeasureLimitCPU]
Measure=Calc
Formula=MeasureGPU >100 ? 100 : MeasureGPU

Another thing to try is to set the value of Rollup to 0. Since browsers spawn multiple "instances", I wonder if that is confusing it on the "total".

https://docs.rainmeter.net/manual/plugins/usagemonitor/#Rollup
With Rollup = 0, it doesn't work.
Works well with the Calc measure.

Thank you very much ! :bow:
User avatar
jsmorley
Developer
Posts: 19706
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: UsageMonitor always reports too high GPU usage for individual processes

jsmorley » August 25th, 2019, 11:26 pm

xenium wrote:
August 25th, 2019, 5:54 pm
With Rollup = 0, it doesn't work.
Works well with the Calc measure.

Thank you very much ! :bow:
Sure thing... Another, maybe slightly more intuitive way to do that is:

Code: Select all

[MeasureLimitCPU]
Measure=Calc
Formula=Clamp(MeasureGPU,0,100)