如何使用zSwap提高系统性能(2)
如何使用zSwap提高系统性能
RAM中,只是通过压缩了。由于压缩和解压缩的速度远比读写I/O好,因此在移动终端设备广泛被应用。
zRram本身存在一些缺陷或问题:zRam大小是可灵活配置的,配置多少成为了一个问题;使用zRam可能会在低内存场景由于频繁的内存压缩导致kswapd进程占CPU高;增大了zRam配置,对系统内存碎片是否有影响
- zCache
zCache是oracle提出的一种实现文件页压缩技术,也是memory与block dev之间的一层存储,与zSwap比较接近,但zCache目前压缩的是文件页,而zSwap和zRAM压缩是匿名页。
介绍 zstd 压缩算法
Zstandard是一种实时压缩算法,提供高压缩率。它提供了非常广泛的压缩/速度权衡,同时有一个非常快的解码器支持。它还为小数据提供了一种特殊的模式,称为字典压缩,并可以从任何样本集中创建字典。Zstandard库是作为使用BSD许可证的开源软件提供的。
开启 zSwap 的方法
# edit grub as root
$ sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zswap.enabled=1 zswap.compressor=zstd zswap.zpool=z3fold"
# update grub
$ sudo update-grub
# install zstd and Z3fold
$ sudo apt install checkinstall build-essential
$ sudo apt install zstd # not the latest version
# edit the modules file
$ sudo vim /etc/initramfs-tools/modules
...
zstd
zstd_compress
z3fold
# update initramfs
$ sudo update-initramfs -u -k all
# restart PC and verify ZSWAP if enabled
$ cat /sys/module/zswap/parameters/enabled
Y
# verify ZSWAP if its using zstd and z3fold
$ sudo dmesg | grep -i zswap:
[ 1.059997] zswap: loaded using pool zstd/z3fold
# edit grub as root
$ sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash zswap.enabled=1 zswap.compressor=zstd zswap.zpool=z3fold"
# update grub
$ sudo update-grub
# install zstd and Z3fold
$ sudo apt install checkinstall build-essential
$ sudo apt install zstd # not the latest version
# edit the modules file
$ sudo vim /etc/initramfs-tools/modules
...
zstd
zstd_compress
z3fold
# update initramfs
$ sudo update-initramfs -u -k all
# restart PC and verify ZSWAP if enabled
$ cat /sys/module/zswap/parameters/enabled
Y
# verify ZSWAP if its using zstd and z3fold
$ sudo dmesg | grep -i zswap:
[ 1.059997] zswap: loaded using pool zstd/z3fold以上就是IT袋网带来的如何使用zSwap提高系统性能的详细介绍,您了解和帮助到您了吗?
相关阅读
-
一键ghost怎么操作 电脑上一键ghost是什么意思详情
今天为网友们详解电脑上一键ghost是什么意思详情的相关经验,关于电脑上一键ghost是什么意思详情 和 一键ghost怎么操作,如有不对的地方欢迎指正! 只要接触过系统,用户肯定都看到过一键
-
win10键盘快捷键用不了 win102004快捷键不能用了怎么办
小编为你讲解win102004快捷键不能用了怎么办方面的介绍,关于win10键盘快捷键用不了 win102004快捷键不能用了怎么办,接下来就是全面介绍。 我们在使用计算机的时候,有的情况下可能就会遇到
-
win10影子系统开不了机 win10安装影子系统后无法开机
小编为你解答win10影子系统开不了机的介绍,关于win10影子系统开不了机 win10安装影子系统后无法开机,接下来IT袋带大家一起了解。 在win10操作系统上安装了影子系统之后,可能部分IT袋的朋友
-
win10cf不全屏两侧黑边怎么办 cf去除两边黑屏的方法
全面的为大家介绍win10cf不全屏两侧黑边怎么办和cf去除两边黑屏的方法的教程内容,接下来就是全面介绍。 穿越火线很CF多朋友都喜欢玩,但是很多朋友重装系统之后穿越火线CF不能全屏是怎么


