I made a couple changes to my AWS VM, whistl.com, that surprised me. First, I had no swap space at all, because Amazon doesn’t think you need any, a reasonable attitude these days, since most of us don’t. I did a kind of knee jerk response, and added a 2 GB /root/swapfile1 file based swap partition. Ubuntu used it, but only for about 200 GB of files. The 2GB of active RAM was left populated with 80% active processes, 20% idle processes.
Then I deallocated the 2GB swapfile1, deleted it, and replaced it with a 512 MB swapfile1.
After a couple hours, the entire swapfile was filled, leaving 50% of RAM unallocated. I was not expecting that reducing total swap space would cause more processes to swap out and increase RAM available to active processes. Makes me question what I knew about UNIX and available swap space.