1e98419c2SNitin GuptaWhat: /sys/block/zram<id>/disksize 2e98419c2SNitin GuptaDate: August 2010 3e98419c2SNitin GuptaContact: Nitin Gupta <ngupta@vflare.org> 4e98419c2SNitin GuptaDescription: 5e98419c2SNitin Gupta The disksize file is read-write and specifies the disk size 6e98419c2SNitin Gupta which represents the limit on the *uncompressed* worth of data 7e98419c2SNitin Gupta that can be stored in this disk. 851d8a7b0SBernhard M. Wiedemann Unit: bytes 9e98419c2SNitin Gupta 10e98419c2SNitin GuptaWhat: /sys/block/zram<id>/initstate 11e98419c2SNitin GuptaDate: August 2010 12e98419c2SNitin GuptaContact: Nitin Gupta <ngupta@vflare.org> 13e98419c2SNitin GuptaDescription: 1451d8a7b0SBernhard M. Wiedemann The initstate file is read-only and shows the initialization 15e98419c2SNitin Gupta state of the device. 16e98419c2SNitin Gupta 17e98419c2SNitin GuptaWhat: /sys/block/zram<id>/reset 18e98419c2SNitin GuptaDate: August 2010 19e98419c2SNitin GuptaContact: Nitin Gupta <ngupta@vflare.org> 20e98419c2SNitin GuptaDescription: 2151d8a7b0SBernhard M. Wiedemann The reset file is write-only and allows resetting the 2251d8a7b0SBernhard M. Wiedemann device. The reset operation frees all the memory associated 23e98419c2SNitin Gupta with this device. 24e98419c2SNitin Gupta 25e98419c2SNitin GuptaWhat: /sys/block/zram<id>/num_reads 26e98419c2SNitin GuptaDate: August 2010 27e98419c2SNitin GuptaContact: Nitin Gupta <ngupta@vflare.org> 28e98419c2SNitin GuptaDescription: 29e98419c2SNitin Gupta The num_reads file is read-only and specifies the number of 30e98419c2SNitin Gupta reads (failed or successful) done on this device. 31e98419c2SNitin Gupta 32e98419c2SNitin GuptaWhat: /sys/block/zram<id>/num_writes 33e98419c2SNitin GuptaDate: August 2010 34e98419c2SNitin GuptaContact: Nitin Gupta <ngupta@vflare.org> 35e98419c2SNitin GuptaDescription: 36e98419c2SNitin Gupta The num_writes file is read-only and specifies the number of 37e98419c2SNitin Gupta writes (failed or successful) done on this device. 38e98419c2SNitin Gupta 39e98419c2SNitin GuptaWhat: /sys/block/zram<id>/invalid_io 40e98419c2SNitin GuptaDate: August 2010 41e98419c2SNitin GuptaContact: Nitin Gupta <ngupta@vflare.org> 42e98419c2SNitin GuptaDescription: 43e98419c2SNitin Gupta The invalid_io file is read-only and specifies the number of 44e98419c2SNitin Gupta non-page-size-aligned I/O requests issued to this device. 45e98419c2SNitin Gupta 468dd1d324SSergey SenozhatskyWhat: /sys/block/zram<id>/failed_reads 478dd1d324SSergey SenozhatskyDate: February 2014 488dd1d324SSergey SenozhatskyContact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> 498dd1d324SSergey SenozhatskyDescription: 508dd1d324SSergey Senozhatsky The failed_reads file is read-only and specifies the number of 518dd1d324SSergey Senozhatsky failed reads happened on this device. 528dd1d324SSergey Senozhatsky 538dd1d324SSergey SenozhatskyWhat: /sys/block/zram<id>/failed_writes 548dd1d324SSergey SenozhatskyDate: February 2014 558dd1d324SSergey SenozhatskyContact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> 568dd1d324SSergey SenozhatskyDescription: 578dd1d324SSergey Senozhatsky The failed_writes file is read-only and specifies the number of 588dd1d324SSergey Senozhatsky failed writes happened on this device. 598dd1d324SSergey Senozhatsky 60*beca3ec7SSergey SenozhatskyWhat: /sys/block/zram<id>/max_comp_streams 61*beca3ec7SSergey SenozhatskyDate: February 2014 62*beca3ec7SSergey SenozhatskyContact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> 63*beca3ec7SSergey SenozhatskyDescription: 64*beca3ec7SSergey Senozhatsky The max_comp_streams file is read-write and specifies the 65*beca3ec7SSergey Senozhatsky number of backend's zcomp_strm compression streams (number of 66*beca3ec7SSergey Senozhatsky concurrent compress operations). 67*beca3ec7SSergey Senozhatsky 68e98419c2SNitin GuptaWhat: /sys/block/zram<id>/notify_free 69e98419c2SNitin GuptaDate: August 2010 70e98419c2SNitin GuptaContact: Nitin Gupta <ngupta@vflare.org> 71e98419c2SNitin GuptaDescription: 72e98419c2SNitin Gupta The notify_free file is read-only and specifies the number of 73e98419c2SNitin Gupta swap slot free notifications received by this device. These 7451d8a7b0SBernhard M. Wiedemann notifications are sent to a swap block device when a swap slot 75e98419c2SNitin Gupta is freed. This statistic is applicable only when this disk is 76e98419c2SNitin Gupta being used as a swap disk. 77e98419c2SNitin Gupta 78e98419c2SNitin GuptaWhat: /sys/block/zram<id>/zero_pages 79e98419c2SNitin GuptaDate: August 2010 80e98419c2SNitin GuptaContact: Nitin Gupta <ngupta@vflare.org> 81e98419c2SNitin GuptaDescription: 82e98419c2SNitin Gupta The zero_pages file is read-only and specifies number of zero 83e98419c2SNitin Gupta filled pages written to this disk. No memory is allocated for 84e98419c2SNitin Gupta such pages. 85e98419c2SNitin Gupta 86e98419c2SNitin GuptaWhat: /sys/block/zram<id>/orig_data_size 87e98419c2SNitin GuptaDate: August 2010 88e98419c2SNitin GuptaContact: Nitin Gupta <ngupta@vflare.org> 89e98419c2SNitin GuptaDescription: 90e98419c2SNitin Gupta The orig_data_size file is read-only and specifies uncompressed 91e98419c2SNitin Gupta size of data stored in this disk. This excludes zero-filled 92e98419c2SNitin Gupta pages (zero_pages) since no memory is allocated for them. 93e98419c2SNitin Gupta Unit: bytes 94e98419c2SNitin Gupta 95e98419c2SNitin GuptaWhat: /sys/block/zram<id>/compr_data_size 96e98419c2SNitin GuptaDate: August 2010 97e98419c2SNitin GuptaContact: Nitin Gupta <ngupta@vflare.org> 98e98419c2SNitin GuptaDescription: 99e98419c2SNitin Gupta The compr_data_size file is read-only and specifies compressed 100e98419c2SNitin Gupta size of data stored in this disk. So, compression ratio can be 101e98419c2SNitin Gupta calculated using orig_data_size and this statistic. 102e98419c2SNitin Gupta Unit: bytes 103e98419c2SNitin Gupta 104e98419c2SNitin GuptaWhat: /sys/block/zram<id>/mem_used_total 105e98419c2SNitin GuptaDate: August 2010 106e98419c2SNitin GuptaContact: Nitin Gupta <ngupta@vflare.org> 107e98419c2SNitin GuptaDescription: 108e98419c2SNitin Gupta The mem_used_total file is read-only and specifies the amount 109e98419c2SNitin Gupta of memory, including allocator fragmentation and metadata 110e98419c2SNitin Gupta overhead, allocated for this disk. So, allocator space 111e98419c2SNitin Gupta efficiency can be calculated using compr_data_size and this 112e98419c2SNitin Gupta statistic. 113e98419c2SNitin Gupta Unit: bytes 114