All algorithm on zram occupy same amount RAM?
Posted: 2017-08-05 09:03
All algorithm on zram occupy same amount RAM?
Whether should I try report this as bug to Debian BTS?
Environment:
Test result(all " mem_used_total" field is same?):
./curscript:
Whether should I try report this as bug to Debian BTS?
Environment:
Code: Select all
$ uname -a
Linux debian 4.9.0-3-686-pae #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) i686 GNU/Linux
Code: Select all
$ source ./curscript
deflate
[deflate]write
536870912 bytes (537 MB, 512 MiB) copied, 14.0555 s, 38.2 MB/s
[deflate]mm_stat
536870912 3276800 16777216 0 16777216 0 0
[deflate](compacted)mm_stat
536870912 3276800 16777216 0 16777216 0 0
[deflate]read
536870912 bytes (537 MB, 512 MiB) copied, 1.72796 s, 311 MB/s
lzo
[lzo]write
536870912 bytes (537 MB, 512 MiB) copied, 2.6149 s, 205 MB/s
[lzo]mm_stat
536870912 5767168 16777216 0 16777216 0 0
[lzo](compacted)mm_stat
536870912 5767168 16777216 0 16777216 0 0
[lzo]read
536870912 bytes (537 MB, 512 MiB) copied, 1.34421 s, 399 MB/s
lz4hc
[lz4hc]write
536870912 bytes (537 MB, 512 MiB) copied, 14.5352 s, 36.9 MB/s
[lz4hc]mm_stat
536870912 3670016 16777216 0 16777216 0 0
[lz4hc](compacted)mm_stat
536870912 3670016 16777216 0 16777216 0 0
[lz4hc]read
536870912 bytes (537 MB, 512 MiB) copied, 1.54674 s, 347 MB/s
lz4
[lz4]write
536870912 bytes (537 MB, 512 MiB) copied, 2.62061 s, 205 MB/s
[lz4]mm_stat
536870912 3670016 16777216 0 16777216 0 0
[lz4](compacted)mm_stat
536870912 3670016 16777216 0 16777216 0 0
[lz4]read
536870912 bytes (537 MB, 512 MiB) copied, 1.5425 s, 348 MB/s
$
Code: Select all
test ()
{
algorithm=$1
sudo modprobe -r zram
sudo modprobe zram num_devices=1
echo ${algorithm} | sudo tee /sys/block/zram0/comp_algorithm
echo 512M |sudo tee /sys/block/zram0/disksize >/dev/null
echo \[${algorithm}\]write
yes 12 | sudo dd of=/dev/zram0 |& tail -n 1
echo \[${algorithm}\]mm_stat
cat /sys/block/zram0/mm_stat
echo 1 | sudo tee /sys/block/zram0/compact >/dev/null
echo 1 | sudo tee /proc/sys/vm/compact_memory >/dev/null
sleep 1
echo \[${algorithm}\]\(compacted\)mm_stat
cat /sys/block/zram0/mm_stat
echo \[${algorithm}\]read
sudo dd of=/dev/null if=/dev/zram0 |& tail -n 1
}
test deflate
test lzo
test lz4hc
test lz4