Raspberry Pi - SD card selection!

I have been having trouble getting a stable Openhab2 platform on a raspberry pi 3b. I would get errors to do with the event logger taking more 5000mS and after 12-36 hours OpenHab 2.0 would crash. After playing around, the problem appears to the speed of the SD cards. This wasn’t an issue with Openhab 1.0, but Openhab 2.0 appears to be more sensitive to this.

I was using SanDisk Ultra 16GB microSDs, but have now moved to Samsung EVO + 32GB cards. Initially I noticed that the SanDisk Ultra 8GB gave less errors, so looked for a faster card. Based on http://www.geek.com/chips/a-geek-tests-12-micro-sd-cards-with-a-raspberry-pi-to-find-the-fastest-1641182/ I purchased two EVO+32GB cards.

Testing the speed of the cards (see http://elinux.org/RPi_SD_cards#SD_card_performance) gave average speeds (all in MB/s) of:

SanDisk Ultra 8 GB write 7.8, read 22.2
SanDisk Ultra 16GB write 9.7, read 18.1
Samsung Evo + 32GB write 14.8, read 21.3

It appears that the read speed is the critical value and while there isn’t much difference between them, there is no question that the card, rather than the setup is the key to the problems I was experiencing. (I tried using snapshot/Beta/online/offline/raspian-lite etc etc before looking at the SD cards)


I have been running openhab 1.0 for about 12 months. My system consists of a raspberry pi 3b running MQTT to connect to 12 Arduino Nodes around my house with roughly 100 I/O points.

My general setup for the raspberry pi includes Samba, mysql, rpi-clone, noip.

I also have the same project running well on an old laptop using Ubuntu 16.04.

I really like Raspberry Pis (I’ve got around a half a dozen at least) but they aren’t suited for every task. I started out trying OpenHAB on a Raspberry Pi (I don’t remember now if it was a 2 or 3) and I was very unhappy with the performance. Even some of the slowest SATA HDDs are going to blow the Raspberry Pi’s I/O out of the water. I moved my OpenHAB installation to an old desktop PC running Linux and have been more than satisfied with the performance.

Raspberry Pis should be reserved for those applications where their unique attributes are essential (small size, low power usage, GPIO etc).

Hi Jeffrey

I have now have openhab 2 running well on two raspberry pi(s) and my old laptop. One of the RPIs is running more rules than the other two machines as it handles regular outputs (such as updating time in remote nodes) while the other two machines are only ‘listening’. My old laptop has 4GB RAM, a 480 GB SSD and a AMD A8-3550MX Quad core processor.

When using Openhab2, it is difficult to see any difference in the response time between the RPIs and the laptop e.g. both render charts in less than a second. Chart below shows the CPU load on the “busy” RPI.

YMMD :slight_smile:

I never claimed that you couldn’t make it work on a Raspberry Pi - obviously you can as you and many others have demonstrated. For me though, it wasn’t worth trying to fight the Raspberry Pi’s performance limitations when for about the same cost as a Raspberry Pi 3, a power supply, and a quality SD card I can run down to the used computer store and pick up an old desktop PC that’s going to blow the Raspberry Pi out of the water in terms of performance.

And as I said, perhaps the benefits of using a Raspberry Pi outweigh the downsides. I can think of a number of scenarios:

  1. For someone that can’t keep an always-on PC around to run OpenHAB, perhaps due to space limitations or noise, the Raspberry Pi might be a good fit.
  2. Using hardware that is specialized to the Raspberry Pi, like the Razberry or something custom designed that hooks up to the GPIO pins.
  3. For someone running off-grid, the power consumption of a desktop PC might be problematic.
  4. Just for the sheer challenge of it.

If you’re going to go with the Raspberry Pi, I’d definitely recommend getting a quality SD card. I’ve heard good things about the Samsung EVO+ line. I have one here on my desk but haven’t had the time to put an image on it and try it out. I’d also recommend getting a quality power supply. Raspberry Pis are very sensitive to voltage dropping below a certain level, which can cause all sorts of problems (SD card corruption is among them). I personally really like the CanaKit power supplies (https://smile.amazon.com/dp/B00MARDJZ4). But even the CanaKit ones aren’t strong enough if you have power-hungry USB devices attached or are powering things through the GPIO.

You can check to see if you’re having problems by running the command “vcgencmd get_throttled”. See this forum post to interpret the results:


If you run OH(2) on a RPi, go for a SSD disk; sooner or later the persistence klls your SD card by writing to the same places over and over again. I got a mSATA disk with 32GB and an external USB exclosure for approx. € 30.-

1 Like

Thanks - very useful info