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

Allow setting mem_limit #183

Open
Lurux opened this issue Jul 9, 2023 · 1 comment
Open

Allow setting mem_limit #183

Lurux opened this issue Jul 9, 2023 · 1 comment

Comments

@Lurux
Copy link

Lurux commented Jul 9, 2023

Being able to set /sys/block/zramX/mem_limit through the configuration file may be useful in situations where one wants to set a hard limit on the (compressed) size a given zram disk is going to take in memory.

As an example, I wanted to set up a large zram swap and limit it to use at most 25% of my total memory once compressed, but it seems like it isn't possible with just the configuration file currently.


As a side question, is it acceptable to set this manually by echoing my limit into /sys/block/zramX/mem_limit in the meantime, or could this cause some conflicts with zram-generator ?

@nabijaczleweli
Copy link
Collaborator

nabijaczleweli commented Jul 9, 2023

Yeah, you can set whatever for the device in sysfs; zram-generator is one-time setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants