Whilst Plex is working shutdown all other services

Hi,

I have a pi3 running Plex/radaar/sonar/transmission it was all working nicely and streaming without buffering as all the files are 1080p MP4 h264.

I’ve added a couple more HDD and syncthing to keep other files over there, but now Plex is buffering every 10 seconds of playtime.

Is there a way that when Plex is streaming all other software shuts down? Or at least how can I manually shut the other software down, so I can at least test my theory.

Many thanks

You can stop individual services with dietpi-services.
To stop them automatically on the fly while Plex is streaming is a bit more difficult.
You could write a bash script which detects somehow when plex is streaming and thek stops other β€œunnecessary” services.

Thanks had a look at dietpi-services and saw I could tweak things a little to try and limit the resources the other software can use hopefully that makes a difference

β”‚                         ●─ Single Service Options ─────────────●      β”‚
β”‚     nmbd                : disabled | included | Affinity 0,1          β”‚
β”‚     smbd                : disabled | included | Affinity 0,1          β”‚
β”‚     transmission-daemon : enabled | included | Affinity 0,1           β”‚
β”‚     plexmediaserver     : enabled | included | Affinity 0,1,2,3       β”‚
β”‚     jackett             : enabled | included | Affinity 0,1           β”‚
β”‚     sonarr              : enabled | included | Affinity 0-3           β”‚
β”‚     radarr              : enabled | included | Affinity 0-3           β”‚
β”‚     syncthing           : enabled | included | Affinity 0,1           β”‚
β”‚     cron                : enabled | included | Affinity 0,1           β”‚
β”‚     dropbear            : enabled | included | Affinity 0,1           β”‚
β”‚     openvpn             : disabled | included | Affinity 0-3          β”‚
β”‚     dietpi-vpn          : disabled | included | Affinity 0-3          β”‚
β”‚     dietpi-cloudshell   : disabled | included | Affinity 0-3          β”‚
β”‚     Add                 : Add missing service to DietPi-Services      β”‚
β”‚                         ●─ Global Service Options ─────────────●      β”‚
β”‚     Stop                : Stop ALL above services                     β”‚
β”‚     Restart             : (Re)start ALL enabled services

I even tried stop all above services and then just started Plex and the same buffering is happening on the same MP4 files that were previously playing smoothly:/

You can monitor your system resources with htop while plex is working, maybe you can gather some info about what is going on.

  0[||                        2.7%] Mem[|||||||||||||||||||||581M/960M]
  1[|||                       4.0%] Swp[|                  23.2M/1.06G]
  2[||                        2.0%] Tasks: 21; 1 running
  3[||||                      7.9%] Load average: 1.02 0.57 0.26
Avg[|||                       4.3%] Uptime: 07:35:01                         
PIDβ–³USER        RES  NI CPU%   TIME+  Command
  1 root       9512   0  0.0  0:20.72 /sbin/init
151 root       7760   0  1.3  0:02.15 β”œβ”€ /lib/systemd/systemd-journal
178 root       4992   0  0.0  0:01.20 β”œβ”€ /lib/systemd/systemd-udevd
531 root       2492   0  0.0  0:00.13 β”œβ”€ /usr/sbin/cron -f
533 root        708   0  0.0  0:00.00 β”œβ”€ /usr/sbin/rngd -f
534 root       5440   0  0.0  0:00.39 β”œβ”€ /usr/sbin/smartd -n
548 root        184  10  0.0  0:00.00 β”œβ”€ /usr/sbin/dropbear -p 22 -W
5153 root      2652  10  0.0  0:00.36 β”‚  └─ /usr/sbin/dropbear -p 22    
5155 root      5332  10  0.0  0:00.15 β”‚     └─ -bash                    
5213 root      3960  10  2.0  0:01.34 β”‚        └─ htop
617 root       4540   0  0.0  0:00.63 β”œβ”€ /sbin/wpa_supplicant -s -B -    
622 root       5424   0  0.0  0:00.04 β”œβ”€ /sbin/dhclient -4 -v -i -pf    
665 jackett     460   0  0.0  0:00.14 β”œβ”€ /bin/dash -c /opt/jackett/ja    
677 jackett    230M   0  0.0  1:05.01 β”‚  └─ /opt/jackett/jackett --No    
669 debian-tr 12108   0  0.7  1:40.44 β”œβ”€ /usr/bin/transmission-daemon    
671 plex      64280   0  4.0  2:36.30 β”œβ”€ /usr/lib/plexmediaserver/Ple    
793 plex      13720   0  0.0  1:04.09 β”‚  β”œβ”€ /usr/lib/plexmediaserver/   
5195 plex     31788   0  1.3  0:13.15 β”‚  └─ /usr/lib/plexmediaserver/    
672 root       1404   0  0.0  0:00.02 β”œβ”€ /sbin/agetty -o -p -- \u --n   
4861 sonarr   77348   0  0.0  0:09.80 β”œβ”€ /usr/bin/mono /usr/lib/sonar   
5034 radarr    119M   0  0.0  0:17.10 └─ /opt/radarr/Radarr -nobrowser
5224 root      3256   0  0.0  0:00.00 β”‚  └─ /lib/systemd/systemd-udev   
5213 root      3960  10  2.0  0:01.23 β”‚        └─ htop                 

I can’t see anything that looks maxed out when the buffering is happening - I guess it’s a network issue?

your systems seem using SWAP. Could be an indication for high memory usage. How does it behave while watching? Does it change if the movie is stream from another HDD or local storage?

1 Like

I don’t know what SWAP is - I’ve always had my media on the same HDD - I’ll try adding/playing something from another drive this evening

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.