Raspberry Pi 4 released

There is no real benefit from that - sorry :slight_smile:
The about only thing that comes to mind is to Get latest openHABian and enable the new zram feature, it “moves” directories into RAM, avoiding writes to SD card. This isn’t done for all but the most write-intensive dirs, but you can enable it for more directories (edit /etc/ztab) to make use your memory.

That’s wasted.
openHABian default is 350m which is enough for about any install I’ve seen to date.

Open a new thread please and delete this post. Thanks.

Awesome, I didn’t realize this is available yet. Thanks for your efforts, @mstormi!

I’m experimenting, you will however be able to create more objects, might even affect the behavior of garbage collect, the RAM is there so no not costing anything to test things out.
In terms of recommendations you are right of course.

“640 Kb ought to be enough for anyone” :slight_smile:

I’ve done a full switch from my odroid C2 to the RPi 4. So far it looks good, OH seems to start faster, probably due to the SSD being on usb3. I had no problems getting my Razberry daughter card to work with the rpi 4 (using openhabian-config tool to set the correct jvm parameters for serial console).

The openhab-cli with backup and restore is extremely useful for fast and successful migrations.

Regards S

How to use / enable the zram feature? Which version is needed (2.5M1)?

Some great news for all openhabian users in this tread. We have a new version, openHABian 1.5 which supports RPi 4. :rocket: Have a look: https://github.com/openhab/openhabian/releases/tag/v1.5

openHABian maintainers


This is a feature of openHABian, not openHAB. The version of openHAB does not matter.

And a big thank you to all of the openHABian maintainers! I’m mostly looking forward to zram, but I didn’t think Pi4 support would be this quick.

I am running openhab 2.5.0.M2 as a docker container on a rock64 and see the following output of my top:


Indicating 25% of my 4GB memory.

The settings are:

EXTRA_JAVA_OPTS=-Duser.timezone=Europe/Berlin -Xms400m -Xmx650m

Was running before 2.4.0 in a container on RPI3 and had from time to time (week, two) a freeze of the system with the same settings.
Looking forward how it makes it on the rock64, but it looks like it takes more memory as expected. The system and my rules are huge.

That’s the thing. It would take less than 1G total and maybe 500M resident if you omitted docker.

Which is 1G which is the RPi3’s total memory.

That’s really not a suitable application for Docker, it just makes things a lot worse.

to be specific, it’s not docker suitable application on RPI.
Docker OH is very ok to run on machines which are meant to be as servers

I might agree that RPI3 is not optimal running OH on docker. I exprimented with docker cluster, hoping getting some fault tolerance and failover. I was getting mixed results with cluster. Stepped back for production running a bare docker container on RPI3 and the utilities like ebusd, mqtt, influxdb, garfana, openvpn, landroid, glusterfs … in the cluster. This worked perfect until the cluster and glusterfs burned my rather small sd cards (16GB), almost all 6 at all. Now moved to ssd 120GB. And finally moved the OH production to rock64 with 4GB.
Waiting RPI4 to revieve the cluster for all again.

And btw I love docker, the best what happened to me in the last few years (IT related)

1 Like

Seems you got some spare time … well. Consider using zram for your cluster, you can install openHABian on top of Raspbian and selectively install zram from the menu if you don’t want the full openHABian setup.

Has anyone tried an in-place update to Buster on an existing Pi 3 OpenHABian image and had it work on a Pi 4?

My OH server is running on an mSATA and its not as simple of a test as cloning an SD card and seeing what happens. From-scratch would burn a lot of time, but reading through this thread, I can’t tell if anyone has done an upgrade, or just a from-scratch install.

I’ve done the in place upgrade on my five RPis (none of them are RPi4s). Three of the five worked great. Two of the five failed and I had to rebuild them from scratch, which wasn’t really that big of a deal. I’d definitely make sure you have a good and proven backup before proceeding.

I can’t speak to whether an in place upgrade on an RPi <4 will work with an RPi4, but I would be surprised if it didn’t.

Raspberrypi.org recommends a fresh install for both rpi 3 and 4. It’s not that much effort imo, so play it safe :sunglasses:

Regards s

Probably that Rock64 runs a 64-bit OS which consumes more memory because the memory address space in instructions is bigger. I happily run openHAB with Docker on a RPi3 (32-bit) and it only consumes 22% memory according to top.

It also looks like openHABian always uses -Xmx350m regardless of the architecture?

yes Xms and Xmx are static values I created an issue/ note to myself to adjust that in openHABian

After having struggled through it once on a RPI2->RPI3, I just rebuild now. It’s not worth the struggle to me.

If you really want to do it, I’d suggest: Make a backup! Then try your in-place upgrade on the 3 and make sure it still works. Then try putting it in the 4. It won’t boot; you’ll have to update the boot partition to have the right files and data. Hopefully the Internet can tell you what needs to be updated, but you should be able to take the files off a Pi image for the 4 and update the config for your old kernel.

It’s not impossible, just fiddly and poorly documented.