Linux 共享内存分配行为
首先是一些背景知识:我们使用本教程来放置我们的 Minecraft 世界文件夹(这不会Linux 共享内存文件夹内的大小(根据我们的设置,不会超过 150MB 左右)。我们使用 rsync 每 10 分钟将其备份到 HDD。这应该会减少 HDD(单个 1TB 驱动器)必须承受的 I/O 操作量。
我们昨天晚上设置了这个,但我们忘记了每个星期二晚上我们的备份程序也开始运行(它将整个服务器备份到网络上的另一台机器)。通常这不是问题,但这次我们的服务器陷入了昏迷。由于 RAM 不足,它开始交换内存。
现在我发现这有点奇怪,因为我认为共享内存只会在 RAM 上分配 150MB 来存储数据。安装了 4GB 后,您可能会认为这并不重要。
我的问题是:共享内存实际上在 RAM 上分配的空间与您放入其中的数据量一样多,还是它的行为有所不同(比如它保留了更大的块)?我很难在网上找到有关此的信息。
如果您能提供一些其他提示来说明服务器可能崩溃的原因,请提供。
First a little background: we used this tutorial to place our Minecraft world folder (which won't get bigger than 150MB or so with our settings) inside the Linux shared memory folder. We back it up every 10 minutes to the HDD using rsync. This should reduce the amount of I/O operations the HDD (a single 1TB drive) has to endure.
We set this up yesterday evening, but we forgot that every Tuesday night our backup program starts running too (which backs up the entire server to another machine on the network). Normally this isn't a problem, but this time our server went into a coma. It started swapping memory because it ran out of RAM.
Now I find this a little odd, since I'd think the shared memory would only allocate 150MB on the RAM to store the data on. With 4GB installed, you'd think that it doesn't matter that much.
My question is: does the Shared Memory actually allocate as much space on the RAM as the amount of data you put on it, or does it behave differently (like it reserves larger blocks)? I'm having a hard time finding info on the net about this.
If you could give some other tips on why the server might've freaked out, please do.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能可以通过使用找到您想要的
或者您可以使用更好的道路并创建一个单独的安装,并限制它:
HTH
PS:完全可以从 fstab 设置此安装,例如
You can probably find out what you want by using
Or you can use the better road and create a separate mount, and limit it:
HTH
PS: it is entirely possible to setup this mount from fstab, e.g.