Overloaded CPU/GPU: How to spot when I've gone too far?
-
When I'm experimenting with settings, and combinations of settings, I would like to be able have a very obvious indication that the core has overloaded, in case I don't notice brief glitches in gameplay.
What monitoring or logging can I use to show that the audio, CPU, GPU or any other resource was overloaded?
For example, shaders, run-ahead, non-threaded video, and other core options all require additional resources - how can I know when I've gone too far with a particular combination?
-
For monitoring/logging, you can't go wrong with bcmstat:
Simple Raspberry Pi command line monitoring tool:
- CPU fequencies (ARM, Core, H264, V3D, ISP)
- Temperature (current and peak) for Core and/or PMIC
- IRQ/s
- Network Rx/Tx
- System utilisation (percentage user, nice, idle etc.)
- CPU load (including individual cores when available)
- GPU mem usage
- RAM usage (with/without swap)
- Memory leak detection (D/A options - instantaneous and accumulated memory deltas)
- Undervoltage, ARM frequency cap and temperature throttle event monitoring
If the emulator supports showing a FPS counter (RetroArch does), turn it on to monitor it during gameplay.
-
@busywait if you run with verbose logging with most* retroarch cores it will output performance data. eg
RetroArch [INFO] :: Threaded video stats: Frames pushed: 461, Frames dropped: 0.
any dropped frames imply you've hit some kind of hardware bottleneck, or need to disable shaders/any non-default settings.
*: i assume you need threaded video for this to happen, and on some cores they seem to not output any data regardless - eg mupen64plus-next, last time i checked.
-
Just for completeness, these commands monitor your Pi's clock speed and SoC temperature without any additional software:
watch -n 1 vcgencmd measure_clock arm
watch -n 1 vcgencmd measure_temp
They will keep updating the output until you press
Ctrl+c
.See https://www.raspberrypi.org/documentation/raspbian/applications/vcgencmd.md for descriptions of these and other vcgencmd commands.
-
Thanks all! One more option:
I discovered the RetroArch OSD statistics in RGUI > Settings > On Screen Display > On Screen Notifications > Display Statistics@dankcushions said in Overloaded CPU/GPU: How to spot when I've gone to far?:
if you run with verbose logging with most* retroarch cores it will output performance data. eg
RetroArch [INFO] :: Threaded video stats: Frames pushed: 461, Frames dropped: 0.
*: i assume you need threaded video for this to happen, and on some cores they seem to not output any data regardless - eg mupen64plus-next, last time i checked.
Interesting to need Threaded Video, because it took me a little while to work out that Display Statistics only displays if Threaded Video = OFF
[Edit: I guess Threaded video stats is just showing that the video thread is able to keep up?]
Diplay Statistics in action (I had to make the bezel slightly transparent/reduced opacity):
-
@busywait said in Overloaded CPU/GPU: How to spot when I've gone to far?:
I discovered the RetroArch OSD statistics in RGUI > Settings > On Screen Display > On Screen Notifications > Display Statistics
Good find, I didn't know this even after 2½ years with RetroPie. 😅
-
I found another option for getting performance information logged - RetroArch performance counters: https://docs.libretro.com/guides/generating-retroarch-logs/
I haven't seen anything useful logged yet though :/
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.