Carlos E. R. wrote:
I wonder why "swapoff -a" takes so long (7:44 minutes). There is enough free RAM space (after resuming from hibernate). I currently have two swap partitions, one on a WD red hard disk and one on a SSD. But even before (only SSD swap space) the swapoff time was nearly the same.
mybox:~ # iotop mybox:~ # free total used free shared buff/cache available. Mem: 8104720 3435540 3510580 15192 1158600 4492152 Swap: 38281208 3277124 35004084 mybox:~ # time swapoff -a
real 7m44.407s user 0m0.000s sys 4m37.312s mybox:~ # You forgot to post the output of "free" after swapoff. My guess is that
On 2016-04-26 19:51, Bjoern Voigt wrote: there will very little free ram, and possibly less ram assigned to buff/cache.
Notice that the amount of used swap is similar to the amount of free, so that disabling swap takes long. Yes, I though this too and it sound logical. But even with 16 GB RAM I had the problem, that "swapoff -a" tooks much time. I will get my 16 GB RAM back soon, so I can post additional test cases.
Here is a new test case with 8 GB RAM: mybox:~ # free -m total used free shared buff/cache available Mem: 7914 4391 253 27 3269 3335 Swap: 37383 1377 36006 mybox:~ # time swapoff -a real 3m40.079s user 0m0.008s sys 3m0.792s mybox:~ # free -m total used free shared buff/cache available Mem: 7914 5548 57 53 2308 2152 Swap: 0 0 0 All values are in Megabytes. Swapoff takes 3:40 minutes to free 1377 MB used SWAP space. RAM is enough because 3269 MB buffer/cache space is available. 1377 MB in 3:40 minutes mean 6,25 MB per second. My 3 TB WD Red hard disk should have up to 147 MB per second. Of course this a theoretical value, but a SWAP partition can't be fragmented and there was not much other I/O activit
I doubt, that the long swapoff time is not only a theoretical problem. I have several phenomenons which can be related:
* System feels sluggish after resuming from hibernate. This problem became stronger after removing 8 GB RAM from 16 GB before. This is normal. After a while the system will become faster.
With "iotop" I found, that there is much I/O SWAPIN traffic. * Shutdown can take some minutes This one I think is unrelated. Rather, it has to be some application or service that is taking a long time
* Even with much less used SWAP memory swapoff takes too long
Any ideas? What is a reasonable time for swapoff? Actually, disabling swap will make matters worse. I don't plan this. But I sometimes have discussions with Linux beginners which say: "I had a lot of memory (4 GB). I do not need swap. Swap destroys my SSD or my hard disk." It's difficult to explain them, that SWAP is good anyway. But this is another topic.
Greetings, Björ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org