I regularly receive the "your system has run out of application memory" alert, then the dialog box pops up to quickly kill any offending application before the OS crashes.
However, unlike many of the questions I could read here, my issue isn't with excessive swap usage, but rather than no swap is being used despite memory pressure being very high, a similar case to this one, although on an older OS the difference much higher memory pressure (Here in the yellow, but sometimes reaching in the red).
Now for the context: Following a hard crash after the SATA cable broke (an infamous problem on the 2012 13" MBP), I put the SSD in an USB 3 enclosure and currently running the OS from the externally-connected SSD. Free space isn't an issue as there's close to 200GiB unused. There was no other change in configuration.
With the SSD connected on the internal SATA, I have to deal with excessive swap usage. With the SSD connected externally, no swap is being used at all even when the system runs out of memory.
Of course Microsoft Teams is a memory hog given how idle it sits, but that doesn't explain why Mojave wouldn't do its thing and start using swap when it becomes really necessary to prevent a crash.
EDIT Answers to some questions below: @Gilby
Checked that: I've checked vm.compressor_mode:
sysctl -a vm.compressor_mode
vm.compressor_mode: 4
sysctl vm.swapusage
vm.swapusage: total = 0.00M used = 0.00M free = 0.00M (encrypted)
Result for mount
command:
mount
/dev/disk2s1 on / (apfs, local, journaled)
devfs on /dev (devfs, local, nobrowse)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)
/dev/disk1s1 on /Volumes/Sª Catalina (apfs, local, nodev, nosuid, journaled, noowners)
/dev/disk1s2 on /Volumes/Sª Catalina - Datos (apfs, local, nodev, nosuid, journaled, noowners)
Result for diskutil list
command:
In fact, there's a VM:
/dev/disk0 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 120.0 GB disk0s2
3: Apple_APFS Container disk2 879.7 GB disk0s3
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +120.0 GB disk1
Physical Store disk0s2
1: APFS Volume Sª Catalina 11.3 GB disk1s1
2: APFS Volume Sª Catalina - Datos 30.7 GB disk1s2
3: APFS Volume Preboot 25.9 MB disk1s3
4: APFS Volume Recovery 527.5 MB disk1s4
5: APFS Volume VM 1.1 GB disk1s5
/dev/disk2 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +879.7 GB disk2
Physical Store disk0s3
1: APFS Volume Mojave HD 699.6 GB disk2s1
2: APFS Volume Preboot 22.1 MB disk2s2
3: APFS Volume Recovery 508.9 MB disk2s3
4: APFS Volume VM 1.1 GB disk2s4
What does it means?
stress-ng
. It can stress test memory which should force use of swapdiskutil list
show a VM volume? Doesmount
show a VM volume? What do you get with the commands in the linked question? You need someone with a Mojave system to assist diagnosis.