Swap fills up although plenty of memory is available

My system has 16gb of memory and a 6gb swap partition. Despite having more than half of memory unused, the system will fill up the swap partition and (I believe) eventually crash KDE after intensive use of a Chrome based browser (either Vivaldi or Brave). Here is a recent output from free after moderate browser use:

free -h total used free shared buff/cache available
Mem: 15Gi 7.4Gi 1.2Gi 395Mi 7.4Gi 8.0Gi
Swap: 6.0Gi 5.1Gi 949Mi

Just before a crash this will show the entire swap partition as filled, but still with nearly 8 gb available memory. Here is my sysctl.conf:

vm.dirty_ratio = 10
vm.dirty_background_ratio = 5
vm.swappiness = 1
vm.vfs_cache_pressure=50

I am using Tumbleweed, but I’ve had the same issue of memory use and Plasma crashes with 15.5

This are heavily tinkered values. Did you test with the standards that come with openSUSE?

vm.dirty_ratio = 20
vm.dirty_background_ratio = 10
vm.swappiness = 60
vm.vfs_cache_pressure=100

I’ll try them. These migrated from another system and worked well there - but that was a few years ago.