Skip to content

Need help in understanding the configuration options #27

@lobopraveen

Description

@lobopraveen

I' looking for some explanation on these fields. I'm unable to understand what they really mean. Thank you for your time!

I was experimenting with Arch loaded on a 16GB USB stick. The system has 16GB RAM and the root filesystem is ext4 and is 6GB. The defaults didn't work as the boot process failed saying (I don't remember the exact phrasing but) no space left. df -m showed the zram was around 950M which is not enough to hold the root file system. I increased the defaults numbers but same error. I added print statements in the hook and ran ramroot -E and after that it fails to boot. I suspect USB got corrupted. I will retry once i get some time to play with it. Below are my questions:

ram_min
Minimum amount of free ram required.

Is this the RAM required before or after loading the root filesystem into RAM? Should this be set depending on the size of the root filesystem?

zram_min
Minimum amount of free zram required. If both this and ram_min cannot be satisfied, the zram boot prompt will automatically select no.

Minimum amount of free zram required by whom? Is this the free zram size required after loading the root filesystem into RAM? Is this to hold any new files created once the OS is running? Once the filesystem is loaded into RAM, will the free RAM be (total RAM - size of filesystem - zram_min)?

ram_pref
Preferred amount of free ram. Additional memory is allocated to ram up to this preferred value.

I'm very confused by "Additional memory is allocated to ram up to this preferred value." What is this value? Is this free RAM after file system is loaded into zram and zram_min added to the zram? This value isn't really required, isn't it? Whatever is left will be free RAM. What happens if my ram_pref is higher or lower than the left over RAM?

zram_max
Maximum amount of free zram. If ram_pref is satisfied, free zram is increased to zram_max.

Is this to increase the zram size if the filesystem loaded to zram + zram_min + ram_min is still less than total RAM? If so, the zram is then bumped up to zram_max and the remaining RAM will go towards the RAM to operate?

Is the minimum amount of total RAM required equal to ( filesystem size + ram_min + zram_min )? If ram_pref or zram_max couldn't be satisfied, will ramroot revert to booting from storage?

If I set ram_pref and zram_max to 0, will the zram be total filesystem size + zram_min? And the RAM be total RAM - whatever is taken up by the zram?

With the defaults (shown below), the 6GB filesystem should have loaded easily onto a 16GB RAM. I'm not sure where the no space left error came from. I will try to debug it if I get a chance but it will be helpful if I understood what these fields are for.

# minimum MiB free ram:
ram_min=750

# minimum MiB free zram:
zram_min=250

# preferred MiB free ram:
ram_pref=4000

# maximum MiB free zram:
zram_max=1000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions