바라보다 zram 커널 문서우리는 /sys/block/zram0/comp_algorithm이 있어야 한다는 것을 알고 있습니다.
Examples:
#show supported compression algorithms
cat /sys/block/zram0/comp_algorithm
lzo [lz4]
#select lzo compression algorithm
echo lzo > /sys/block/zram0/comp_algorithm
하지만 내 물리적 호스트에 /sys/block/zram0/comp_algorithm 파일이 존재하지 않습니다. 이유는 무엇입니까?
#lsmod | grep zram
zram 18525 1
#ll /sys/block/zram0/
total 0
-r--r--r-- 1 root root 4096 Aug 15 11:43 alignment_offset
lrwxrwxrwx 1 root root 0 Aug 15 11:43 bdi -> ../../bdi/252:0
-r--r--r-- 1 root root 4096 Aug 15 11:43 capability
-r--r--r-- 1 root root 4096 Aug 15 11:43 compr_data_size
-r--r--r-- 1 root root 4096 Aug 15 11:43 dev
-r--r--r-- 1 root root 4096 Aug 15 11:43 discard_alignment
-rw-r--r-- 1 root root 4096 Aug 15 11:44 disksize
-r--r--r-- 1 root root 4096 Aug 15 11:43 ext_range
drwxr-xr-x 2 root root 0 Aug 15 11:43 holders
-r--r--r-- 1 root root 4096 Aug 15 11:43 inflight
-r--r--r-- 1 root root 4096 Aug 15 11:43 initstate
-r--r--r-- 1 root root 4096 Aug 15 11:43 invalid_io
-r--r--r-- 1 root root 4096 Aug 15 11:43 mem_used_total
-r--r--r-- 1 root root 4096 Aug 15 11:43 notify_free
-r--r--r-- 1 root root 4096 Aug 15 11:43 num_reads
-r--r--r-- 1 root root 4096 Aug 15 11:43 num_writes
-r--r--r-- 1 root root 4096 Aug 15 11:43 orig_data_size
drwxr-xr-x 2 root root 0 Aug 15 11:43 power
drwxr-xr-x 2 root root 0 Aug 15 11:43 queue
-r--r--r-- 1 root root 4096 Aug 15 11:43 range
-r--r--r-- 1 root root 4096 Aug 15 11:43 removable
--w------- 1 root root 4096 Aug 15 11:43 reset
-r--r--r-- 1 root root 4096 Aug 15 11:43 ro
-r--r--r-- 1 root root 4096 Aug 15 11:43 size
drwxr-xr-x 2 root root 0 Aug 15 11:43 slaves
-r--r--r-- 1 root root 4096 Aug 15 11:43 stat
lrwxrwxrwx 1 root root 0 Aug 15 11:43 subsystem -> ../../../../class/block
drwxr-xr-x 2 root root 0 Aug 15 11:43 trace
-rw-r--r-- 1 root root 4096 Aug 15 11:41 uevent
-r--r--r-- 1 root root 4096 Aug 15 11:43 zero_pages