Open 3blake7 opened 5 years ago
Both Multi-GPU and VRAM support would be super amazing and the most useful thing ever.
I see not much interest in this feature, but I'd love to have it too. Adding comment just to refresh it :)
There is support for multi-gpu system (sort of) on linux with nvidia at least:
Edit gpu.sh, the script that polls the GPU:
nano ~/.local/share/gnome-shell/extensions/system-monitor-next@paradoxxx.zero.gmail.com/gpu.sh
Where you seenvidia-smi -i 0 ...
change to your desired GPU (GPU 0
is the default).
No restart necessary, the change starts to work immediately (awesome).
Note: Since it is already using nvidia-smi
, all info about all GPUs is already available. Should not be too hard to graph all GPUs at the same time (different color scheme for each). That would lead to a pretty cluttered graph, but it is do-able. Maybe a separate chart for each would be cool.
I realized that the current gpu_usage.sh
uses GPU0
as default which on a multi-gpu system can easily be the wrong one, depending on where you have your monitors plugged in. nvidia-smi
always sets GPU0
as the first one detected (CUDA sets GPU0 as the fastest).
The vast majority of systems will have a single GPU so no need to arbitrarily pick GPU0
, since only one will be returned form nvidia-smi
. In the case of multi-gpu, aggregation of all GPUs can be used (exactly like the CPU multi-core monitor)
I rewrote the polling for NVidia GPUs and created a pull request.
This is a multi (1 to any) GPU stat aggregator that works exactly the same as current polling in the case of 1. In the case of a multi-GPU set up, the stats returned from nvidia-smi
are added (aggregated) for each GPU and the last aggregate is returned.
Fully tested, works for 1 to any number of GPUs.
I was wondering if you'd be willing to add multi GPU support with gpu and vram?