How to choose a next hardware platform?

Hi,
I have been using openHAB (more exectly openHABian) for 4 years and so far there have been no major problems. Since last week.
I’ve lost communication with Xiaomi Gateway during night hours. I’ve made investigation and found that openHAB was restarted and probalb reason is following:

Apr 11 06:40:11 openHABianPi kernel: [2871400.353016] [11750]     0 11750      623       19       4       0        0             0 sed
Apr 11 06:40:11 openHABianPi kernel: [2871400.353025] Out of memory: Kill process 637 (java) score 518 or sacrifice child
Apr 11 06:40:11 openHABianPi kernel: [2871400.353560] Killed process 637 (java) total-vm:744068kB, anon-rss:500340kB, file-rss:0kB
Apr 11 06:40:11 openHABianPi systemd[1]: openhab2.service: main process exited, code=killed, status=9/KILL
Apr 11 06:40:12 openHABianPi influxd[22439]: [I] 2020-04-11T04:40:12Z retention policy shard deletion check commencing service=retention
Apr 11 06:40:13 openHABianPi CRON[11785]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)

As I understand I have not enough memory for openhabian (and for grafana/influxdb/mosquito) and hardware upgrade is necessery. Currently I have Rpi 2 with 1GB memory. Because I use z-wave hat and custome made MCP23017 my next hardware must be at least compatible with Rpi connectrors.

Ok but what to choice ? Trusted Rpi 4 with 2 or 4 GB or maybe other clone with emmc
if yes which one?

Regards
Michał Szymański

Ok, maybe one more question. IIf I upgrade to new hardware, does it require a reinstallation of the system or is it enough to move the card and that is all?

That depends on the OS you run. If you for example choose RPI 4 (with more RAM like 2 or 4 GB) you will need Raspbian Buster. If you have Raspbian Buster now, you can swap the SD card, and everything will work there. If not, you will need to upgrade to Buster or reinstall from scratch…

1 Like

That was essentially the mem guard of Raspbian to kill java/OH because you have not enough VIRTUAL memory. You can increase that by manually adding swap if you know how to do that.

Swapping however puts the SD card’s integrity at an even larger risk as already does running logging and persistence data.
Did you enable ZRAM ?

But as you say your install is 4yrs old, I would recommend you backup your OH config and install the openHABian RPi image (to a new SD card), activate ZRAM via menu, then restore your OH config. That image is already buster based.

RPi4/4GB. But ZRAM should do to keep your Pi2 (unless it’s too slow as Grafana is a memory hog).

3 Likes

People seems to have a lot of troubles with this Raspberries even allegedly it has super powers and can handle everything :wink: For OpenHab, I use Nanopi K1+ with 8GB eMMC:

Welcome to Armbian Bionic with Linux 5.4.7-sunxi64

System load:   0.15 0.18 0.18  	Up time:       93 days		
Memory usage:  28 % of 1993MB 	IP:           *.*.*.*
CPU temp:      33°C           	
Usage of /:    28% of 7.1G 

It runs Z-wave network with a bunch of rules and scripts. On a side I also control main UPS and measure temperature via 1W in the “server room”, where this computer is located. Its in operation for one year now - without a single crash. Half a year or so, I move to OpenHab 2.5 and only there - upper software level - I had issues, but I fixed them. It does the job.

  • 2Gb of memory is just right, perhaps a bit of overkill.
  • 8Gb eMMC (they don’t sell smaller)
  • speed is between RPi3 and 4 (again overkill)
  • absolutely no overheating (CPU runs with 33-35°C in a closed closet together with router, server and switch)
  • superior OS which you don’t need to fiddle around and fix, before starting with OpenHab.

If you’re basing this on people coming to the forum and asking for help, it could certainly feel like the OH/RPi combo is troublesome. However, it should be balanced against all of the people who never say anything because their RPis work without issues. There’s an understandably vocal minority influencing our thoughts and opinions.

