V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
wweir
V2EX  ›  Linux

zram 还真是个神器, macOS 和 Windows 有类似技术吗?

  •  
  •   wweir ·
    wweir · 2020-03-31 16:18:42 +08:00 · 4491 次点击
    这是一个创建于 1479 天前的主题,其中的信息可能已经有所发展或是发生改变。

    看了网上的介绍,要么是浅尝辄止,要么是死扣代码,能深入到参数配置及其影响的介绍很少,所以用得也是不爽。

    随便瞄了一眼内核的文档,这玩意居然可以做到扩大两倍可用内存大小,这样能做的事情就很多了,2G 变 6G 、4G 变 12G,即使为了性能有所克制,翻倍也是轻轻松松。

    相应的,可以永远跟 swap 说拜拜了,这对云上读写很差的小机器还是很有意义的。

    zram 文档

    6 条回复    2020-03-31 16:54:04 +08:00
    cheng6563
        1
    cheng6563  
       2020-03-31 16:24:11 +08:00 via Android
    Windows 10 只有自带内存压缩。
    12101111
        2
    12101111  
       2020-03-31 16:26:45 +08:00
    Vegetable
        3
    Vegetable  
       2020-03-31 16:29:09 +08:00
    想起了被 Jadx decompile 支配的恐惧
    764664
        4
    764664  
       2020-03-31 16:37:54 +08:00
    In June 2013, Apple announced that it would include virtual memory compression in OS X Mavericks, using the Wilson-Kaplan WKdm algorithm.
    A 10 August 2015 "Windows Insider Preview" update for Windows 10 (build 10525) added support for RAM compression.

    macOS 和 Windows 都有
    hcocoa
        5
    hcocoa  
       2020-03-31 16:42:28 +08:00
    cxh116
        6
    cxh116  
       2020-03-31 16:54:04 +08:00
    Mac 的 Activity Monitor 就有显示被压缩多少内存.

    不过内存不足时一样卡,开 Chrome 反正 16G 内存是不够用.现在买新电脑,感觉至少得 32G 内存起.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5492 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 03:28 · PVG 11:28 · LAX 20:28 · JFK 23:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.