Skip to content

Commit 47e1234

Browse files
committed
fix (about_Swap_on_linux): fix picture description
1 parent 035d639 commit 47e1234

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

content/posts/about_swap_on_linux/index.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,13 @@ title = '关于Linux的swap那些事情'
8383
`ZRAM`:不仅仅是内存压缩,实际上块设备可以格式化来存东西。
8484

8585
## 观察
86-
8786
![zswap](zswap.webp)
8887

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

9194
---
9295

-708 Bytes
Loading

0 commit comments

Comments
 (0)