gtop icon indicating copy to clipboard operation
gtop copied to clipboard

Performance Issues

Open ghost opened this issue 8 years ago • 11 comments

I installed gtop on OSX and Raspberry Pi and I noticed very high cpu usage comparable to other monitoring solutions (htop using 1% or less). Raspberry Pi was sitting at 100% CPU utilization just for gtop and OSX was anywhere between 5-15% CPU usage at any given time. Are performance improvements on the roadmap?

ghost avatar Aug 11 '17 15:08 ghost

Well, node environment consumes more resources by its nature but 15% is really huge for a desktop machine. I tried in Intel Core 2 Quad Q9550 and Intel i7 7500U CPU linux machines, it usually lies around 2.5% CPU usage. I will look into that. (Let me try on my Raspberry Pi Zero.)

aksakalli avatar Aug 11 '17 16:08 aksakalli

Sure thing, regarding the Raspberry Pi here is my version/kernel:

pi@pivpn:~ $ node -v v6.11.1

pi@pivpn:~ $ npm -v 3.10.10

pi@pivpn:~ $ uname -a Linux pivpn 4.9.35+ #1014 Fri Jun 30 14:34:49 BST 2017 armv6l GNU/Linux

nodejs is for armv6 installed. Had to download the archive since the raspberry pi version in the repo wouldn't work.

ghost avatar Aug 11 '17 21:08 ghost

I've noticed the same, which I thought was quite funny in the ironic sense :), granted I'm testing this on a very small specced machine: 2 CPUs, 6GB RAM.

screen shot 2017-08-14 at 08 22 12

joaodlf avatar Aug 14 '17 07:08 joaodlf

Performance is about at 1.5% on an i7 4770k @ 4.0GHz but it is enough to fully utilize the CPU on a Raspberry Pi OC'd to 1GHz. Is this just an issue with node?

ghost avatar Aug 14 '17 12:08 ghost

I tried in Raspberry Pi Zero: it consumes 100% CPU and makes it totally unresponsive. It is due to rendering routine. In every rendering cycle, bitmap is converted into unicode characters and updated in the terminal. It takes takes too much CPU time.

Possible solution/workaround ideas:

  • making rendering routine rate configurable for slow machines (thus the dashboard would become less responsive)
  • a lite version flag for less capable but less resource consumer version (need to design and implement a new dashboard only depens on blessed)
  • options to disable some panels like in #16
  • other optimizations???

What do you suggest?

aksakalli avatar Aug 14 '17 13:08 aksakalli

Options for #16 are a good choice in my opinion from the features and performance perspective. Is there any way to optimize the rendering routine itself to be less CPU intensive (or would that require blessed)? I'd also say rendering rate option could be lumped into #16 in addition to the command line options. Unfortunately, I am not a NodeJS expert so I cannot give much insight there. :(

ghost avatar Aug 14 '17 13:08 ghost

Hi, On my Fedora 26 gtop is on the top of memory and cpu consumming..........little bit strange for a monitoring tool

Johnybe avatar Aug 18 '17 07:08 Johnybe

On Scaleway machines, gtop has the highest CPU consumption among all processes :( .

aadrian avatar Aug 28 '17 11:08 aadrian

I was about to report a new issue for this, and came across this issue here. Here is the amount of CPU usage gtop consumes on my machine. Core i5 second Gen, 4 GB of RAM It is using higher CPU resource than firefox. selection_001

rajudev avatar Sep 14 '17 05:09 rajudev

This tool is very cool.

What a pitty that we can't really use it because of this performance issue :( .

Most companies do not allow the use of monitoring tools that have such high resource usage.

aadrian avatar Sep 14 '17 06:09 aadrian

https://github.com/ClementTsang/bottom is a nice alternative. On my RPi3 gtop is around 10% CPU whereas bottom is 1.5%.

vogler avatar Jan 11 '23 09:01 vogler