I don’t want to downplay that some people have issues getting OH to run on an RPi (which is absolutely annoying when you’re one of them); I just don’t think it’s necessary to put a negative generalization on it. :slight_smile:

All that being said, the NanoPi K1+ sounds like an interesting platform (I wasn’t aware of it). What’s the advantage of the eMMC module, though? It seems to me that eMMC would be slower than SD, and also harder to clone/replace when the module fails.

Buying cheapest hardware which “handle everything but nothing really good” and knowing nothing about Linux probably contribute. This a good thing if you sell support by hours :slight_smile:

Well. It’s not the best I know for this job but it was available at that time. It still have one downside - mUSB powering, which is the same sh* as on Rpi. But you can at least power it via 4 pin header on a side of the board.

Its an old device (from Rpi3 era), but it has true gigabit, crypto acceleration, dedicated USB ports, eMMC (up to 64Gb) … Here you can see its performance in certain areas compared to the others, included Rpi’s.

eMMC are better than SD cards in just about every parameter. They are just rarely present on a cheap consumer devices.

They are closer to the SSDs but they are still just a flash media. Just not as crap as SD while the are connected to the system the same way as SD card. They are faster and (much) more reliable. I was too lazy, so I will just paste this few years old reality, where most of the Rpi users still live especially if they use Rpi3 or below:

Current 2020 SD cards are ofc faster and more reliable, difference is perhaps smaller, but still exists. I am buying almost exclusively best SD cards but they still continue to die in the virtul unchanged pattern. (I do nasty things to them. I use them over and over again - for various testings).

Do you mean that I know nothing about Linux (which is true), or that you don’t? :wink:

It is nice that the RPi4 moved to USB-C (and fixed the ports on their most recent board revision so that you don’t have to use an official RPi AC adapter). I don’t worry too much about microUSB for devices that stay plugged in, but at this point every manufacturer needs to move toward the USB-C future.

Thanks for the info on eMMC (I was confusing it with the MMC tech that preceded SD). I mostly think of it in relation to cheap Windows and Chrome OS laptops.

I am not judging you. Generally speaking. Apologise if it was understood that that way.

They fixed a nasty bug for a few % of users, but powering scheme remains broken for most and fragile for all. Sadly things like powering, quickly hits the limits of fixing it with a software.

You only have a dump USB-C connector. For USB-c powering on Rpi you need to wait few years, but until then most of anyway thinks they have it … Powering PD USB-C way is very rare in single board computers. Professional devices anyway have 12V connector and doesn’t need this so urgent, but they are more expensive and can have that … while in the cheap price range it was so far seen only on Radxa RockPi 4.

1 Like

No worries, I was just making a joke. Should have used a better emoji. :rofl:

1 Like

Yes 1 gb is not enough, 2gb is the bare minimum so I recommend more than 2 for people that want influx, grafana and cheap IP cameras etc…

I don’t believe in overkill, only a lack of imagination on what to use the extra abilities for and lack of planning for the future.

For the lowest issues I would recommend x86 based systems not ARM and running Ubuntu where if you ever need help there will be plenty of posts and guides to solve for any Linux issue you will come across. Cost of hardware and ongoing power costs are why I don’t do this currently but if you run multiple things on a big server in docker containers the costs can make this option win.

I prefer to use low powered ARM devices so if something fails it only takes down a minimum of devices in my home. Media server, DVR server, NAS, firewall, all are separate hardware so I don’t loose everything in one hit. I also prefer to keep a spare hardware sitting on the shelf to swap out at any time. Often a hardware backup is missing to quickly solve a faulty piece of hardware. So to use the backup hardware devices I like to run Kodi on them on TVs around the house so having good kodi support is important and the PI4 has issues in many of the kodi projects.

Have a look at the Odroid C4 they have comparisons to the PI4 on their site if ARM is what you prefer. Kodi devs are already recommending it as being an excellent choice.