mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-15 14:15:55 -06:00
[GH-ISSUE #17] [Feature Request] Make snapshot interval configurable in monitor mode #15
Labels
No labels
api
bug
bug
cli / tui
dependencies
documentation
documentation
documentation
duplicate
enhancement
exporter
invalid
pull-request
pynvml
question
question
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/nvitop#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @uwydoc on GitHub (May 12, 2022).
Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/17
just a small feature request, it would be better to make the snapshot interval configurable in monitor mode. a quick grep shows that there are multiple snapshot intervals, some are defined as class members, others are plain constant value in
time.sleep(xxx)@XuehaiPan commented on GitHub (May 12, 2022):
Hi @uwydoc, thanks for the post. I arbitrarily hardcoded the snapshot intervals in
nvitopfor performance issues. Taking snapshots is I/O intensive, especially when there are many processes on GPUs. I think we should not do this so frequently.nvitoptakes snapshots for GPU device status every 1 second, and every 2 seconds for GPU processes.Opinions are welcome. Can you give some use cases?
The class members (
0.7here)f73b7d84c5/nvitop/gui/screens/main/device.py (L16-L19)are not actual snapshot intervals. They only account for syncing results between threads.
The effective intervals are defined by
ttl_cache:f73b7d84c5/nvitop/gui/screens/main/device.py (L98-L100)f73b7d84c5/nvitop/gui/screens/main/process.py (L169-L172)@uwydoc commented on GitHub (May 12, 2022):
well, i was planning to make the interval longer, say 3 seconds for process snapshot and gui refresh, to make its cpu load lower (0.2~0.3 currently). the default settings are reasonable, though, it would be better if the user can configure it according to their specific need. btw, change the update interval is a common feature supported by many top-like monitor tools, for example: nvidia-smi/gpustat/dstat/htop/glances.
@XuehaiPan commented on GitHub (May 12, 2022):
I'm afraid we cannot set the snapshot interval longer for device status, because these snapshot results are used for the graph plots.
I can make the interval for process snapshots to be configurable though.
@uwydoc commented on GitHub (May 13, 2022):
they are related, but i do not think it is impossible or even hard to make the snapshot interval configurable while keep the graph plot right. ok, maybe i should dig deeper into the code first.
C.UTF-8is not available #121