做内存压缩,据说和OS X Mavericks的内存压缩类似 有没有人试用过效果? "I started using the zswap.enabled=1 kernel parameter and noticed a big improvement when waking up from hibernation on my Thinkpad X200 with 8GB RAM. The resuming process is much faster now."
zram才是内存压缩,这个貌似试压缩swap。
只想问ubuntu支持没。。。
/boot$ grep -i "zswap" config-3.11.0-12-generic CONFIG_ZSWAP=y /boot$ uname -a Linux x230-kuku 3.11.0-12-generic SMP Wed Oct 9 16:12:00 UTC 2013 i686 i686 i686 GNU/Linux /boot$ cat /etc/issue Ubuntu 13.10 \n \l
恩,是的,别误会,我也觉得lz4是极好的,也比较了一下时间~ 只是贴个数据提供下参考,刚那个结果贴错了~ test a million repeated characters: source len: 1000000 zipped len: 992 lz4ed len: 3936 zip ratio: 1008.06451613 lz4 ratio: 254.06504065 ratio zip/lz4: 3.96774193548 zip time: 0.00992608070374 lz4 time: 0.000288963317871 time zip/lz4: 34.350660066 ------------------------------ test in real world: source len: 574703 zipped len: 133373 lz4ed len: 194073 zip ratio: 4.3089905753 lz4 ratio: 2.96127230475 ratio zip/lz4: 1.45511460341 zip time: 0.023008108139 lz4 time: 0.00155091285706 time zip/lz4: 14.8352036895
可以计算下 MBytes/s 。这个是最有参考价值的。嗯
zip processing speed: 25.3951494393 MByte/s lz4 processing speed: 353.97936239 MByte/s processing speed lz4/zip: 13.9388572309 zip saving space speed: 19.4990332026 MByte/s lz4 saving space speed: 234.369320807 MByte/s saving space speed lz4/zip: 12.0195354494 恩,补充了一下。 节约CPU或者需要高速压缩的时候,用lz4就比较合适了。