Interesting memory management

I made a couple changes to my AWS VM,, 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.

1 thought on “Interesting memory management

  1. whistl Post author

    a day later, and it’s back to 200MB used in the 512MB swapfile. Not sure what was happening that required additional memory resources.

    I’m pretty happy with OpenVPN. Runs in about 4 MB RAM, I’m using it a lot more often now, and haven’t noticed a hiccup yet (except for having to shut it down when I want to watch Netflix).

Comments are closed.