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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Create turbocharged storage using tmpfs

13 点作者 seancron超过 13 年前

2 条评论

georgebashi超过 13 年前
I've seen this tip a few times before, but have always wondered: isn't this what the OS disk cache should do? One of the "possible uses" is:<p><i>What if you're an internet host and you want to show off your massive bandwidth by having users download a dummy .bin file of 100MB. You'll find that if many users access this file at the same time, your hard drive becomes the slow factor and you're running into disk IO problems.</i><p>Surely the OS should keep this 100MB around, rather than re-reading it from the disk over and over? By keeping it in tmpfs, aren't you just "locking" the file in RAM, and defeating whatever "optimal" choice the OS is making over what files to keep around? Isn't this something better done by vmtouch? (<a href="http://hoytech.com/vmtouch/" rel="nofollow">http://hoytech.com/vmtouch/</a>)
评论 #3559869 未加载
Adrock超过 13 年前
As was already pointed out, you're often better off relying on the OS disk cache.<p>One situation that I've had a good use for tmpfs was when watching videos on my non-SSD-equiped laptop on a long flight. I'd copy the video to tmpfs and then force the hard drive to spin down. It had a measurable impact on battery life.