ecdye / zram-config

A complete zram-config utility for swap, directories, and logs to reduce SD, NAND and eMMC block wear.
MIT License
412 stars 53 forks source link

New feature - support for in ram volumes only #21

Closed sislakd closed 4 years ago

sislakd commented 4 years ago

It would be nice to have ability to support in ram volumes only within /etc/ztab. For example, there can be introduced new mount type ram (or tmp) which will have one parameter less compared to dir (bind_dir is not needed). This will result into zram volume creation and direct mount without overlayFS into target_dir. Such option would be beneficial for the cases where some mount doesn't need to be backed by disk at all, e.g. /tmp.

It is possible to configure to create own startup scripts to achieve desired behavior, however it would be very nice to have it configurable at one place /etc/ztab.

StuartIanNaylor commented 4 years ago

If its not going to be persistent then just create a zram drive via zramctl. The point of using overlayfs is so that only writes are maintained in and create a much smaller ram footprint. A zram drive on its own is quite expensive and fail to see how it has any advantage or need over one that is CoW via overlayfs.

sislakd commented 4 years ago

I thought that this zram-config project is exactly about zram configuration and overlayfs is just one function. Thus, this request was about addition of support for zram without overlayfs.

StuartIanNaylor commented 4 years ago

There is no need for a pointless regression that has no benefit. You can always clone copy fork and provide yourself but in all honesty my opinion is that its a pointless option.

Using the overlayFS also means the zram file system does not need to be populated on boot. Means much larger file systems can be used because of the nature generally a small proportion of files are written too whilst the majority are static, with no copy/sync delay that would be incurred otherwise.