Raspberry Pi 4 released

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.

FWIW To throw my oar in, 1GB on a R-Pi just isn’t enough memory. Yes the JVM might be limited to 350MB, but that’s not actually how much RAM gets used.

The debate should be over whether 2GB or 4GB is the sweet spot. If you’re running stock, then 2GB is probably fine. But if you’re offloading tmp and cache to a tmpfs (i.e. ramdisk - which means your SD card will actually last longer) then 4GB becomes your sweet spot. e.g.



RAM isn’t just used for your Java heap…


If you’re talking about RPi4 only then you can restrict it and the answer is rather simple: pay $10 for one GB or just $5 ?.

Hopefully you’re referring to ZRAM not tmpfs.
And zram won’t need as much RAM for the same purpose and I’d say you’re back to 2GB for the sweet spot.

Either way, the true discussion is not on which RPi4 model to buy but if to buy at all or stay with your RPi2/3 w/ 1GB. Which would be an even sweeter spot :wink: albeit not compatible with the thread title.

For one, your JVM RAM usage is awfully high, way above average. You should get well below 1GB unless you run really exotic stuff or stuff to have mem leaks.
[ although that’s something we should have another closer look at - I have a strong feeling that the changes in 2.5M2(?) make up for a serious increase in RAM demand. My own brutto RAM demand has always (up to and incl. 2.5M1) stagnated at ~700MB now it jumped to >900M
For two, the relevant column is the “RES” column which is what you’re effectively keeping in RAM. So there’s well headroom to even run zram and do it all on a 1GB machine.

No, I mean a real tmpfs. The two directories I quote are normally empty at start. There’s nothing to save off afterwards and you don’t have to worry about trashing your filesystem or your config because you powered the R-Pi off or typed reboot accidentally. Those two issues alone are enough for me to say don’t run ZRAM ever.
ZRAM would probably have an advantage with the OH internal databases. They annoy me. But not enough to take the ZRAM disadvantages.

Maybe. But I’ve already discounted the 1GB as simply not being enough. Yes it starts. Yes the JVM does run. But add in mysql for persistence (a shade over 200MB on mine), and even without the tmpfs’es you’re going to struggle (In fact mine did. And a burnt our SD is a PITA. So are the endless 500 errors you get because jersey isn’t ready for you).

Like I said previously… The JVM isn’t the only thing in RAM. You don’t want to push your buffer cache too low, or you’ll just be bound on SD IO anyway. More RAM means less physical IO (Reading or writing). And on mine it’s a shade under 2GB free, so I’d argue it’s better to go 4GB than 2GB (And the price isn’t worth worrying about anyway unless you’re planning on deploying thousands of these things)

Yeah my JVM residency is high. Is there a leak? Probably, it is Java after all. If I was concerned enough I’d drag out a copy of eclipse and start to look. Would I find the time to do that? Probably not.

I’d probably also argue that if memory or performance were a real concern you wouldn’t write OH in Java… (ducks).

Those extras above the JVM size (mysql, tmpfs, buffer cache) are what push you above the 1GB mark. I’d argue that they’re not a nice to have but a necessity.

In fact now I probably have room to push the mosquitto server onto the same host rather than having to have a separate system for it.

Would I argue for 2GB? Not for my workload… Which I consider quite light.


That’s some misunderstanding. No it doesn’t trash the filesystem, on reboot/power loss you only fall back to an earlier but consistent i.e. working filesystem state.
A little funny how touchy (correct term? I’m no native speaker) people react on this reboot thingy.
In fact it could have happened in the past as well that a ‘reboot’ could have killed consistency of one of your databases.
It ain’t apples and apples to compare tmpfs’ing those 2 dirs to zram’ing other dirs that also are heavily written to such as /var/log. Because that also means way more writes on your system and thus a higher risk of getting hit by SD wearout.
You can change zram config to only apply to exactly those two dirs, then you get 100% the same risk as with tmpfs but better performance/less RAM usage w/ zram because it compresses memory.
And if you cease using ‘reboot’ it even keeps the data across box restarts so e.g. your next OH startup will be faster because Karaf cache is available after reboot.

On RAM, I wouldn’t choose anything other than a 4 GB RPi if I was to buy a new system. The more the better, even more so if a setup already is as large as yours.
But the average thread reader’s OH setup is small enough to fit into and already is running on a 1GB system and now he’s wondering if it’s worth upgrading.

Must be the language used in the ZRAM description…

Sounds pretty scary… And that’s from today according to the timestamp on the posting…


Yeah sounds I’m not doing myself a favor to convince people use it :slight_smile: I just wanted to make clear there’s a risk because it’s new and as such not unlikely to contain bugs. I’ll reword that a little I guess.
Funny though that actually this statement does not speak of zram and all by itself has been true for many many years, well before zram was invented. Remember back times when Unices didn’t have journalling filesystems and databases weren’t transactionally safe? Too long ago I guess so people started forgetting and now type ‘reboot’ because it’s a little quicker to type than the alternatives.

I’ve been a unix engineer for 30 years now (So yeah, I remember the days - although a lot of it was AIX which has almost always had a proper filesystem)…

What (real) database were you using that wasn’t transactionally safe? sleepycat doesn’t count…

Admittedly most of my experience is not with debian… Why exactly isn’t reboot working correctly to shutdown zram properly? (I notice that if you actually look at the debian 10 (Buster) docs it says to use systemctl reboot and not shutdown or reboot…

On some systems reboot and shutdown are synonyms… I wouldn’t have thought reboot on debian was bypassing the shutdown scripts…

Oh it does as it’s still in use, even in my company. I also recall Sybase having big problems at times, then there were early versions of mysql and probably more I’ve forgotten about since.
Anyway, we’re getting off-topic, you got me … that’s what at least a moderator himself shouldn’t do :wink:

Neither have I until recently. I’m even still not 100% sure it does and what versions it applies to. But there have been reports during testing so stating this upfront means to take the safe route.
And remind you openHABian actually is in operation on various Raspbian versions and “real” server HW (SSD or HDD, lots of RAM) where this problem might exist, too, but (eventually) does not show up.

After I installed the USB3 host adapter firmware update, the temperature of my Pi 4 has gone down significantly.


Definitely recommended.

I’ll give this a go and see. :slight_smile:

Hello everybody,

i changed my Pi3b for a Pi4 with Geekworm X825 and Case today and it works like a charm.

I just have:

  • backup my system
  • install a fresh system on the Pi4, with same passwords
  • copy root to USB / SDD
  • restore backup for openhab, influxDB and grafana

I only have a problem with the Aeotec Z-Wave Stick, but I can regulate it with a 2.0 HUB tomorrow.

A good decision

Do all the plugins work as intended?

Are u booting from sad?

Yes, only the aeotec z-stick gen5 has a problem (known) that it is recognized as a USB 3.0 device. However, only USB 2.0 is supported by the stick. By a USB2.0 HUB you can regulate the topic but

I use a Geekworm X825 to integrate the SSD, but the micro SD card is still needed for the boot process,

Just out of curiosity, do you notice performance improvemends ? If so in what ways ?

No one really tells if there is a ‘big’ difference between the rpi3 and rpi4.


Any Pi 2 or later provides way sufficient performance to run OH, so no, you could measure but you do hardly notice any improvements, and if so they’re not of relevance. Sufficient is sufficient.

It feels faster, so the pi4 feels faster when you swap pages in the Paper Ui or Habpanel.

According to grafana, the CPU has less to do.

I agree with this.
Yes, the 3 was sufficient but this just seems better. :slight_smile:

Sorry to jump in as moderator, but this is another useless XY problem question that we dislike to see here: why do you want to know?
Either you have no HW so far then it’s easy: go buy a 4. Or you have some older HW then it’s easy, too: stay with it.