Node-RED dashboard performance across tablets & mobiles

Thank you all for the great input and many replies. I believe I got some learn, fail, trial, error and hopefully succeed ahead, would love to learn the skills to build my own dashboards using UI builder, now the only challenge left is to find some time :).

Keep the information coming, would love to learn about some good instruction video's that talk me through the basics.

Ah, talking of time. There is another thing I've never found time to produce.

1 Like

Ok, so I setup my first ever, brand new Pi 4 4GB and the results so far have been interesting.

My 6 yo desktop, which was never top of the range, but has an i5 processor does most things much faster in Node-Red than the wee little Pi.

I thought given the age of my desktop that the Pi might be snappier.

However, a lot of the issues I had with performance have gone away... ok, let me explain.

The performance itself, is actually very similar when opening the dashboard from my old iPad Pro, however from my Pixel 3A the page takes about 8 seconds to load (for the one and only dashboard that I have loaded onto the Pi), but I don't get any issues thereafter... it just works!!!

On the other hand, the desktop version does not work at all on m Pixel. Well, in fact, I don't have the patience to really find out. After waiting a while I usually give up, as it's pointless at that stage.

I wonder why the Pi does better at hosting the pages vs the desktop... I also wonder if I had a new PC whether all these issues would go away... hmmm.

What OS are you running on the PC and how did you install node-red?

Windows 10.

Install was the only way I know. Downloaded the install file from the node-red site.

I'm thinking I'll do all dev on my pc and only migrate to pi for prod.

Works for me.

Ok, so the fun continues.

I have done quite some testing and tuning, mostly to great success, and yet I have the following very odd situation:

  • If I connect to my Pi, which is running Node-RED, via my PC to view my dashboards, the performance is fantastic.

  • If I connect to my dashboards from the Pi running Node-RED, the dashboards fall over... appallingly bad performance... how can this be possible?

I'm connecting using Chrome and the PC and Chromium on the Pi.
I really don't know where to look anymore.

In the end I might just buy a 2nd Pi to connect to the 1st Pi (which is what I planned anyway) and hope that the performance on the 2nd Pi is similar to my PC.

What do you see running top on the pi when you run node-red and the browser in the pi and access the dashboard?
What sort of pi is it?

Top confirms what I am experiencing.

CPU at <10% when Node-RED running on Pi 4 with 4GB ram. I think I saw RAM at a total usage of 700MB once, but usually it hovers around 500MB with Node-RED running.

CPU >100% when accessing dashboard from Pi

CPU around 10% when accessing dashboard from PC and doing nothing with the dashboard ie. not mouse clicks

CPU >10% and saw it jump for few seconds to 30% when moving from one flow to another

I hope the pictures uploaded in the right order :slight_smile:

The performance on the PC is amazing!

If only I could replicate it on the Pi....

BTW, I don't understand how the CPU can be reporting >100%.... I'm sure there's a good explanation.

The 100% is misleading in top or htop. It’s actually in the context of 1 core so a 4 core processor can go up to 400% load.
The high cpu loads you see is probably because the client side code of the dashboard is quite heavy as the libraries that nodered dashboard use are not the most light weight thing there is so especially if you have a lot of charts whichever machine the browser runs on which runs this client side code will have in pi terms have to do some heavy lifting.
So using a second pi will give you high loads on that one as the client side code will than run in the browser there. I think this has also to do with how optimized or not chromium is on the pi.
The server side code of nodered which runs on which ever pi nodered is installed on will take have much less impact in the equation of cpu load when running the dashboard.

Johannes

1 Like

Ok, so is there a better browser than Chromium to view the dashboard on the Pi?
I couldn't care less how I access the dashboard from the Pi as long as it works.

I also guess from what you are saying that the Pi cannot use more than 1 CPU for Chromium, else it would go over 100% and presumably the dashboard would work, rather than freeze up?

Do you mean that the dashboard never appears on the pi? It may take a little while but should appear eventually. Once loaded I would expect the performance to be ok. If you get a message that it is not responding then tell it to keep waiting.

If it never loads have a look in the Developer Console in the browser and see if it says anything helpful.

1 Like

It loads eventually (30 to 60 seconds later, not acceptable). but then does not work.

Multiple button presses or won't even allow a button press.

I'll check the developer console but not sure i know what I'm looking for.

I'm near giving up and just using a small pc to run my dashboards.

OK, another question, does a ui_template load quicker than a ui_button and ui_text node, when the ui_template is configured to do the same thing as the button or text node?

I'm tending to qualitatively think it should, but I'd love to hear from those in the know.

If it does then I'll change all my nodes to templates. Every little helps.

Anyone have a view?

I don't think it will make a measurable difference.

In fact I suspect standard widgets will be better than template, as for a widget I imagine the code is only downloaded once and each instance just has to be parametrised, whereas for a template they are going to have be individually downloaded, I assume.

1 Like

Thanks. That's very helpful.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.