# My ongoing confusion after updating to Buster and CPU load

**URL:** <https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642>\
**Category:** General\
**Created:** [24 December 2021 06:09 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642 "2021-12-24T06:09:01Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [24 December 2021 06:09 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/1 "2021-12-24T06:09:01Z")

</div>

Yeah, ok, I know this isn't a RasPi forum.

But Node-Red is implicit.

RasPiZ(W). Anyway, getting to the problem:

This is what I see with `htop`

 ![Screenshot from 2021-12-24 16-44-47](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/0/60061b538061ee349a59b8a62bcd5ef8933a833b.png)

Those lines with `--max_old_space_size.......`

So looking about what this is/means.

[Here...](https://nodered.org/docs/faq/customising-systemd-on-pi)

`The service comes configured for the pi user. To change which user it runs as, edit the service definition /lib/systemd/system/nodered.service`

Path/file: `/lib/systemd/system/nodered.service`

 ![Screenshot from 2021-12-24 17-06-07](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/0/c0170b9ab36d3ed49f0f1028225e67cfb0434f5d.png)

Sorry, where?

# (EDIT)

Sorry. Ok, I didn't go into the `system` directory.  
I sometimes miss names in paths.

Yes, I know things change.

But it makes it confusing for idiots like me when _we_ try to research what is going on.

Someone - please.  
Looking for how to work out what those lines mean.  
(As there are a lot of them)  
And if that number doesn't match what the O/S is _using_ there is a conflict.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [24 December 2021 07:58 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/2 "2021-12-24T07:58:43Z")

</div>

Indeed not sure what this has to do with service files. Did you try googling "how to use htop" ?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [24 December 2021 08:09 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/3 "2021-12-24T08:09:35Z")

</div>

Kind of.

I'm simply confused. None of this makes sense to me.

Just I saw about 10 instances of that on the screen shot.  
It got me interested and I went off and read the link I supplied.

Alas it lacks . . . . _context_ (?) for me. But that doesn't mean it isn't a problem. Though it also doesn't mean it is. I get that.

I am only asking for a bit of help to what that file does and how it would affect the machine and memory use.  
But I can't understand it as written and hope someone smarter than me could (maybe) translate it to something I can understand, or at least get a better appreciation of it's place in the scheme of things.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [24 December 2021 10:46 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/4 "2021-12-24T10:46:25Z")

</div>

Node-RED uses the Linux systemd to set up autostarting on boot - This is part of many Linux systems - again google is your fried to read up on systemd - eg [Use systemd to Start a Linux Service at Boot | Linode](https://www.linode.com/docs/guides/start-service-at-boot/) - As part of that you can configure how it starts up and the service file defines some things that Node-RED needs like the user and working directory - and it also limits the amount of memory it tries to use. By default we set that to half of the available memory on the device so depending on which model Pi that number may vary. If you have absolutely nothing else of consequence running on the Pi you can up that to let Nod-RED have more - or if very busy with other things like databases etc then maybe less...

If you read up on Htop you will find that it will show every thread for a process..... and while node.js is essentially single threaded, it does spawn off other threads to handle things like async IO (writing to disk etc) - so it may well look like Node-RED is running multiple times... I think you can use the H key to stop it doing that - but RTFM...

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [24 December 2021 11:25 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/5 "2021-12-24T11:25:30Z")

</div>

Yes, ok. "RTFM" but it doesn't do me any good if it is written in a _language_ which I don't speak/understand.

Basically since accidentally updating node-red (or some part of it) and it breaking and so I had to update to Buster, the machine which used to work is now basically non-usable.

Yeah, my problem. I am trying to work out what has gone on, but am being told (basically) "Too bad".

I am not running multiple versions of Node-Red.  
But one thing I did notice is that the original flow file was 1.2 meg in size.  
After making a new SD card and all that stuff and importing the flow it has grown to 2.4 meg.  
(Basically doubled.)

It complained about the security key thing not being set by me, but the system default (what ever)

I have tried a few times to get my head around doing that to no avail. All I see is words.  
Their greater meaning is lost on me.

So the fact that the flow size has doubled may also be contributing to the machine being nearly useless.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 December 2021 11:49 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/6 "2021-12-24T11:49:53Z")

</div>

> [@Trying\_to\_learn](#):
>
> importing the flow it has grown to 2.4 meg.  
> (Basically doubled.)

Rename the new flow file so it won't be used, and replace it with the smaller one from your backup. Then restart node red.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [24 December 2021 11:53 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/7 "2021-12-24T11:53:16Z")

</div>

I don't think anyone is saying "too bad". Which language would you like/prefer ? We can only try to point you to manuals on htop and systemd if that is what you are asking about and there must be one out there that can help.

Not sure what/where you mentioned the security key - but the warning when you start up tells you which file to edit (settings.js) and what to edit (the credentialSecret property) - but it is just a warning and you don't have to set it - If you do you can then use those same credentials on another machine which makes moving flows easier - but if you don't you will need to re-enter them on a new machine.

I can't comment on why your flow file may have doubled in size unless for some reason you have imported it twice and there are two sets of flows running - but that should be obvious from the tabs at the top as they would be doubles as well. (unless hidden for some reason).

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [24 December 2021 19:25 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/8 "2021-12-24T19:25:19Z")

</div>

There needs to be a bit more than that done. I know this from a long time ago.  
On THIS machine I did just that and the _backup_ was deleted.

So the important bit is not only to rename the file but to put it else where.

But thanks.

That is also what I did.

When all this happened and I reflashed the SD card.

Installed NR, checked it was working.

Stopped it, copied the backup files to the directory.

Started NR got a few screens worth of complaints re: the _signature_ being the default, and that they didn't match. Don't know why/how that happened.

NR started and when I looked the file size had doubled.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [24 December 2021 19:42 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/9 "2021-12-24T19:42:51Z")

</div>

> Ok. I thought I had done that. (Moving on)  
> I copy the `flows.json` and `flows_cred.json` file from their backup.

> The `flows.json` has gone from `1.3 meg` to `2.2 meg` in size.

From [New version of NR, lost in `settings.js` file - #3 by Trying\_to\_learn](https://discourse.nodered.org/t/new-version-of-nr-lost-in-settings-js-file/55165/3)

> [@dceejay](#):
>
> If you do you can then use those same credentials on another machine which makes moving flows easier - but if you don't you will need to re-enter them on a new machine.

That's a tricky point.  
_Same machine_.  
Said machine _died_ and I rebuilt it.  
So it is going back onto the same machine, but a different build of NR (and O/S)

I tried doing what I understand is needed to be done, but it doesn't/didn't work.  
(That was a long time ago)

> [@dceejay](#):
>
> I can't comment on why your flow file may have doubled in size unless for some reason you have imported it twice and there are two sets of flows running

Well, I hope not. I stopped NR, put the new files in and started NR.  
Lots of scrolling as it started which was kind of normal but some of them were new.  
I didn't screen shot it.  
There couldn't be any hidden tabs as the NR version was too early.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [24 December 2021 19:50 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/10 "2021-12-24T19:50:28Z")

</div>

Why don't you delete the node-RED user directory, and re-import your backup again, taking more note of logs, warnings ect?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [24 December 2021 19:51 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/11 "2021-12-24T19:51:12Z")

</div>

shall do shortly.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [24 December 2021 20:17 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/12 "2021-12-24T20:17:35Z")

</div>

It might be informative to count the characters in your backup, flows.json after import and flows.json after a deploy.

The wc command wc flows.json reports the number of lines, words and characters in a file

```auto
ls -l flows.json
-rw-r--r-- 1 pi pi 288885 Dec 9 06:13 flows.json
wc flows.json
 11617 23635 288885 flows.json

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 December 2021 20:44 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/13 "2021-12-24T20:44:10Z")

</div>

A good point from @jbudd, if you now have pretty print enabled, and didn't have before, then I think the file may get a lot bigger when you first deploy it.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [24 December 2021 21:20 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/14 "2021-12-24T21:20:26Z")

</div>

Well, after a lot of messing around, the `flow.json` is _back_ to the 1.3 meg size.

For now I shall leave well enough alone. Between then and now there were a few changes to the flow/s and I have to do some catch up.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 February 2022 21:21 UTC](https://discourse.nodered.org/t/my-ongoing-confusion-after-updating-to-buster-and-cpu-load/55642/15 "2022-02-22T21:21:26Z")

</div>

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