On 4/26/16 2:42 PM, Xen wrote:
Bjoern Voigt schreef op 26-04-2016 17:51:
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. With "iotop" I found, that there is much I/O SWAPIN traffic. * Shutdown can take some minutes * Even with much less used SWAP memory swapoff takes too long
Any ideas? What is a reasonable time for swapoff?
I think Carlos is right that your amount of free RAM was minimal in the figures you cite and that if you want to really troubleshoot it in a way that makes more sense regarding "the swap mechanic" in general you would need to do so while you have more RAM available.
That said you could try to reduce the swappiness value to about 10. And try again.
I think you can just put a new value in: /proc/sys/vm/swappiness
To persist it you need to set it in sysctl.conf. The Swappiness value determines how eager the kernel is in putting stuff into the swap. Or how aggressively it is going to keep buffer memory available (free memory used for buffering IO).
The default for my system is 60 but they say it is only really good for servers and that a desktop would be better suited with a value of like 10.
The theory that I just concocted will be that maybe the kernel tries to put stuff back into the swap while you are trying to clear it. And this is why it takes so long. If this is true, then reducing swappiness a lot should also reduce that time a lot.
Cause I know nothing about the kernel and I don't know if it is getting inhibited (the swap) while it is getting cleared.
If you have zero memory left-over after swapoff you also have zero IO buffers.
Regards.
Oh but you say indeed sorry, that even with less swap it also takes so long. Apologies, didn't see that before.
Personally at this point I do not know how to easily fill my swap but for me swapoff has never taken long. I don't know, maybe just play with swappiness to see if you learn anything?
Regards. What you might want to look at prior to swapoff is free -m
This will tell you how much swap is actually in use. free -m total used free shared buffers cached Mem: 11956 1916 10040 11 121 713 -/+ buffers/cache: 1080 10875 Swap: 16383 0 16383 My laptop here, has 16GB ram. It's using no swap running a KDE desktop swapoff -a free -m total used free shared buffers cached Mem: 11956 1917 10039 11 121 714 -/+ buffers/cache: 1081 10875 Swap: 0 0 0 And it was almost instantaneous If the swap values are high, you need to determine what is using that memory. I suspect that long swapoff time is due to the lag for the out of memory killer to determine what you don't need. But that's just what we used to call a SWAG... sophisticated wild a** guess. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org