monitor
monitor copied to clipboard
Feature request: Add option to draw the CPU chart as a stacked area chart
I have a 6-core / 12-thread machine. When I am running a program that uses several threads and has high CPU usage (for example, compiling C++ with many worker threads or running database queries), the CPU chart in Monitor is difficult / impossible to read because the plots overlap on the plot area:
The Gnome System Monitor offers the choice of a stacked area chart that solves this problem. Here is a screenshot:
The Gnome System Monitor offers two options in its preferences. These are:
- Draw CPU chart as stacked area chat, and
- Draw CPU chart as smooth graph
Here is a screenshot of these options in the Gnome System Monitor preferences dialog:
Here is the stacked area CPU chart from Gnome System Monitor but with smooth lines turned on:
In my opinion, the stacked chart has several advantages:
- You can clearly see the total CPU usage of the system (it is the top line of the chart). While Monitor does show the current total CPU utilization (see the first screenshot above), sometimes you want to see the history of the total CPU usage graphed over the several seconds (as it goes up and down), not just the current CPU usage. You can easily do this with the stacked chart.
- It is much easier to read how a particular CPU thread has contributed to the total CPU usage over time because you can look at its "slice" in the stack. You cannot really do this when the plots are drawn on top of each other (i.e. without being stacked).
- A stacked chart still works well with several CPU threads to plot, whereas plotting them on top of each other (as Monitor currently does, i.e. without being stacked) can become unreadable on a many-core/many-thread machine.
Of the two Gnome System Monitor screenshots above showing the stacked charts, I personally prefer the first one without the smooth lines because having less detail makes it easier to identify what is going on with only a quick glance.
I am not necessarily suggesting changing the default chart, but having a stacked chart (without smooth lines) as an option would be very welcome.
Didn't know that there is actually such a need. Yes I think it can be added, but needs design. I want to preserve informing of high thread usage, but it also needs to be indicated what colour a thread is on the plot.
And of course if You need "real" plot data, I have nothing against adding an option to disable smoothing.
It would be good to have an option to disable smoothing. Gnome System Monitor allows smoothing to be disabled independently of the choice of the selected chart type (either regular or stacked).
Perhaps the option to disable smoothing should be a separate issue?
Agree. I thought about this as a separate feature.
I have now described the option for turning off smoothing in a separate feature request https://github.com/stsdc/monitor/issues/298.
So this issue should be just about implementing support for stacked CPU charts.
Quick PoC.
That looks really good! I think that is much easier to read!
Here is how this looks on my system (screenshot from the 0.13.0 release):
This is so much easier to read!
This might be because I have 12 cores, so lots of stacked chart areas, but because the area under each chart is drawn with alpha transparency and on top of each other, the colour seems to become brown (see arrow).
Here is a screenshot of Gnome System Monitor. On the stacked area chart, only the area that corresponds to that core is shaded:
(Although Gnome System Monitor does not use transparency, I agree that the transparency in Monitor looks better.)
I think that only the area that corresponds to each core should be shaded (instead of shading everything under the line).
That would also fix the overlapping transparency/brown colour issue.
Best I can do right now :sweat_smile:
Looks like it fixes issue with mixing different colors. If you think there is more to do let me know!