TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Linux Performance: Why You Should Almost Always Add Swap Space

3 点作者 Supermighty大约 6 年前

2 条评论

ktpsns大约 6 年前
From my Linux desktop experience, I could not disagree more. When my 16GB ThinkPad runs out of memory, the OOM Killer blinks for a fraction of a second to kill the faulty process. If I had a swap partition, disk IO would render the system unusable for hours before the OOM Killer kicks in. Also, I don&#x27;t want my SSD lifetime be sacrificed for a neglectable amount of better RAM usage -- on the desktop, I either run out of memory quickly (because my code makes mistakes) or I never feel the reach for 16GB of RAM.<p>On the server the situation is very different, and a few GB Swap on a spinning disc might be a good idea even when having 128GB of RAM.
fs2大约 6 年前
Disagree, on most of my systems I don&#x27;t even have swap partition anymore. The few times I need it, I can just create a swap file on the fly and have any amount of swap memory.<p>Performance problems the author describes can be fixed 90% of the time by changing the dirty_background_ratio in the kernel as described here:<p><a href="https:&#x2F;&#x2F;linuxmaster.cc&#x2F;s&#x2F;improve_performance_and_fix_unresponsive_systems_under_heavy_diskio_load" rel="nofollow">https:&#x2F;&#x2F;linuxmaster.cc&#x2F;s&#x2F;improve_performance_and_fix_unrespo...</a>