I’ve documented elsewhere issues I’ve had with SSH to my RPi 3B. It turns out my problem was the Pi was running out of memory. We spent a great deal of time and space in the aforementioned thread trying to diagnose the problem. The prevailing opinion at the end of that thread was that I needed to connect via ethernet instead of wifi and to try a fresh installation of OSMC on a new SD card. I’ve done both of those things and am posting my initial results here.
I sought and received special dispensation from my wife to run an ethernet cable across the living room floor so I could connect the pi using ethernet instead of wifi. Bottom line: It looks to me like wifi is indeed the problem or at least a significant component of the problem. Below is a graph of available memory reported by free -m for 74 time periods spaced 30 minutes apart, so the results span 74/2 = 37 hours.
I rebooted the pi every morning at 0300 so it wouldn’t run out of memory. These reboots occurred at periods 17 and 65. The first 33 observations were using wifi, the remaining were using ethernet. I began using OSMC to watch recorded TV programs via NextPVR at periods 5 and 50.
There were two periods between reboots using wifi and ethernet. While using wifi, the pi leaked 5.6 MB per 30 minute period during the first of these and 6.05 for the second. That’s about 12 MB per hour of memory leakage.
On ethernet, the pi leaked 2.64 MB per 30 minute period for one and .6 MB per 30 minute period for the other. The average of those two is about 1.6 MB per 30 minute period.
Another thing that stands out is the pi leaked memory even while I wasn’t using OSMC using wifi, whereas memory available remained constant while connected with ethernet while I wasn’t using OSMC.
Using wifi or ethernet, available memory dropped noticeably whenever I began using OSMC to stream content, which makes sense. What doesn’t make sense is that memory was never fully reclaimed when I stopped using OSMC. Perhaps I should have started and stopped using OSMC multiple times between reboots to see if it needed more memory or was content with what it already had.
I bought a new SD card and did a fresh install of OSMC on it to see whether anything about the card could be causing my memory problems. So far, I’ve only loaded and enabled NextPVR, installed cron, and made the changes to /etc/connman.conf
and /boot/config.txt
to support the OSMC wifi dongle and to enter my video license codes. I’ve not tried connecting SMB shares yet. I’ll wait until I have some memory observations before I do that.
As always, I look forward to any thoughts or ideas.
Thank you.