Closed karolherbst closed 9 years ago
I think discard is supported since linux-2.6.33 and ext4
Whether ext4 supports "discard" is not the point: The important question is whether zram reacts on a discard request from ext4, since otherwise the "discard" option just costs time and helps nothing.
It seems that zram supports "discard" since linux-3.18, so indeed it makes sense to use it as a new default option. Thanks for pointing out.
Correction: It seems it is already supported since linux-3.15
Yeah, it was working for me since I start to use zram, which should be around 3.16 or something.
Allthough I don't know the performance impact off discard, so maybe it doesn't make sense to enable it, if you only have a really small device.
Fixed in v3.2
thanks
If you use really big zrams, like I used 11GB for portage compilation, the filesystem contains random data over the time and begin to use a lot of RAM. the "discard" mount option removes files on delete from the filesystem entirely instead of just removing the reference, making the memory used by the zram device less.
I think discard is supported since linux-2.6.33 and ext4.
If this option won't be added as a default options, maybe a notice in the config file would be nice (something like: if you want to use big devices, please use ext4 with discard).
This would effect the openrc conf.d file and the systemd service files.