01-21-2020, 11:39 PM
Copying your question from PM here so everyone can benefit from the answer-
That'll depend on the swap priority set on the default swapfile. Swaps with a higher priority are used first, when the high priority swap is full then lower priority swap will be used. Check your existing swaps by running `swapon` with no arguments or `cat /proc/swaps` to see the priorities:
I'm pretty sure the default swapfile has a priority of 1, 0 or -1; I can't remember which. The zram-swap script sets priority 5 which should be higher.
You can safely disable the default swapfile and remove it.
james64 Wrote:I just installed zram yesterday. Thanks!
Question: Should the 500M default swap be removed?
Will swap happen to zram first? then zram?
That'll depend on the swap priority set on the default swapfile. Swaps with a higher priority are used first, when the high priority swap is full then lower priority swap will be used. Check your existing swaps by running `swapon` with no arguments or `cat /proc/swaps` to see the priorities:
Code:
root@pinebookpro:~/work/zram-swap# cat /proc/swaps
Filename Type Size Used Priority
/dev/zram0 partition 6291452 0 5
I'm pretty sure the default swapfile has a priority of 1, 0 or -1; I can't remember which. The zram-swap script sets priority 5 which should be higher.
You can safely disable the default swapfile and remove it.