elvetemedve / gnome-shell-extension-system-monitor

Gnome Shell extension for displaying resource usage
GNU General Public License v3.0
87 stars 15 forks source link

Display RES memory instead of VIRT? #25

Closed bagage closed 7 years ago

bagage commented 7 years ago

It seems that the extension currently shows the virtual size of processes. I expected it to show how much processes were using physical memory instead (RES column from htop). Is that the intended behavior?

elvetemedve commented 7 years ago

@bagage Processes are sorted by the sum of virtual memory + resident memory + shared memory. The intention was to accumulate all memory usage. htop shows the resident memory in that column. Do you think it would make more sense to use resident memory only? Or make it configurable in settings?

bagage commented 7 years ago

@elvetemedve Yes I think only resident memory is useful - at least for me. I don't know if everyone would agree with that however (including you!), so some setting could be just fine. But I really tend to think that people would expect to see what "actual physical memory" is being used by apps, not all the virtual one. WDYT?

elvetemedve commented 7 years ago

As for me a tool like system monitor is useful in situations, when one of the running program is misbehaving. In such a case I expect a system monitor to help me easily find the source of the problem. For example show me the process that allocated all available memory. Probably it's enough to watch RAM in most cases, but I'm not sure it covers all failure scenarios.

bagage commented 7 years ago

Yeah OK it makes sense. Maybe a setting would be great then, so that each can see what he/she would expect to see? To clarify: I personally use your great extension as a watchdog - when my computer becomes really slow, I'd like to kill immediately the culprit before it starts to swap&die. Generally this culprit is eating all the RAM with some infinite loop or similar (and is generally me :)). But as of today, the culprit is not present in top RAM consumers because it only consumes resident memory - some applications are using tons of VIRT (gnome-shell, rhythmbox, etc.) but are just fine.

elvetemedve commented 7 years ago

I see. I will try to make this change during the weekend.

elvetemedve commented 7 years ago

@bagage I've changed the memory calculation. Could you test the new version, before I make a new release? Here is the new version: System_Monitor@bghome.gmail.com-6.zip

bagage commented 7 years ago

Great news! It seems that it works as expected; at least it is consistent with htop! Good job @elvetemedve.

elvetemedve commented 7 years ago

Excellent. Then I'll release it. Thanks for the feedback.

elvetemedve commented 7 years ago

New version has been released.