MRTG with the new 'Available Memory' OID is now running a number of days.
The below graph shows the weekly graph of the Used memory in percentage.
There is constantly an increase of memory usage, but I was not able to identify a process (top -b -o +%MEM | head -n 20) that could be responsible for this increase.
Graph details:
- MRTG started last Sunday evening.
- The RPi3 was running mostly idle for two days. During this period memory usage increased about 3 percent per day.
- Kodi crashed on Tuesday (1-Dec-2020) evening at 2215. This decreased memory usage with about 6 to 7 percent. After this memory usage is flat for a long time.
- Wednesday evening I played a bit with the Plex server and started a scan of my library which was still busy when I went to sleep.
- Thursday morning at 7:42am there was another Kodi crash.
- On Thursday at about 11am started a download that lasted till about 5pm
- After the download memory increased about 8 percent a day.
- At 2pm memory usage decreased with about 6 percent, but have not seen a reason (see spoiler for details).
Top output 4-Dec-2020 2pm and 2:30pm
- 13:59:33 up 6 days, 11:42, 1 user, load average: 0.03, 0.08, 0.10
Tasks: 117 total, 1 running, 116 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2.9 us, 2.9 sy, 1.4 ni, 92.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 747.9 total, 48.0 free, 486.5 used, 213.3 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 186.5 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
25482 root 20 0 673628 179296 21224 S 12.5 23.4 620:12.02 kodi.bin
608 root 30 10 340016 95884 1264 S 0.0 12.5 111:23.94 python
405 root 20 0 328660 54852 8544 S 0.0 7.2 41:43.79 Plex Media Serv
637 root 35 15 194612 51220 4180 S 6.2 6.7 36:04.24 Plex Script Hos
9545 root 20 0 161860 15648 2132 S 0.0 2.0 266:01.81 tvheadend
22220 root 20 0 5116 3968 3572 S 0.0 0.5 0:00.21 sshd
581 root 20 0 30396 3336 1796 S 0.0 0.4 0:16.77 smbd
916 root 20 0 125428 3128 448 S 0.0 0.4 8:26.13 Plex Tuner Serv
1924 root 20 0 7312 2696 880 S 0.0 0.4 11:24.85 snmpd
598 root 20 0 6084 2392 600 S 0.0 0.3 2:07.96 python
22424 root 20 0 6020 2128 1700 R 6.2 0.3 0:00.03 top
579 root 20 0 17560 2096 1060 S 0.0 0.3 1:39.76 nmbd
2031 root 20 0 22540 1968 1564 S 0.0 0.3 0:13.87 systemd-journal
Used memory %: 75.0576
- 14:29:34 up 6 days, 12:12, 1 user, load average: 0.38, 0.78, 0.75
Tasks: 124 total, 1 running, 123 sleeping, 0 stopped, 0 zombie
%Cpu(s): 4.3 us, 2.9 sy, 1.4 ni, 90.0 id, 1.4 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 747.9 total, 32.2 free, 441.1 used, 274.6 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 230.3 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
25482 root 20 0 673884 167368 9260 S 6.2 21.9 624:34.58 kodi.bin
608 root 30 10 340016 95884 1264 S 0.0 12.5 111:33.71 python
405 root 20 0 328660 57636 11328 S 6.2 7.5 41:50.92 Plex Media Serv
637 root 35 15 194612 48596 1556 S 0.0 6.3 36:11.31 Plex Script Hos
9545 root 20 0 162884 15980 2060 S 6.2 2.1 274:32.91 tvheadend
581 root 20 0 30396 3328 1788 S 0.0 0.4 0:16.78 smbd
916 root 20 0 125428 3128 448 S 0.0 0.4 8:27.78 Plex Tuner Serv
1924 root 20 0 7312 2684 868 S 0.0 0.4 11:27.06 snmpd
2031 root 20 0 23056 2576 2172 S 0.0 0.3 0:14.25 systemd-journal
22220 root 20 0 5116 2408 2012 S 0.0 0.3 0:00.23 sshd
598 root 20 0 6084 2392 600 S 0.0 0.3 2:08.32 python
579 root 20 0 17560 2016 980 S 0.0 0.3 1:39.95 nmbd
23006 root 20 0 6028 2008 1580 R 6.2 0.3 0:00.03 top
Used memory % 69.1941
Enabling debug with TVH didn't additional information at the time of the crash:
2020-12-02 02:18:10.225 [ DEBUG]:mpegts: 514MHz in Ziggo DVB-C Nijmegen - close PID 1FFB (8187) [20/0x7603b250]
2020-12-02 02:50:46.164 [ INFO]:epgdb: snapshot start
2020-12-02 02:50:46.695 [ INFO]:epgdb: queued to save (size 3093481)
2020-12-02 02:50:46.695 [ INFO]:epgdb: brands 0
2020-12-02 02:50:46.695 [ INFO]:epgdb: seasons 463
2020-12-02 02:50:46.695 [ INFO]:epgdb: episodes 6181
2020-12-02 02:50:46.695 [ INFO]:epgdb: broadcasts 6182
2020-12-02 02:50:46.695 [ INFO]:epgdb: save start
2020-12-02 02:50:46.952 [ INFO]:epgdb: stored (size 441369)
2020-12-02 03:50:46.010 [ INFO]:epgdb: snapshot start
2020-12-02 03:50:46.189 [ INFO]:epgdb: queued to save (size 3093481)
2020-12-02 03:50:46.189 [ INFO]:epgdb: brands 0
2020-12-02 03:50:46.189 [ INFO]:epgdb: seasons 463
2020-12-02 03:50:46.189 [ INFO]:epgdb: episodes 6181
2020-12-02 03:50:46.189 [ INFO]:epgdb: broadcasts 6182
2020-12-02 03:50:46.189 [ INFO]:epgdb: save start
2020-12-02 03:50:46.425 [ INFO]:epgdb: stored (size 441369)
2020-12-02 04:50:46.012 [ INFO]:epgdb: snapshot start
2020-12-02 04:50:46.190 [ INFO]:epgdb: queued to save (size 3093481)
2020-12-02 04:50:46.190 [ INFO]:epgdb: brands 0
2020-12-02 04:50:46.190 [ INFO]:epgdb: seasons 463
2020-12-02 04:50:46.190 [ INFO]:epgdb: episodes 6181
2020-12-02 04:50:46.190 [ INFO]:epgdb: broadcasts 6182
2020-12-02 04:50:46.190 [ INFO]:epgdb: save start
2020-12-02 04:50:46.402 [ INFO]:epgdb: stored (size 441369)
2020-12-02 05:50:46.014 [ INFO]:epgdb: snapshot start
2020-12-02 05:50:46.209 [ INFO]:epgdb: queued to save (size 3093481)
2020-12-02 05:50:46.209 [ INFO]:epgdb: brands 0
2020-12-02 05:50:46.209 [ INFO]:epgdb: seasons 463
2020-12-02 05:50:46.209 [ INFO]:epgdb: episodes 6181
2020-12-02 05:50:46.209 [ INFO]:epgdb: save start
2020-12-02 05:50:46.209 [ INFO]:epgdb: broadcasts 6182
2020-12-02 05:50:46.394 [ INFO]:epgdb: stored (size 441369)
2020-12-02 06:50:46.000 [ INFO]:epgdb: snapshot start
2020-12-02 06:50:46.211 [ INFO]:epgdb: queued to save (size 3093481)
2020-12-02 06:50:46.211 [ INFO]:epgdb: brands 0
2020-12-02 06:50:46.211 [ INFO]:epgdb: seasons 463
2020-12-02 06:50:46.211 [ INFO]:epgdb: episodes 6181
2020-12-02 06:50:46.211 [ INFO]:epgdb: save start
2020-12-02 06:50:46.212 [ INFO]:epgdb: broadcasts 6182
2020-12-02 06:50:46.380 [ INFO]:epgdb: stored (size 441369)
2020-12-02 07:42:28.506 [ INFO]:htsp: 127.0.0.1 [ admin | Kodi Media Center ]: Disconnected
2020-12-02 07:42:45.399 [ INFO]:htsp: Got connection from 127.0.0.1
2020-12-02 07:42:45.401 [ INFO]:htsp: 127.0.0.1: Welcomed client software: Kodi Media Center (HTSPv34)
Display More