RasPi Zero (W) help

Recently I got stung and updated my RasPi Z (W) to Buster.
Originally (status quo) it was running at 20-30% CPU load. Fairly heavy memory usage. 80%.

Buster - all things being equal - 90-100% CPU load ALL THE TIME!

I was told that Buster eats memory. (Dunno)

So there has recently been a RasPi Z version 2 released.
From what I have seen there is no difference.

I would like to get a machine with more memory to I hope get around this problem of 100% CPU load.

I’d prefer to not go to a full sized pie.

Suggestions?
Or ideas for determining what is making the CPU load so high.
Using HTOP the tasks are kernel tasks.
(There wasn’t that many kernel tasks on the previous one.)

2 Likes

Hi Andrew,

Hmmm, what were you running before? Jessie?

Those original zeros are a bit slow, mostly due to the single core, this is fixed on the Zero 2, but memory capacity is the same.

Could you post a htop screenshot?

Are you running a desktop environment? Do you need to? What are you using your Pi for?

Keen to get to the bottom of this one!
-James

1 Like

Before I was running what ever it was TWO before Buster.

Sorry I don’t know the names that well.

HTOP screen shot.

Ok, I should just do it and see the difference.

I have the GPU memory set to 64 - it was 128.
I think there is a 256 option.
And of course there is a 32.

Maybe I could try those and see what happens.
I am running VNC as I am not that good with typing long path names in Ubuntu style O/S.
VNC makes doing some things just that much easier.

2 Likes

Hi Andrew,

I’d say it’s the VNC that’s doing it. I’ve run into people here trying to VNC on a Zero, and having the same troubles that you are. They’ll probably pipe up to affirm.

Interested to see if running just SSH instead of VNC works better for you… At least to see how much better that makes it

-James

1 Like

Well, as much as I would like to agree, I went in and raspi-config and disabled it.

Rebooted AFAIK and no change.

I’ll have to try again at some stage to be 100% sure.

But on the previous one: it had the VNC running quite happily with only about 305 CPU load and very few kernel tasks.

Yeah, ok. I get it. This is a big step up and a lot of things under the hood have changed.

Just asking: Does the new(er) version of the Zero (version 2) have any more memory?
I’m getting conflicting stories on the new release.
I can’t see why they would release the RPZ2 if it doesn’t have more memory.

2 Likes

Hi Andrew,

The Pi Zero W and Pi Zero 2 W have the same amount of RAM (512MB).
The major upgrade on the Pi Zero 2 W is the CPU, both are clocked around 1GHz but the Zero 2 W has a newer quad-core CPU which is much better suited to multitasking over a single-core CPU.

I tried VNC viewer on my Pi Zero W myself because I didn’t want to have to hunt around for a mini-HDMI cable and it was painfully slow just navigating the desktop so I’d be very surprised if VNC was working well for you while you also had NodeRED running on the machine. Lowering the resolution of the screen helped, but not enough to make it worth using VNC to access the Zero and do anything.

Looking at your HTOP screenshot it doesn’t look like you have run out of memory and the CPU is being used up by swap actions (using the storage as RAM when you run out) so it seems you’re just hitting the processors limit and more RAM may not make a difference anyway.

1 Like

Thanks Trent.

I shall have to re-do my test then.

I’ll disable it with the command and make sure I reboot it too.

(Appreciated you checking it for me.)

2 Likes

Hi Andrew,

I’d be interested to hear your results as I only have my own experience to go off using VNC which wasn’t fantastic. After all, that’s what the forum is for sharing the knowledge so we can figure out why something isn’t working!

1 Like

Well, sorry.

Bad news.

I ssh into it, sudo raspi-config and disabled the VNC.
To be sure I rebooted.

Waited… Waited.
Machine back up.

100% CPU load - high level of kernel tasks.

(Yes it is still booting to the GUI) That is something to do with auto mounting the USB stick.
If it boots to CLI the USB stick isn’t mounted.
I know: I have learn about fstab.

But!

Disabling the VNC doesn’t seem to fix the problem.

Just to share.

Oh, the red part did nearly disappear but it crept back fairly quickly.

Thoughts on the GPU memory allocation?
Just now it is set to 64.
Which way would/could help?

I don’t mind trying, but if I can reduce the number of times it would be better. :wink:

1 Like

Ok, changed GPU from 64 yo 128.

VNC DISABLED.

Rebooted.

100% CPU load.

Maybe it is just Buster is memory hungry and isn’t suited to work nicely with 512 MB ram.

1 Like

Hi Andrew,

