1 What: /sys/block/zram<id>/disksize 1 What: /sys/block/zram<id>/disksize 2 Date: August 2010 2 Date: August 2010 3 Contact: Nitin Gupta <ngupta@vflare.org> 3 Contact: Nitin Gupta <ngupta@vflare.org> 4 Description: 4 Description: 5 The disksize file is read-writ 5 The disksize file is read-write and specifies the disk size 6 which represents the limit on 6 which represents the limit on the *uncompressed* worth of data 7 that can be stored in this dis 7 that can be stored in this disk. 8 Unit: bytes 8 Unit: bytes 9 9 10 What: /sys/block/zram<id>/initstate 10 What: /sys/block/zram<id>/initstate 11 Date: August 2010 11 Date: August 2010 12 Contact: Nitin Gupta <ngupta@vflare.org> 12 Contact: Nitin Gupta <ngupta@vflare.org> 13 Description: 13 Description: 14 The initstate file is read-onl 14 The initstate file is read-only and shows the initialization 15 state of the device. 15 state of the device. 16 16 17 What: /sys/block/zram<id>/reset 17 What: /sys/block/zram<id>/reset 18 Date: August 2010 18 Date: August 2010 19 Contact: Nitin Gupta <ngupta@vflare.org> 19 Contact: Nitin Gupta <ngupta@vflare.org> 20 Description: 20 Description: 21 The reset file is write-only a 21 The reset file is write-only and allows resetting the 22 device. The reset operation fr 22 device. The reset operation frees all the memory associated 23 with this device. 23 with this device. 24 24 >> 25 What: /sys/block/zram<id>/num_reads >> 26 Date: August 2010 >> 27 Contact: Nitin Gupta <ngupta@vflare.org> >> 28 Description: >> 29 The num_reads file is read-only and specifies the number of >> 30 reads (failed or successful) done on this device. >> 31 >> 32 What: /sys/block/zram<id>/num_writes >> 33 Date: August 2010 >> 34 Contact: Nitin Gupta <ngupta@vflare.org> >> 35 Description: >> 36 The num_writes file is read-only and specifies the number of >> 37 writes (failed or successful) done on this device. >> 38 >> 39 What: /sys/block/zram<id>/invalid_io >> 40 Date: August 2010 >> 41 Contact: Nitin Gupta <ngupta@vflare.org> >> 42 Description: >> 43 The invalid_io file is read-only and specifies the number of >> 44 non-page-size-aligned I/O requests issued to this device. >> 45 >> 46 What: /sys/block/zram<id>/failed_reads >> 47 Date: February 2014 >> 48 Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> >> 49 Description: >> 50 The failed_reads file is read-only and specifies the number of >> 51 failed reads happened on this device. >> 52 >> 53 What: /sys/block/zram<id>/failed_writes >> 54 Date: February 2014 >> 55 Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> >> 56 Description: >> 57 The failed_writes file is read-only and specifies the number of >> 58 failed writes happened on this device. >> 59 25 What: /sys/block/zram<id>/max_comp_s 60 What: /sys/block/zram<id>/max_comp_streams 26 Date: February 2014 61 Date: February 2014 27 Contact: Sergey Senozhatsky <sergey.seno 62 Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> 28 Description: 63 Description: 29 The max_comp_streams file is r 64 The max_comp_streams file is read-write and specifies the 30 number of backend's zcomp_strm 65 number of backend's zcomp_strm compression streams (number of 31 concurrent compress operations 66 concurrent compress operations). 32 67 33 What: /sys/block/zram<id>/comp_algor 68 What: /sys/block/zram<id>/comp_algorithm 34 Date: February 2014 69 Date: February 2014 35 Contact: Sergey Senozhatsky <sergey.seno 70 Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> 36 Description: 71 Description: 37 The comp_algorithm file is rea 72 The comp_algorithm file is read-write and lets to show 38 available and selected compres 73 available and selected compression algorithms, change 39 compression algorithm selectio 74 compression algorithm selection. 40 75 >> 76 What: /sys/block/zram<id>/notify_free >> 77 Date: August 2010 >> 78 Contact: Nitin Gupta <ngupta@vflare.org> >> 79 Description: >> 80 The notify_free file is read-only. Depending on device usage >> 81 scenario it may account a) the number of pages freed because >> 82 of swap slot free notifications or b) the number of pages freed >> 83 because of REQ_DISCARD requests sent by bio. The former ones >> 84 are sent to a swap block device when a swap slot is freed, which >> 85 implies that this disk is being used as a swap disk. The latter >> 86 ones are sent by filesystem mounted with discard option, >> 87 whenever some data blocks are getting discarded. >> 88 >> 89 What: /sys/block/zram<id>/zero_pages >> 90 Date: August 2010 >> 91 Contact: Nitin Gupta <ngupta@vflare.org> >> 92 Description: >> 93 The zero_pages file is read-only and specifies number of zero >> 94 filled pages written to this disk. No memory is allocated for >> 95 such pages. >> 96 >> 97 What: /sys/block/zram<id>/orig_data_size >> 98 Date: August 2010 >> 99 Contact: Nitin Gupta <ngupta@vflare.org> >> 100 Description: >> 101 The orig_data_size file is read-only and specifies uncompressed >> 102 size of data stored in this disk. This excludes zero-filled >> 103 pages (zero_pages) since no memory is allocated for them. >> 104 Unit: bytes >> 105 >> 106 What: /sys/block/zram<id>/compr_data_size >> 107 Date: August 2010 >> 108 Contact: Nitin Gupta <ngupta@vflare.org> >> 109 Description: >> 110 The compr_data_size file is read-only and specifies compressed >> 111 size of data stored in this disk. So, compression ratio can be >> 112 calculated using orig_data_size and this statistic. >> 113 Unit: bytes >> 114 >> 115 What: /sys/block/zram<id>/mem_used_total >> 116 Date: August 2010 >> 117 Contact: Nitin Gupta <ngupta@vflare.org> >> 118 Description: >> 119 The mem_used_total file is read-only and specifies the amount >> 120 of memory, including allocator fragmentation and metadata >> 121 overhead, allocated for this disk. So, allocator space >> 122 efficiency can be calculated using compr_data_size and this >> 123 statistic. >> 124 Unit: bytes >> 125 41 What: /sys/block/zram<id>/mem_used_m 126 What: /sys/block/zram<id>/mem_used_max 42 Date: August 2014 127 Date: August 2014 43 Contact: Minchan Kim <minchan@kernel.org 128 Contact: Minchan Kim <minchan@kernel.org> 44 Description: 129 Description: 45 The mem_used_max file is write !! 130 The mem_used_max file is read/write and specifies the amount 46 the counter of maximum memory !! 131 of maximum memory zram have consumed to store compressed data. 47 compressed data. For resetting !! 132 For resetting the value, you should write "0". Otherwise, 48 "0". Otherwise, you could see !! 133 you could see -EINVAL. 49 Unit: bytes 134 Unit: bytes 50 135 51 What: /sys/block/zram<id>/mem_limit 136 What: /sys/block/zram<id>/mem_limit 52 Date: August 2014 137 Date: August 2014 53 Contact: Minchan Kim <minchan@kernel.org 138 Contact: Minchan Kim <minchan@kernel.org> 54 Description: 139 Description: 55 The mem_limit file is write-on !! 140 The mem_limit file is read/write and specifies the maximum 56 amount of memory ZRAM can use !! 141 amount of memory ZRAM can use to store the compressed data. The 57 The limit could be changed in !! 142 limit could be changed in run time and "0" means disable the 58 the limit. No limit is the ini !! 143 limit. No limit is the initial state. Unit: bytes 59 144 60 What: /sys/block/zram<id>/compact 145 What: /sys/block/zram<id>/compact 61 Date: August 2015 146 Date: August 2015 62 Contact: Minchan Kim <minchan@kernel.org 147 Contact: Minchan Kim <minchan@kernel.org> 63 Description: 148 Description: 64 The compact file is write-only 149 The compact file is write-only and trigger compaction for 65 allocator zrm uses. The alloca 150 allocator zrm uses. The allocator moves some objects so that 66 it could free fragment space. 151 it could free fragment space. 67 152 68 What: /sys/block/zram<id>/io_stat 153 What: /sys/block/zram<id>/io_stat 69 Date: August 2015 154 Date: August 2015 70 Contact: Sergey Senozhatsky <sergey.seno 155 Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> 71 Description: 156 Description: 72 The io_stat file is read-only 157 The io_stat file is read-only and accumulates device's I/O 73 statistics not accounted by bl 158 statistics not accounted by block layer. For example, 74 failed_reads, failed_writes, e 159 failed_reads, failed_writes, etc. File format is similar to 75 block layer statistics file fo 160 block layer statistics file format. 76 161 77 What: /sys/block/zram<id>/mm_stat 162 What: /sys/block/zram<id>/mm_stat 78 Date: August 2015 163 Date: August 2015 79 Contact: Sergey Senozhatsky <sergey.seno 164 Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> 80 Description: 165 Description: 81 The mm_stat file is read-only 166 The mm_stat file is read-only and represents device's mm 82 statistics (orig_data_size, co 167 statistics (orig_data_size, compr_data_size, etc.) in a format 83 similar to block layer statist 168 similar to block layer statistics file format. 84 169 85 What: /sys/block/zram<id>/debug_stat 170 What: /sys/block/zram<id>/debug_stat 86 Date: July 2016 171 Date: July 2016 87 Contact: Sergey Senozhatsky <sergey.seno 172 Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> 88 Description: 173 Description: 89 The debug_stat file is read-on 174 The debug_stat file is read-only and represents various 90 device's debugging info useful 175 device's debugging info useful for kernel developers. Its 91 format is not documented inten 176 format is not documented intentionally and may change 92 anytime without any notice. 177 anytime without any notice. 93 << 94 What: /sys/block/zram<id>/backing_de << 95 Date: June 2017 << 96 Contact: Minchan Kim <minchan@kernel.org << 97 Description: << 98 The backing_dev file is read-w << 99 device for zram to write incom << 100 For using, user should enable << 101 << 102 What: /sys/block/zram<id>/idle << 103 Date: November 2018 << 104 Contact: Minchan Kim <minchan@kernel.org << 105 Description: << 106 idle file is write-only and ma << 107 If system has mounted debugfs, << 108 are idle via /sys/kernel/debug << 109 << 110 What: /sys/block/zram<id>/writeback << 111 Date: November 2018 << 112 Contact: Minchan Kim <minchan@kernel.org << 113 Description: << 114 The writeback file is write-on << 115 huge page writeback to backing << 116 << 117 What: /sys/block/zram<id>/bd_stat << 118 Date: November 2018 << 119 Contact: Minchan Kim <minchan@kernel.org << 120 Description: << 121 The bd_stat file is read-only << 122 statistics (bd_count, bd_reads << 123 similar to block layer statist << 124 << 125 What: /sys/block/zram<id>/writeback_ << 126 Date: November 2018 << 127 Contact: Minchan Kim <minchan@kernel.org << 128 Description: << 129 The writeback_limit_enable fil << 130 eanbe of writeback_limit featu << 131 No limit "0" is the initial st << 132 << 133 What: /sys/block/zram<id>/writeback_ << 134 Date: November 2018 << 135 Contact: Minchan Kim <minchan@kernel.org << 136 Description: << 137 The writeback_limit file is re << 138 amount of writeback ZRAM can d << 139 in run time. << 140 << 141 What: /sys/block/zram<id>/recomp_alg << 142 Date: November 2022 << 143 Contact: Sergey Senozhatsky <senozhatsky << 144 Description: << 145 The recomp_algorithm file is r << 146 or show secondary compression << 147 << 148 What: /sys/block/zram<id>/recompress << 149 Date: November 2022 << 150 Contact: Sergey Senozhatsky <senozhatsky << 151 Description: << 152 The recompress file is write-o << 153 with secondary compression alg << 154 << 155 What: /sys/block/zram<id>/algorithm_ << 156 Date: August 2024 << 157 Contact: Sergey Senozhatsky <senozhatsky << 158 Description: << 159 The algorithm_params file is w << 160 compression algorithm paramete <<
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.