提问人:JayabalanAaron 提问时间:9/11/2023 更新时间:9/11/2023 访问量:172
针对低内存和 CPU 系统优化 Firefox / Chromium
Optimize Firefox / Chromium for low memory and cpu systems
问:
除了针对低内存和 CPU 自动配置之外,还可以修改/添加哪些设置来优化 Firefox/Chromium 以针对低内存/CPU 系统(如 raspberry pi4)或类似配置设备?
答:
-1赞
JayabalanAaron
9/11/2023
#1
对于 ,后续调整似乎具有更灵敏的效果,占用内存的时间更长。Firefox
# firefox memory optimize, to be set in about:config or user.js in firefor profile dir
browser.tabs.animate –>disable
browser.cache.memory.capacity –>0
javascript.options.jit.chrome –>true
javascript.options.jit.content –>true
network.http.pipelining –>true
network.http.proxy pipelining –>true
plugin.expose_full_path –>true
browser.tabs.remote.autostart
dom.ipc.processCount ->2
toolkit.cosmeticAnimations.enabled ->false
browser.sessionhistory.max_total_viewers ->4
browser.sessionhistory.max_entries ->10
browser.sessionstore.interval ->60000
dom.max_script_run_time
browser.cache.disk.capacity ->50000
browser.cache.offline.capacity ->512000
除了 https://github.com/pyllyukko/user.js 的设置之外,禁用许多功能和强化安全性似乎可以节省 CPU 和内存占用。
对于 ,以下调整具有类似的效果:Chromium
# following need to be passed as commandline args to chromium
## process count
--process-per-site
# or
--single-process # bad in terms of security
## hardware accel
--ignore-gpu-blocklist # use with care, gpu may not be support and cause instability
--enable-gpu-rasterization
--enable-zero-copy
## video decode
--disable-features=UseSkiaRenderer
--enable-features=+VaapiVideoDecoder
--enable-features=+CanvasOopRasterization
## use opengl
--use-gl=egl
## or vulkan if supported (will disable gl)
--enable-features=+Vulkan
此外,将用户/缓存数据目录设置为 tmpfs (RAM) 并使用 来恢复会话之间的持久性,尽管这种方法更适用于节省基于 cpu 和 sdcard 写入的故障,而不是节省内存。profile-sync-daemon
--user-data-dir=/tmp/.chromium-user-data
--disk-cache-dir=/tmp/.chromium-cache
请随时提出替代方案或补充建议。
评论