Raspberry Pi: Before I Pull the Trigger?

Great info, everyone! Are there any recommendations on which OS is must suitable, or the pros and cons of your OS?

I have a huge openHAB environment running on a Raspi PI 2 as well. No performance issue here at all.
There is just one thing that should be considered when it comes to devices with limit memory (1GB in case of the Pi2) and the usage of a Java application like openHAB… Garbage collection.

It seems the Java runtime normally gives each running java process a limit of maximum memory used and a much lower threshold on how small it can/should become in the memory. This means every information allocated in the memory will sooner or later be removed (to freeup space for new information).
In our use case, openHAB is the only Java process running and the most information allocated in memory should not been dropped because it will be reused sooner or later.

I ended up with the following two parameters in the start.sh to set both, the minimum and the maximum memory limit to 650MB…
-Xms650m
-Xmx650m

This is making a real difference. i have a quit complex voice rule to control nearly everything by natural spoken commands. Without those parameters, the first command could take up to 20 seconds until it was processed (far from any acceptable delay). The second command was very fast. Often less than a second.
But after some time (a hour or something) it took 20 second once again… I guess because the garbage collector did get rid of some stuff.

After adding the two parameters. It is all the time fast, except the very first time after starting openHAB (what just happens every few weeks when I do some maintenance) .

Regard
Lars

2 Likes

There have been some people who have reported problems upgrading their RasPis from wheezy to jessie. But if you are starting from scratch I would think that going with jessie from the start shouldn’t be a problem. Just realize that one of the changes in jessie is a move to systemd which means how one configures and controls startup services will be different from the majority of the tutorials you will find out there.

[quote=“rlkoshak, post:18, topic:4781, full:true”]
There have been some people who have reported problems upgrading their RasPis from wheezy to jessie.[/quote]

I can confirm that. Caused a bunch of problems in my case …

[quote=“rlkoshak, post:18, topic:4781, full:true”]
But if you are starting from scratch I would think that going with jessie from the start shouldn’t be a problem.[/quote]

I can confirm that too. No problems when starting from scratch, Jessie and OH 1.7.1 are running stable.

I have a quiet big setup as well:

Some info

  • around 220 items
  • KM200 heater logger as python script
  • weather station connected through serial reader
  • Harmony binding
  • fritzbox script for door bell -> DECT phone ringing
  • some simple voice commands
  • PC alive checks
  • some rather complex scripts (but optimized) based on jsr223 jython
  • local InfluxDB + grafana setup as my persistence database
  • raspberry pi is further used as:
    • wireless switch unit transmitter (433MHZ based)
    • IR transmitter for AV receiver

##System image:

  • very old microsd with 2GB space as “bootloader” sd card
  • runs from 16GB USB-stick
  • debian stretch armhf straight from debian.org (no raspbian):
  • kernel from archive.raspberrypi.org
  • BTRFS root with weekly snapshots
# free -m
              total        used        free      shared  buff/cache   available
Mem:            925         291         100          57         533         554
Swap:             0           0           0

# uptime
 18:55:40 up 50 days, 22:01,  2 users,  load average: 0,01, 0,11, 0,14

So the raspberry pi is not really busy with this setup, it is actually quiet bored :wink:

Side note

One Micro-SD card wear out lately, which resulted in a read only microsd - data could be read but nothing written on it. This was replaced by the MicroSD + USB-stick setup. The MicroSD card was formatted with ext4.

Any instructions for this kind of setup somewhat?

1 Like

Here is one:

1 Like

Consider the fact that the Apollo 11 guidance computer has 64Kb of RAM and a clock speed of 0.043Mhz…I think the Pi 2 can monitor a few sensors without too much trouble. :wink:

http://www.computerweekly.com/feature/Apollo-11-The-computers-that-put-man-on-the-moon

I run OpenHAB on a Pi 2 and have been VERY happy. Worked great on my original Pi as well. Pull the trigger!

If you are looking for:

# cat /etc/apt/sources.list
deb http://httpredir.debian.org/debian stretch main contrib non-free
deb http://archive.raspberrypi.org/debian jessie main

# cat /etc/apt/preferences.d/raspberrypi 
Package: *
Pin: origin archive.raspberrypi.org
Pin-Priority: 1

Package: raspberrypi-bootloader
Pin: origin archive.raspberrypi.org
Pin-Priority: 1000

Package: libraspberrypi0
Pin: origin archive.raspberrypi.org
Pin-Priority: 1000

Package: libraspberrypi-bin
Pin: origin archive.raspberrypi.org
Pin-Priority: 1000

you will need from archive.raspberrypi.org the following packages:

libraspberrypi-bin
libraspberrypi0
raspberrypi-bootloader
  • BTRFS (and/or USB-Stick):

instead of formatting the SD-card/USB-stick with ext4 you use btrfs and add a subvolume @ as root subvolume

# cat /boot/cmdline.txt 
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/sda1 rootflags=subvol=@,commit=300 rootfstype=btrfs elevator=deadline rootwait

# cat /etc/fstab 
/dev/mmcblk0p1 /boot vfat noatime 0 2
/dev/sda1 / btrfs defaults,noatime,nodiratime,discard,commit=300,subvol=@ 0 1


Give ODROID C1 a chance.

Its much faster than RPI2, e.g. due to Gigabit LAN. Works like a charm here: Stable, reliable, faster than RPI2. Using traditional UBUNTU gives you more choices on software and long term support.

I kicked all my RPIs and did not regret it.

Regards
Gerry

In step 4 the second link HW FAQ

It says “setting RAMTMP=yes in /etc/default/tmpfs these I/O operations will be RAM access rather than slow SD card I/O”

But with the Jessie Raspbian image (non-lite) from step 1 no matter what setting I use in /etc/defaults/tmpfs I appear to see the same file system.

It is shipped with

I also tried RAMTMP=yes and RAMTMP=no
(Yes uncommented)

What is the best setting?

Tom

I made the same experience and since then I use
tmpfs /tmp tmpfs defaults,noatime,nosuid,mode=0755,size=50m 0 0
in my /etc/fstab, works fine.

2 Likes

Yes it does! Thanks

Hi Lars! Where are you from? By your name im guessing Scandinavia? :slight_smile: Im asking because of the voice control you are mentioning - is it in English? Or If its in Norwegian for example, willing to share the ruleset? :slight_smile:

I am using an Raspberry PI 2 and are very satisfied. I will now go for an external disk. Should I go for an external SSD or standard?

/mike

Probably what ever is cheapest. OH does not appear to be IO bound and I don’t think you would see a difference over USB 2 between the two anyway.

I’m using a basic 2.5 external USB 2.0 disk, but if you are thinking of slightly extreme conditions or difficult-to-reach placement, I think the SSD is liable to be more reliable overall. Of course, if cost is a real factor, a traditional disk should do fine.

I’ve used Banana PI and Banana PRO in the past with Expanded external 250G SSD and they both worked flawlessly due to the better hardware.

I just saw this today. Some might find it useful.

Western Digital makes a $46, 314GB hard drive just for the Raspberry Pi

1 Like

Yes but being so popular, 4-6 week lead times

tom