Hi,
The reason why my current hunch is PMS or its other processes is that this machine runs ONLY PMS.
It could be rpc.statd as by music is backed by NFS. But pre 1.19 I had no memory pressure issues, even when the VM had 1.5G RAM. PMS is not running in a jail, in an ESXi VM.
# uname -a
FreeBSD plex-01 12.1-RELEASE-p1 FreeBSD 12.1-RELEASE-p1 GENERIC amd64
Here’s top:
# top -o size | head -20
last pid: 88418; load averages: 2.16, 1.36, 1.15 up 5+05:46:25 18:15:43
30 processes: 2 running, 28 sleeping
CPU: 0.7% user, 0.3% nice, 0.5% system, 0.1% interrupt, 98.4% idle
Mem: 62M Active, 1310M Inact, 71M Laundry, 446M Wired, 200M Buf, 104M Free
Swap: 1024M Total, 436M Used, 588M Free, 42% Inuse
PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
794 plex 13 52 15 458M 68M piperd 12:58 0.00% Plex Script Host
52511 root 1 20 0 268M 2824K select 0:00 0.00% rpc.statd
701 plex 19 52 0 157M 51M uwait 51:06 0.00% Plex Media Server
799 plex 23 52 0 106M 20M usem 5:42 0.00% Plex DLNA Server
800 plex 11 52 0 32M 5464K usem 0:14 0.00% Plex Tuner Service
I’m still getting my head around FreeBSD RAM allocation and I’m about to start a thread on FreeBSD Forums. The Free in top isn’t so bad, and really top is showing that 1.3GB is free (Inact). What appears to happen is a process uses up all (or almost all) RAM temporarily. And therefore swap kicks in (and occasionally runs out).
# swapinfo -h
Device 1K-blocks Used Avail Capacity
/dev/gpt/swapfs 1048576 436M 588M 43%
It’s a small data point but looking at the logs may indicate a regular run eating up the RAM:
# grep 'swap.*failed' /log/plex-01/messages | cut -c 1-13 | sort -u
2020-05-08T04
2020-05-10T04
2020-05-16T08
Maybe something that runs every 4 hours, although PMS’s scheduled tasks are configure to start at 2AM and complete by 8AM.
Just watching a library scan of my largest library (40K files) shows rpc.statd popping in and out of top, but never with more than 260MB of resident RAM (but always 260MB in Size).