Description of problem: After upgrading to kernel series 4.16.x, swap usage kicks in much earlier and more aggressively than for previous kernels, e.g. from the 4.15.x series. This can be seen easily when running virtual machines on a Fedora 28 host. Already with 4.15.x kernels, the increasing memory footprint of recent Fedora releases forced me to increase my system's memory from 4 GB to 8 GB in order to be able to use gnome-boxes' recommended memory size of 2 GB or more for a virtual machine. I now see that even when there is still much more than 1 GB of free memory available, swap usage sets in and can reach values of more than 100 MB which results in an increased system latency. Version-Release number of selected component (if applicable): kernel-4.16.8-300.fc28 How reproducible: Always Steps to Reproduce: 1. Work with several virtual machines with an allocated memory size of 4 GB. 2. Watch swap usage. Actual results: After some time, swap usage becomes noticeable and can use more than 100 MB of swap space even when free memory was always far larger than 1 GB. Expected results: As long as memory usage is far below the physical memory size, usage of swap space is avoided. Additional info: For kernels from the 4.15.x series, a memory usage of close to 100 % was still possible before significant chunks of memory were dumped to the swap volume.
*********** MASS BUG UPDATE ************** We apologize for the inconvenience. There are a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 28 kernel bugs. Fedora 28 has now been rebased to 4.17.7-200.fc28. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel. If you experience different issues, please open a new bug report for those.
Created attachment 1475203 [details] Swap usage for kernel 4.17.12-200.fc28 and a system with 8 GB of main memory This swap usage has been observed after running several VM sessions with a main memory of 4 GB on a host with 8 GB of main memory running the latest kernel 4.17.12-200.fc28. Even though about 2 GB of the host's system memory have always stayed free, swap usage is approaching 1 GB of disk space. This swap policy results in a sluggish response of the virtual guest. Swap usage is less significant when the swap size is smaller, e.g. 1 GB. Optimum performance is obtained when running from a live media with zero swap space.
What do you have the vm.swappiness sysctl set to? Try setting it to 1.
The system default is vm.swappiness = 60. I have not changed anything myself. I do know that I can modify the value of vm.swappiness or even disable swap space altogether but my point is that this behaviour has only shown up recently, and that I do consider the current behaviour a regression.
We apologize for the inconvenience. There is a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 28 kernel bugs. Fedora 28 has now been rebased to 4.18.10-300.fc28. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel. If you have moved on to Fedora 29, and are still experiencing this issue, please change the version to Fedora 29. If you experience different issues, please open a new bug report for those.
I think the issue is still present since today when e.g. only 6.2 GB out of 7.7 GB available system memory have been used at most, swap usage has reached more than 0.3 GB. The current kernel version is 4.18.12-200.fc28.
*********** MASS BUG UPDATE ************** We apologize for the inconvenience. There are a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 28 kernel bugs. Fedora 28 has now been rebased to 4.20.5-100.fc28. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel. If you have moved on to Fedora 29, and are still experiencing this issue, please change the version to Fedora 29. If you experience different issues, please open a new bug report for those.
Created attachment 1548130 [details] Swap usage for kernel 4.20.16-300.fc29 and a system with 8 GB of main memory Swap usage for a current Fedora 29 system which is running an idle GNOME session after rsyncing about 80 GB from an external hard drive to the system disk.
This message is a reminder that Fedora 28 is nearing its end of life. On 2019-May-28 Fedora will stop maintaining and issuing updates for Fedora 28. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '28'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 28 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.