Swap Memory Use/Optane Memory

For the longest time I was torn over making Linux default on my main computer. I have a Dell Inspiron 3670 with a 7th Generation Intel Core i5-8400 CPU @ 2.80GHz × 6 and 12gb of RAM. It also has Intel Optane memory. I can’t remember how much it was. Anyways, I loaded Linux Mint 20 to it and was using it without any problems. I replaced the 1 gb hard drive with a 500 gb SSD. I was reviewing system resources with Htop one day when running a virtual machine and noticed about 20 mb of swap being used. This was odd to me because out of 11.5 gb of memory I was using around 6 gb. I understand somewhat the purpose of swap, but being at 50% capacity and using swap was odd to me because I had an old dell that ran on 8 gb of RAM and I had never noticed the swap being used. I tried clearing the swap time and time again but it would start using it every time. Sometimes while at normal idle with no extra programs running. I did not want this to affect my SSD so I reloaded my system and put the home folder and swap file on the 1 gb hard drive and loaded the system to the SSD. Alas, it was doing it again. I was okay with this because the swap was on my HD and not the SSD. That was until I was running two virtual machines in virtualbox and they were extremely slow and it seemed to affect my host system. I wiped virtualbox and installed Gnome boxes, but my question is this: Does this have something to do with the Intel Optane Memory within CPU or bios, or is it something else? Thank you in advance for your answers to this problem. If any more information is needed, just let me know.

Forgot to mention that it keeps increasing at times to 50 mb of swap use. I tested the theory of swap use on an old laptop with 4 gb of memory. I got to about 75% of RAM usage before swap was being used. This is why I am puzzled about a 12 gb of memory at 50% use was using swap.

Swap file or swap partition?

I’m assuming file. I’m a noob and trying to learn these things. Heck it may be a partition for all I know. Sorry. I’m trying to google to find out how to find out. :smiley:

/dev/sdc1 partition 3998716 0 -2

type swapon -s and it will tell you the type. Linux Mint uses a swapfile by default. This might be worth posting on the Linux Mint forum. What about this, how much RAM is allocated to the VM?

@GUI_Linux_Guy Can you check the swappiness by using the terminal output “cat /proc/sys/vm/swappiness” ? This number is the setting that will set up how sensitive the system will go into swap . Usually it should be 60 in the default, but if you prefer to use swap only when the system memory is close to be full, then you might change it into 5 - 10 range.

It is a 4 gb partition. When I had mint installed before it was a swap file. It happened on both.

The swappiness is set to 60. On the last set up on LM 20 I had it set to 10 and it still did it. What I really need to see is how and why the swap is used. It doesn’t make sense at 50% that swap should be used. At least from what I’ve heard in the past about swap.

At 51% the swap is increasing with one virtual machine running and Brave open with 9 tabs.

After doing a little work in virtual machines and writing an ISO to a USB, I checked my system monitor and this was happening (this was after setting the swappiness to 10):

As I work it seems to increase:

And this is me installing a VM on Boxes: