RAM Plus on Samsung Android devices enables a feature of zram called zram writeback, which uses a block storage device (like a file/partition) as a backing device for your zram.
If you disable RAM Plus your device will continue to use zram, whose use was already pretty well established in Android devices before this new writeback feature.
The idea with writeback in zram is that if data stays in the zram device for a long time without being used, it can intelligently write least recently used data to the backing device when idle. It can also write incompressible data to the backing device.
The difference between this and zswap, which on the surface appears to do the same thing, is:
- When zswap overflows it pushes data out to regular, non-compressed swap, meaning it has to decompress the data from the compressed cache in order to write it out to your swap.
- zram writeback has some features designed to reduce wear on flash devices, by limiting the rate and frequency that data is written to the backing device.
- zram writeback actively writes data out to its backing gradually during idle time rather than waiting until the in-memory device is full, which should reduce latency spikes.
- zram compression and decompression is multi-threaded, able to use all of your cores. When I last looked at zswap this wasn't the case, though I admit that may have changed in the time since.
If you use RAM Plus, you will free up some physical memory during idle time. But, you will unfortunately be adding some level of wear and tear to the internal storage. It won't be significant enough to exceed the storage's TBW during the life of your device.
How much should you use?
You don't have to enable RAM plus at all, and zram will continue to work.
But if you enable it a bit, you can get the benefit of a little more physical RAM to work with most of the time, with the drawback of a loss of some storage space and sometimes reading data back from it will be a little slower, albeit the feature wouldn't exist if there wasn't a case that it's still a net benefit most of the time. Android likes to fill up any memory it can, remembering state and memory contents of many of your apps.
What does the size setting represent?
The RAM Plus size setting does not represent the actual size on disk dedicated to the writeback device, nor the actual size in RAM that the zram compressed cache can occupy - instead, it specifies the size of the virtual zram device, in terms of uncompressed bytes.
On Samsung devices (see comments), the writeback device is typically sized to be 25% of the size of the virtual zram device, so for the 8GB setting you are giving up 2GB of storage space. Note that due to compression, an 8GB zram device might, for example, occupy something like 2.6GB assuming a 3:1 compression ratio. In an ideal scenario, the 2GB backing device could reduce the memory utilization of that zram cache by up to 2GB. Real world performance, of course, will vary.
Note that with RAM Plus disabled, your device will still be using an in-memory zram device, but you don't have any control over its size.