Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap priority #21

Open
LostCat123 opened this issue Apr 18, 2024 · 4 comments
Open

Swap priority #21

LostCat123 opened this issue Apr 18, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@LostCat123
Copy link

Is there a way to manually set the value of priority of the the swap, because whatever value I choose the swap always get more priority than the zram

"Set Swap Priority above Zram?"
I chose "yes" and the priority of zram will be at -3 and swap at -2
Screenshot_20240418-131412

I chose "no" and it zram say -2 with swap on 0
Screenshot_20240418-192425

No matter what I choose, the swap is still prioritized over zram

@janithcooray janithcooray added the bug Something isn't working label Apr 28, 2024
@janithcooray janithcooray self-assigned this Apr 28, 2024
@devnoname120
Copy link
Contributor

devnoname120 commented Jul 28, 2024

Same here, /dev/block/zram0 has a lower priority than /dev/swap/swapfile in /proc/swaps.
I use the following module for zram so the problem may be that: https://github.com/reiryuki/ZRAM-Swap-Configurator-Magisk-Module

On a side note it would be great if this module could do both zram and swap so we don't need two modules which can potentially conflict with each other.

@LostCat123
Copy link
Author

Same here, /dev/block/zram0 has a lower priority than /dev/swap/swapfile in /proc/swaps. I use the following module for zram so the problem may be that: https://github.com/reiryuki/ZRAM-Swap-Configurator-Magisk-Module

On a side note it would be great if this module could do both zram and swap so we don't need two modules which can potentially conflict with each other.

The creator of that module added the ability to change zram priority now so I think it should be fine

@devnoname120
Copy link
Contributor

devnoname120 commented Aug 3, 2024

I confirm that this update fixed it:

% sudo cat /proc/swaps
Filename                                Type            Size       Used    Priority
/data/swap/swapfile                     file            8388604    179968  -2
/dev/block/zram0                        partition       2097148    2034584 0

For future travelers here is the relevant commit: reiryuki/ZRAM-Swap-Configurator-Magisk-Module@33ae93c

@janithcooray janithcooray mentioned this issue Sep 2, 2024
6 tasks
@janithcooray
Copy link
Owner

janithcooray commented Oct 24, 2024

I've pushed a couple of options in the latest release. see if that helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants