Memory usage with Openhabian OH4, Raspberry Pi 3 Model B

  • Platform information:
    • Hardware: Raspberry Pi 3 Model B Rev 1.2
    • OS: Debian GNU/Linux 11 (bullseye)
    • Java Runtime Environment: JDK 17 (64-bit)
    • openHAB version: openHAB 4.0.3

Since upgrading from OH3.x (including upgrade of OS), OH is very slow. It appears as though the issue is because of OS swapping, which is probably caused by increased memory usage with JDK 17, which is 64-bit (JDK 17 doesn’t seem to support 32-bit any more).

  • Is it correct that there is no 32-bit version of Java which will support OH4?
  • Is there a way to efficiently run OH 4.x on R-Pi 3 or do I have to upgrade the hardware?

No, 32 Bit is still available

In question of Java, this is a Multi-arch packet, so it will chose the correct version depending on the underlying OS.

Thanks for the info @Udo_Hartmann. I chose the upgrade approach instead of the new installation approach. Could you perhaps point me to information on where I can get Java 17 32-bit from (and perhaps the best way to install it)?

…or since I have bullseye 64-bit, can I only run 64 bit java?

your best option is to save all your data

  • sudo openhab-cli backup -full , then copy the resulting zip file to e.g. a network share
  • save all additional data from yous system (maybe mosquitto configuration, InfluxDB Data, grafana.ini and so on)

Get a new Micro-SD card and download the 32-Bit Version of openHABian Image to the card.
save the zip file to the first partition and name it to initial.zip
Pass the card to the Raspberry Pi and let do openHABian its magic.
Install additional software as needed, afterwards copy old data and configuration to the new card.

Please be aware that the 64 Bit OS does need much more RAM as the 32 Bit version (which is the whole point of using the 32 Bit version), it’s not only Java…

Alternatively, buy a brand new Pi5 or a older Pi4 with 8 GByte of RAM and use the 64 Bit Version, but you will have to setup a new Micro SD card for the new hardware as well :wink:

1 Like

@Udo_Hartmann, thanks for your message. I decided to install the 32-bit version on my R-Pi 3 and now everything is working as it did before. Thanks for your help :slight_smile: