Speed to render graphs

Not sure if it is just my configuration but often I have to wait 10 - 15 seconds, sometimes 30 - 45 seconds and sometimes even several minutes for a graph to render, my temperature monitors seem to take the longest but it also happens to speedtest, even lights on and off bar graph!

I attempted to solve it by renaming the home-assistant_v2.db file (it was 2.3gb) the replacement has since grown to 1.3gb

I was on a pi2 but I since upgraded to a pi3 to improve performance but it still struggling.

Any solutions to get better rendering speed for these graphs?

2 Likes

Get a very fast SD card. I saw the same thing, and a faster SD card made a huge difference. https://www.amazon.com/gp/product/B013CP5HCK

If you really like graphs, influxdb + grafana is WELL worth the effort.

2 Likes

I used to have the same problem until I moved to MySQL. Was like night and day. Now I keep weeks of data and graphs render super fast.

2 Likes

+1 to influxdb and grafana - configurable graphs and comparative analysis - nice!
after setting up a system myself, i can recommend NOT running grafana on a pi, 2, 3 or otherwise. 2 reasons;

  1. compiling grafana for arm is moderately complicated. Plus i coundnā€™t get a recent version for arm. grafana x86 is on v4.1, if you compile on arm i couldnā€™t find a repo past v2

  2. space/data size. my rpi2 hass 8gb lasted less than a month once i put grafana on it. grafana/influxdb (i never figured out which one it was) just soaked the sd card with data. to the point where hass couldnā€™t write its logs or dbs, and bombed. depending on your os, that could spell trouble.
    i researched pointing grafana to external usb/sd/network for the db, but in the end just virtualised on my x86 main server.
    now, with a fast sd card, home assistant runs very fast and responsive, and grafana can burp out all the data it wants onto my home server zfs array, and everybodys happy!

Wow I just learned about the option to use mysql from this thread.
Set it up a few hours ago and it is a lot faster than before.
Thanks ! :smile:

1 Like

Just to give some extra information about grafana for ARM: You can find updated debā€™s and instructions on https://github.com/fg2it/grafana-on-raspberry/wiki

Thanks for the response!! I got a fast SD (after hearing it was important)

http://www.gearbest.com/memory-cards/pp_28061.html?wid=21

Although I didnā€™t spend much on it - not sure if its worth spending a bit more to upgrade it.

Is influxdb = MySQL or is it a diffferent process to start using that - if so can anyone point me in the direction to get MySQL setup?

@molano - thanks for the info! iā€™ll investigateā€¦

@Stewface - influxdb and mysSQL are different in this context. influxdb is like a ā€˜pluginā€™ almost to homeassistant, whereas if you use mySQL you fundamentally change/replace homeassisstantā€™s back-end. HASS uses, by default, SQLite as its main databasing tool, and switching to mySQL replaces that. Influxdb is used in addition to whatever backend db tool HASS uses. I think.



1 Like

Same here ā€¦ well never waited more then 15 seconds, because I am impatient and move on

@danpow you are right. I use mysql to store all data locally for 1 week (with the recorder), so I can have the data and some quick graphs by hand in the hass web UI.
Next to that I push everything to Influxdb and can create my own graphs in Grafana over time and when I need them.

So two seperate items. You can use them both or only one. Whatever you like.

1 Like

mmhh will try this

I got a very fasy card ā€¦ and the speed to me it looks the same (slow) as before ā€¦

which is the fastest I can use on a pi3?

How fast? The one I linked is rated as UHS 3. It made a huge difference for me.
https://www.sdcard.org/developers/overview/speed_class/

SanDisk Extreme Scheda di Memoria, MicroSDHC da 32 GB + Adattatore SD fino a 90 MB/sec, Classe 10, U3, V30, FFP