Jump to content

How is GPU Usage/Load actually calculated/measured?

How do programs actually measure/calucate this? you know 0-100% usage. 
How does it know? like number of active transistors?

AMD Ryzen R9 5900X  | Arctic Liquid Freezer II 360  |  GIGABYTE X570S AERO G  |  2x32GB G'skill TridentZ 4000MHz  | MSI RX 6900 XT Gaming Z Trio 16GB Dark Base Pro 900 (Orange)  | TOSHIBA 4TB 3.5" Drive - Game Drive | Crucial MX200 250GB 2.5" SSD - Boot Drive | Cooler Master V750 PSU |

 

Living Room PC: AMD Ryzen 2400G | MSI RX VEGA 56 8GB AERO | 2x8 GB Crucial Ballistix 2400MHz | Intenso 250GB SSD | Seagate 500 GB HDD | Node 202 + 850W PSU |

Link to comment
Share on other sites

Link to post
Share on other sites

It's pretty stupid actually. More a time load. This is especially important if you have a HT/SMT enabled CPU. Assuming workload is balanced, when you hit 50% you're effectively using all the "real" cores, and the region between 50-100% is the small extra benefit from HT/SMT.

 

Edit: doh! I misread the question as CPU not GPU. I'm guessing it is similar though.

Main system: i9-7980XE, Asus X299 TUF mark 2, Noctua D15, Corsair Vengeance Pro 3200 3x 16GB 2R, RTX 3070, NZXT E850, GameMax Abyss, Samsung 980 Pro 2TB, Acer Predator XB241YU 24" 1440p 144Hz G-Sync + HP LP2475w 24" 1200p 60Hz wide gamut
Gaming laptop: Lenovo Legion 5, 5800H, RTX 3070, Kingston DDR4 3200C22 2x16GB 2Rx8, Kingston Fury Renegade 1TB + Crucial P1 1TB SSD, 165 Hz IPS 1080p G-Sync Compatible

Link to comment
Share on other sites

Link to post
Share on other sites

As an educated guess: It seems like a simple ratio of active vs idle time over the sample period.

 

It has nothing to do with how many of the total transistors are being utilized. CPU's are composed of many sub-sections that each handle a particular type of calculation/workload. So measuring utilization in that way would not be useful.

BabyBlu (Primary): 

  • CPU: Intel Core i9 9900K @ up to 5.3GHz, 5.0GHz all-core, delidded
  • Motherboard: Asus Maximus XI Hero
  • RAM: G.Skill Trident Z RGB 4x8GB DDR4-3200 @ 4000MHz 16-18-18-34
  • GPU: MSI RTX 2080 Sea Hawk EK X, 2070MHz core, 8000MHz mem
  • Case: Phanteks Evolv X
  • Storage: XPG SX8200 Pro 2TB, 3x ADATASU800 1TB (RAID 0), Samsung 970 EVO Plus 500GB
  • PSU: Corsair HX1000i
  • Display: MSI MPG341CQR 34" 3440x1440 144Hz Freesync, Dell S2417DG 24" 2560x1440 165Hz Gsync
  • Cooling: Custom water loop (CPU & GPU), Radiators: 1x140mm(Back), 1x280mm(Top), 1x420mm(Front)
  • Keyboard: Corsair Strafe RGB (Cherry MX Brown)
  • Mouse: MasterMouse MM710
  • Headset: Corsair Void Pro RGB
  • OS: Windows 10 Pro

Roxanne (Wife Build):

  • CPU: Intel Core i7 4790K @ up to 5.0GHz, 4.8Ghz all-core, relidded w/ LM
  • Motherboard: Asus Z97A
  • RAM: G.Skill Sniper 4x8GB DDR3-2400 @ 10-12-12-24
  • GPU: EVGA GTX 1080 FTW2 w/ LM
  • Case: Corsair Vengeance C70, w/ Custom Side-Panel Window
  • Storage: Samsung 850 EVO 250GB, Samsung 860 EVO 1TB, Silicon Power A80 2TB NVME
  • PSU: Corsair AX760
  • Display: Samsung C27JG56 27" 2560x1440 144Hz Freesync
  • Cooling: Corsair H115i RGB
  • Keyboard: GMMK TKL(Kailh Box White)
  • Mouse: Glorious Model O-
  • Headset: SteelSeries Arctis 7
  • OS: Windows 10 Pro

BigBox (HTPC):

  • CPU: Ryzen 5800X3D
  • Motherboard: Gigabyte B550i Aorus Pro AX
  • RAM: Corsair Vengeance LPX 2x8GB DDR4-3600 @ 3600MHz 14-14-14-28
  • GPU: MSI RTX 3080 Ventus 3X Plus OC, de-shrouded, LM TIM, replaced mem therm pads
  • Case: Fractal Design Node 202
  • Storage: SP A80 1TB, WD Black SN770 2TB
  • PSU: Corsair SF600 Gold w/ NF-A9x14
  • Display: Samsung QN90A 65" (QLED, 4K, 120Hz, HDR, VRR)
  • Cooling: Thermalright AXP-100 Copper w/ NF-A12x15
  • Keyboard/Mouse: Rii i4
  • Controllers: 4X Xbox One & 2X N64 (with USB)
  • Sound: Denon AVR S760H with 5.1.2 Atmos setup.
  • OS: Windows 10 Pro

Harmonic (NAS/Game/Plex/Other Server):

  • CPU: Intel Core i7 6700
  • Motherboard: ASRock FATAL1TY H270M
  • RAM: 64GB DDR4-2133
  • GPU: Intel HD Graphics 530
  • Case: Fractal Design Define 7
  • HDD: 3X Seagate Exos X16 14TB in RAID 5
  • SSD: Inland Premium 512GB NVME, Sabrent 1TB NVME
  • Optical: BDXL WH14NS40 flashed to WH16NS60
  • PSU: Corsair CX450
  • Display: None
  • Cooling: Noctua NH-U14S
  • Keyboard/Mouse: None
  • OS: Windows 10 Pro

NAS:

  • Synology DS216J
  • 2x8TB WD Red NAS HDDs in RAID 1. 8TB usable space
Link to comment
Share on other sites

Link to post
Share on other sites

There are MANY different ways to calculate load. You can see how many units are currently in use over the total number of units, you can see how much bandwidth is currently being used over the theoretical maximum, or use the number of gates, etc etc.

 

There are even some stupid ways that some people use , such as comparing the base clock vs the current clock speeds (such as MS with CPUs).

 

In the case of AMD on Linux with AMDGPU, here's how it's done:

Quote

The amdgpu driver provides a sysfs API for reading how busy the GPU is as a percentage. The file gpu_busy_percent is used for this. The SMU firmware computes a percentage of load based on the aggregate activity level in the IP cores.

Basically the firmware in the GPUs accounts for the activity on the internal IP cores in some proprietary way and reports it back to the system. (that's similar on how most GPUs work since they're all proprietary IP cores).

FX6300 @ 4.2GHz | Gigabyte GA-78LMT-USB3 R2 | Hyper 212x | 3x 8GB + 1x 4GB @ 1600MHz | Gigabyte 2060 Super | Corsair CX650M | LG 43UK6520PSA
ASUS X550LN | i5 4210u | 12GB
Lenovo N23 Yoga

Link to comment
Share on other sites

Link to post
Share on other sites

23 minutes ago, Edgar R. Zakarian said:

like number of active transistors?

Pretty sure that would be quite impractical (and complicated). You'd need a ton of additional circuitry to measure and count which transistors are active, which would then need additional space, require additional power and produce more heat.

 

The CPU load is determined by the OS and how it does this depends on the particular OS you're using. If you wanted to go really in-depth, you could probably have a look at how the Linux kernel does it (provided you can read and understand its code).

 

Here's an answer that is a bit more in depth: https://stackoverflow.com/a/3748172

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

i would assume it's the ratio of your cpu having work queued vs having nothing queued for the cycle across a fixed amount of time

same goes for gpu -shrug-

 

as for HT, a cpu can process more than 1 type of instruction at once so HT can queue different types of workload for a core to process at once.

-sigh- feeling like I'm being too negative lately

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×