foundObjects / zram-swap

A simple zram swap service for modern systemd Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

default priority

reukiodo opened this issue · comments

What is the reasoning behind the default swap priority of 15?

If I understand the swap priority correctly, shouldn't the default swap priority be set to 32767 to consider zram swap before anything else? I can't imagine that any other swap device would be faster?

IIRC the default swap prio is 0 or 1 on most systems, 5 just elevates the swap created with zram-swap enough to beat the default values.

The idea was not to elevate the priority so high that it conflicts with something the user sets up with an intentionally high priority.

you can edit /usr/local/sbin/zram-swap.sh and search for the number 15, then replace that with a higher priority if you'd like, then restart the service.

That's what I did and it works pretty well.