[Solved] system has become VERY swappy

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[Solved] system has become VERY swappy

Postby jiml8 » Feb 12th, '21, 20:51

My last updates seem to have returned my consoles to me, and seem to have taken care of another problem apparently in dbus. So that's good.

But now my system loves my swap. I have turned vm.swappiness down to 1 in order to minimize swapping, but at this time something in excess of 6 GB of my swap is in use. Specifically,
Code: Select all
root@dadsbox:jiml> sysctl -a | grep swapp
vm.swappiness = 1

root@dadsbox:jiml> free
              total        used        free      shared  buff/cache   available
Mem:       32784036     6392636     1513528    19836636    24877872     6049716
Swap:      36909400     6666660    30242740


WTF?

Other than the update, nothing at all has changed in the system. My normal usage pattern continues, and there should be enough RAM to keep the swap to a minimum. I normally expect the system to be using less than 1GB of swap.

This usage of swap is causing noticeable slowdowns when I access a VM that I have not accessed for a few hours. I do have the swap available, just in case, but this is ridiculous.

Does anyone have any ideas?
Last edited by jiml8 on Feb 17th, '21, 00:31, edited 1 time in total.
jiml8
 
Posts: 1156
Joined: Jul 7th, '13, 18:09

Re: system has become VERY swappy

Postby doktor5000 » Feb 13th, '21, 03:43

Did you check what is actually using swap currently, with something like smem or similar ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16280
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: system has become VERY swappy

Postby jiml8 » Feb 13th, '21, 18:42

I was not familiar with smem, but that seems like a very useful tool.

The big culprits are chromium, akonadi, and vmware. One of my VMs is the biggest single user of swap. I don't know how that could be, but I am looking into it.

I upgraded to vmware workstation 16 a couple of months ago, but this assault on my swap did not start until after the latest mageia updates that I installed. But perhaps there is some new vmware setting somewhere that is allowing this.
jiml8
 
Posts: 1156
Joined: Jul 7th, '13, 18:09

Re: system has become VERY swappy

Postby jiml8 » Feb 17th, '21, 00:31

There is a global setting in vmware workstation to select how swap is used with VMs. You can not allow any VM memory to be swapped, or allow some to be swapped, or allow swapping to occur aggressively.

For many years, I have had my workstation installation set to allow some memory to be swapped, and this has worked well.

No longer.

Now, I have changed the setting to do not allow any VM memory to be swapped, and my swap usage has dropped, while my VM performance has improved.

Something has changed in the most recent kernel, and likely something is also different in Workstation 16 vs Workstation 14 (which was the upgrade I made...14 to 16), and the combination made performance crappy with workstation allowed to swap memory.

Now, memory is getting swapped anyway when it needs to happen, but the host kernel is doing it, not Workstation.

So, I don't know what the details are but the setting change in Workstation has made some big improvements. Swap usage is still much higher than I am used to seeing (right now, about 4.5 GiB in use) but it is well down from what I was seeing before the setting change.
jiml8
 
Posts: 1156
Joined: Jul 7th, '13, 18:09

Re: [Solved] system has become VERY swappy

Postby jiml8 » Feb 21st, '21, 00:27

While my configuration change in vmware has restored acceptable operation to the overall system, I am still seeing swap usage creeping up steadily though not rapidly, even as the system's behavior does not seem swappy.

So, while I am not sure there is a problem here, something has definitely changed and I would very much like to know what it is.

I seem to be zeroing in on kcompactd, which is a somewhat new feature that my monitoring tells me is running from time to time, and sucking up a lot of processor when it does run.

Some digging turns up this article:
https://lwn.net/Articles/817905/

which describes what is going on.

Again, I am not sure there is a problem here because I do have plenty of swap. Nevertheless, does anyone else here have any comments about this?
jiml8
 
Posts: 1156
Joined: Jul 7th, '13, 18:09


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest