Web lists-archives.com

Re: Swap priority in Debian




On Aug 25, 2018, at 1:15 AM, Subhadip Ghosh <subhadip.sky@xxxxxxxxx> wrote:

> 
> On Saturday 25 August 2018 01:17 PM, Dekks Herton wrote:
>> Subhadip Ghosh <subhadip.sky@xxxxxxxxx> writes:
>> 
>>> Hi,
>>> 
>>> I am a Debian testing user. Recently I am experiencing freezing on my
>>> Debian system intermittently and during troubleshooting the same, I
>>> found out that the I have a swap partition with priority set to
>>> -2. But according to the below manpage:
>>> 
>>> https://manpages.debian.org/stretch/mount/swapon.8.en.html
>>> 
>>> swap priority should be between -1 and 32767. I have a swappiness
>>> value of 60 but I don't remember seeing the swap being used at all
>>> recently, the used swap is always 0%.
>> Whats swapon -s say? do you use zsawp or zram?
> Filename                Type        Size    Used    Priority
> /dev/sda5                                  partition    8203260 0    -2
> 
> I am using zswap.
>> 
>>> My question is, do you think that the -2 priority is stopping the swap
>>> partition from actually being used and because of that, the system is
>>> getting frozen when the memory usage is high?
>> No, it's -2 on my stretch box with zswap enabled and it swaps as one
>> would expect.
> 

My buster box says pretty much the same thing.  I’m not using zswap.

> Filename				Type		Size		Used	Priority
> /dev/dm-1                              	partition	10485756	0	-2

I don’t recall ever having seen it actually use any swap, but that may just be me not remembering something that didn’t seem important at the time.

Rick

PS:  I did manage, just now, to force it to swap a small, but non-zero, amount by opening lots of tabs in firefox.  So it will use a “-2” swap partition if it has to.
For what it’s worth, I noticed that firefox got kinda slow, but it didn’t freeze.