Grafana CPU requirements

Posted on
Sun Dec 16, 2018 5:32 pm
siclark offline
Posts: 805
Joined: Jun 13, 2017
Location: UK

Grafana CPU requirements

I love this plugin and Grafana but my old Mac mini doesn't it regularly uses 25% of CPU, more than the server and most other plugins combined. (the irony is not lost on me that I used Grafana to see this!!)
Other than remembering to close web browsers when I'm not using them, I'm wondering about whether I could use a raspberry pi to run influx and/or Grafana on?
If I only did one which would save most Mac processing? Ideally I'd like to keep influx on the Mac and just run Grafana elsewhere, that way I don't need a ext drive for it.

Anyone doing similar already? .
Cheers


Sent from my iPhone using Tapatalk

Posted on
Sun Jan 06, 2019 10:52 am
vtmikel offline
Posts: 391
Joined: Aug 31, 2012
Location: Boston, MA

Re: Grafana CPU requirements

My apologies for the delay in responding to this. It got lost in the holiday festivities.

On my Indigo server, when looking at the Activity Monitor, CPU tab, sorted by CPU time, the Grafana plugin, nor any of the sub-processes are not in my top 5 for plugin usage. Mine are:

1. Timed Devices
2. Indigo Server process
3. Group Change Listener
4. HomeKit Bridge
5. NEST

Memory, however, is a different story. Influxd is my second most memory consuming (after kernel) process at 724MB. I've found this to be directly proportional to the amount of data in your InfluxDB. When I reset my influx to begin from scratch, it consumes much less. I also think that this memory usage is partly due to the amount of memory I have available on my machine (16GB). I think it could consume less if you have less available and would page to disk for virtual memory.

Grafana takes next to no resources. The Grafana server simply provides the configuration to the web browser of the client, and can also pass through data as a proxy (when the Access Mode is set to Server for the Data Source). You can further reduce the burden on the server by changing the Data Source to Browser. The web client does all of the hard work for Grafana.

The most logical thing to do, if you want to separate your components, is to move InfluxDB to another machine. You can configure the plugin to use a external InfluxDB server, and optionally still use the plugin for the Grafana Server (Since it requires little resources as I mentioned).

Posted on
Tue Mar 05, 2019 5:21 pm
siclark offline
Posts: 805
Joined: Jun 13, 2017
Location: UK

Re: Grafana CPU requirements

So I've moved my indigo install and influx dB to my iMac with 24GB from my old 4BG mini. ?
The influx dB device memory is 3.4GB!! I'm guessing as I imported all states for devices I was interested in at the beginning I have to much date stored. Is there a way to remove states from the db that I don't need anyone?


Sent from my iPhone using Tapatalk

Posted on
Thu Mar 07, 2019 3:28 am
rhanson offline
Posts: 146
Joined: Apr 30, 2013

Re: Grafana CPU requirements

siclark wrote:
Is there a way to remove states from the db that I don't need [anymore]?


I'd like to know this as well. I added a device that has some 100 states, and now Grafana's dropdowns are littered with states that I don't need. I ended up just adding in the few states I needed, and removed the device from the config, but the states are still there. Would love to know how to clean all that up.

Posted on
Thu Mar 07, 2019 4:47 am
siclark offline
Posts: 805
Joined: Jun 13, 2017
Location: UK

Re: Grafana CPU requirements

This is on my to do list, was thinking this might help but not tried it yet. If you want to go first!!

show volume of Indigo data being ingested by Influx?
https://r.tapatalk.com/shareLink?share_ ... are_type=t




Sent from my iPhone using Tapatalk

Posted on
Sun Mar 17, 2019 8:33 am
vtmikel offline
Posts: 391
Joined: Aug 31, 2012
Location: Boston, MA

Re: Grafana CPU requirements

siclark wrote:
So I've moved my indigo install and influx dB to my iMac with 24GB from my old 4BG mini. ?
The influx dB device memory is 3.4GB!! I'm guessing as I imported all states for devices I was interested in at the beginning I have to much date stored. Is there a way to remove states from the db that I don't need anyone?


Sent from my iPhone using Tapatalk



Have you determined if Influx is simply using the memory as cache because it's available, or because it truly needs that much? I've "truncated" my database once since building the plugin. I have 16GB of RAM and my influx DB goes back 1 year. As a test, I disconnected all clients to Grafana for 24 hours and my Influx process went to 300MB of RAM. I connected to Grafana, ran a 1-year historical query, and the Influx process spiked to 6GB.

I think it likely caches based on query performance. If you stop asking for the old data, it may release that memory from the cache.

This thread reinforces my belief that the "Include device" is dangerous and should be removed from the plugin config. I think I'll force users to include specific states one at a time.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest