Description:
The writeback_compressed device atrribute toggles compressed
writeback feature.
+
+What: /sys/block/zram<id>/writeback_batch_size
+Date: November 2025
+Contact: Sergey Senozhatsky <senozhatsky@chromium.org>
+Description:
+ The writeback_batch_size device atrribute sets the maximum
+ number of in-flight writeback operations.
writeback_limit WO specifies the maximum amount of write IO zram
can write out to backing device as 4KB unit
writeback_limit_enable RW show and set writeback_limit feature
+writeback_batch_size RW show and set maximum number of in-flight
+ writeback operations
writeback_compressed RW show and set compressed writeback feature
comp_algorithm RW show and change the compression algorithm
algorithm_params WO setup compression algorithm parameters
idle WO mark allocated slot as idle
====================== ====== ===============================================
-
User space is advised to use the following files to read the device statistics.
File /sys/block/zram<id>/stat
Note that this feature should be configured before the `zramX` device is
initialized.
+Depending on backing device storage type, writeback operation may benefit
+from a higher number of in-flight write requests (batched writes). The
+number of maximum in-flight writeback operations can be configured via
+`writeback_batch_size` attribute. To change the default value (which is 32),
+execute::
+
+ $ echo 64 > /sys/block/zramX/writeback_batch_size
+
If admin wants to measure writeback count in a certain period, they could
know it via /sys/block/zram0/bd_stat's 3rd column.