I can see from your screenshots that your memory usage isn’t full, but I can see that you have swapped recently, so you did run out of memory briefly (likely on startup). Swapping will load up your CPU more, but just coming close to your memory limit really shouldn’t.

As for things to trim, I’d say the desktop environment would be the first to go, You can use programs like WinSCP to mess around with your file system or move files over to the Pi if that’s what you’re missing:

Or perhaps set up a samba share so your PC can see it as a drive, and your Pi can still access it:

There are guides on automounting, I believe it’s also covered in the guide above too

Anything else that you can’t live without from the GUI?
What’s your Pi currently being used for?

We’ll do some testing on our end to determine if your usage stats are normal, but in the meantime, let us know your thoughts on the above
-James

1 Like

Again,

Thanks.

Ok, the John Dory.

When I changed the GPU memory size, it would seem the SWAP became activated.
I have read that this isn’t too bad, but it does kill the SD card as they aren’t designed to do that.
And I’ve lost 3 SD cards in the past and they had SWAP files active.
Though the problem could be power supply. Anyway.

the CPU load stays way up there for days. On the previous O/S it was 30%. So that’s 70% (now) that is an unaccountable load.

I’ll have to investigate WinSCP. (I use Ubuntu, but anyway…)

I have nfs installed (though yeah, that is more a windows thing) that was done a long time ago when I used a windows machine.

Is there much benefit to SAMBA over NFS?

The copying.
That is making backups of Node-Red.
Logs, etc.

Not a server as such.
But there are some … quirks.
I can back up to anywhere I want, but there are permission problems so I backup to the !/Public/...... so I can easily mount from my main machine and get copies.

But after being stung with the SD cards failing, I log to the USB stick.
I also copy the backups to the USB stick.

So I need to access the USB stick as well.
Alas that is NTFS format.
Reformatting them can be problematic if I want to read them on another machine.

Anyway…

Just now I am deep down a Node-Red rabbit hole.
(Feature creep has set in sort of and there is a lot of redesign/rewriting of a lot of code and it is painful not having much background in how to do it properly).

1 Like

Hi Andrew,

Ah, your workstation OS changes things a bunch,

I take back what I suggested for samba and WinSCP, NFS should work fine there.

I myself am a recovering Windows user, My next machine will run linux, but unfortunately there isn’t too much in the way of good CAD software, so I may have to resort to WINE or similar :frowning:

-James

P.S. the linux equivalent of WinSCP is just sftp, but since you’ve got a gui, mounting an NFS share you can see in /mnt/ in your file manager seems like the way to go

1 Like

I was a Windoze user (XP) was all I needed.

But the virus threat became problematic and… one thing and another.
I had an old RasPi (2A - with yellow composite RCA jack) sitting around.
But no monitor.

Oh, and one day the HD of that machine died. Catastrophically!
I used my laptop for a while, but it was painful.

One day when out walking I found a discarded monitor.
With HDMI!

So I started to play with the RasPi.
I was hooked.

I now have… 10+.

This as not helped because one day I saw something with Node-Red (well, I think it was. I wasn’t sure what Node-Red was at the time, but it just GRABBED me)
I was doubly hooked.

Now I am trying to learn JavaScript.

No problems with the suggestions.
I sometimes miss things.

I do have a windoze 10 machine, but that is for other things.

Just keeping one file system as much as possible is better when playing USB swappies.
Though I have a network… anyway.

CAD software is kind of why I have the W10 machine. I use Fusion - autodesk.
You can get yearly free subs to it. I’ve been ok now for about 3 years I think.

Oh, thanks for the name sftp. But it will have to go on the stack of things happening.
Just now - alas - the stack is quite big.

There is this paradox about how I am doing things. LILO sort of thing.
I try to get things done - to a point -before starting the next journey.

And a lot of this is a journey for me. I know SFA about a lot of what I am doing.
I just knuckle down and go at it.

Anyway, sorry. Gotta go.
More programs to write.

2 Likes

Well, update:

Only because it (the Pi) was doing things I needed to get it working.

With a bit of reluctance, I powered it down. It got to the stage where the machine wouldn’t last a day before locking up. Not really usable.

I took out the SD card and stuck it in a RasPi 3B.

Wow! Boots, runs fantastic!

Seems the RasPiZ(W) has been deprecated if using Buster for most things.

Now I just need to get another RasPi3B.

1 Like

WinSCP is so useful!

2 Likes

Hi Peter,

Glad you think so!! It really came in handy when I was messing around with Klipper on a Pi and having to move config files back and forth.

Another option if you need more frequent access is a samba share running on the Pi mounted as a network drive, although WinSCP already makes it so easy.

-James

1 Like