zram 压缩流_如何使用zram将Raspberry Pi的内存压缩50%以上

本文介绍了如何通过zram技术在Raspberry Pi上实现内存的压缩,以提高设备的内存利用率,达到节省内存资源的效果。
摘要由CSDN通过智能技术生成

zram 压缩流

Raspberry Pi and other single-board computers (SBCs) have always had minimal memory. At a maximum of 1GB in the Raspberry Pi 3, it was just sufficient to run lightweight programs and scripts. That trend held until the advent of the Raspberry Pi 4 with 2GB, 4GB and a few months later, 8GB models, opening doors to running databases and other memory intensive applications.

Raspberry Pi和其他单板计算机(SBC)始终具有最小的内存。 Raspberry Pi 3的最大容量为1GB,足以运行轻量级程序和脚本。 这种趋势一直持续到2GB4GB以及几个月后的8GB型号Raspberry Pi 4问世,为运行数据库和其他内存密集型应用程序打开了大门。

This shift is due in no small part to the explosive growth of the data industry, where previously the focus of SBCs was IoT and embedded applications and now the focus is slowly shifting towards data applications. Memory has also become cheaper over the years, allowing newer SBCs to have more memory while maintaining a similar price range.

这种转变在很大程度上是由于数据行业的爆炸性增长,以前SBC的重点是物联网和嵌入式应用程序,而现在的重点正在慢慢地转向数据应用程序。 多年来,内存也变得越来越便宜,从而使新型SBC可以拥有更多内存,同时保持相似的价格范围。

我的担忧 (My concerns)

With the Raspberry Pi 3 trending towards obsolescence, I got worried about how my 28-core Kraken cluster can stay relevant and useful for at least another year.

随着Raspberry Pi 3趋于过时的趋势,我担心我的28核Kraken集群如何在至少一年内保持相关性和有用性。

On the other hand, I’m secretly looking forward to deprecating the Kraken cluster as I’ve run into countless awkward situations where the system runs out of memory and all SSH sessions lock up while the kernel struggles for a good 10 minutes before panicking and forcing a reboot.

另一方面,我暗自希望弃用Kraken群集,因为我遇到了无数尴尬的情况,其中系统用尽了内存,所有SSH会话都被锁定,而内核在正常运行10分钟之前就出现了崩溃和崩溃。强制重启。

In fact, that happens to me about once a week! If you’ve run a good number of applications on the Raspberry Pi 3 before, I’m sure you share my pain.

实际上,这大约一周一次发生在我身上! 如果您以前在Raspberry Pi 3上运行过很多应用程序,那么我相信您会分担痛苦。

After a round of excavation in the depths of the Raspberry Pi forums, I found a glimmer of hope for the issues of impending obsolescence and restrictive memory capacity of the Raspberry Pi 3.

在Raspberry Pi论坛的深处进行了一轮挖掘之后,我发现了即将到来的Raspberry Pi 3过时和限制性内存容量问题的希望。

The solution is zram swap.

解决方案是zram swap

In this piece, I’ll demonstrate how you can use zram to increase the available memory by about 50% with negligible performance impact.

在本文中,我将演示如何使用zram将可用内存增加约50%,而对性能的影响却微不足道。

什么是zram? (What is zram?)

zram, formerly called compcache</

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值