2025-09-26 22:49:00
每周五更新,所有的更新也会发送到我的频道
2025-09-22 22:21:00
每周五更新,所有的更新也会发送到我的频道
2025-09-17 19:07:00
zram 是 Linux 原生支持的内存压缩模块。它在内存里创建一个虚拟块设备,所有写入数据都会即时压缩存储。最常见用途是当作 swap 设备:比传统硬盘 swap 快十倍以上,同时大幅减少对磁盘的磨损。zram一般用于于树莓派、路由器等低配设备,但是在内存比较大的机器上使用zram,也可以增加一定的系统性能,减少系统的oom,简而言之,zram swap属于“开了没坏处,出事时极有用”的增强手段。
2025-09-17 19:07:00
zram is a native Linux memory compression module. It creates a virtual block device in memory, with all written data instantly compressed and stored. The most common use is as a swap device: it is more than ten times faster than traditional disk swap and significantly reduces disk wear. zram is often used on low-spec devices such as Raspberry Pi and routers, but even on machines with ample memory, enabling zram can boost performance and reduce out-of-memory issues. In short, zram swap is an enhancement that’s “harmless to enable, extremely useful in emergencies.”
2025-09-15 20:51:00
作为一个 YAML 开发工程师,很多人其实不知道 YAML 有个 Anchors 的功能。YAML Anchors 可以让你在一个地方定义一段内容,然后在文件的其他地方引用这段内容。这样可以让配置文件更加简洁,避免重复劳动,便于维护。