We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 035d639 commit 47e1234Copy full SHA for 47e1234
content/posts/about_swap_on_linux/index.md
@@ -83,10 +83,13 @@ title = '关于Linux的swap那些事情'
83
`ZRAM`:不仅仅是内存压缩,实际上块设备可以格式化来存东西。
84
85
## 观察
86
-
87

88
89
-这是一个 `ZSWAP` 的 `htop` 图,其中深蓝色的一部分就是 `ZSWAP` 做的事情。其中 `266M` 的大部分都是压缩在内存中的,不过显示在了 `swap` 中。
+这是一个 `ZSWAP` 的 `htop` 图,`compressed` 和 `frontswap` 就是 `ZSWAP` 工作的事实。
+
90
+通过简单的计算可以得到压缩率是 26.3%,这也是配置 `zstd` 的典型压缩率范围。
91
92
+前置压缩虽然其实占用的是内存中的空间,但是这里算在 `swap` 里面了, `used` 里面的 `457M` 不包括前置交换,由于使用 `systemd` 禁用了 `ZSWAP` 使用系统交换空间,所以这里面的内容其实是内核使用的交换空间。
93
94
---
95
content/posts/about_swap_on_linux/zswap.webp
-708 Bytes
0 commit comments