我需要docker实例不利用主机交换

发布于 2025-01-23 21:26:06 字数 180 浏览 3 评论 0 原文

我的服务器构建使用了每个容器的大量交换,我被告知Docker将主机交换用于实例。我的主机SSD仅为256GB,仅打算运行OS。我已经为Docker设置了一个ZFS池(9 TB和生长...),并希望它将其部分用于交换,因为每个实例都需要768K交换,我们计划运行4K实例。

如何配置Docker来利用某种自定义ZPOOL交换专用空间?

My server build uses a lot of swap per container and I am told that docker uses the host swap for instances. My host ssd is only 256gb and is only intended to run the OS. I have setup a zfs pool (9 Tb and growing...) for docker and wanted it to use a portion of it for swap since each instance needs 768k of swap and we plan on running 4k instances.

How can I configure docker to utilize some kind of custom zpool swap dedicated space?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

软糯酥胸 2025-01-30 21:26:06

您为什么不简单地禁用掉期?

  1. 用CAT /PROC /交换确定配置的交换设备和文件。
  2. 使用Swapoff -A关闭所有交换设备和文件。
  3. 删除在 /etc /fstab中找到的任何匹配参考。
  4. 可选:销毁步骤1中发现的任何交换设备或文件,以防止其重复使用。由于您担心泄漏敏感信息,因此您可能希望考虑执行某种安全的擦拭。
    Man Swapoff

(从这里

Why don't you simply disable the swap?

  1. Identify configured swap devices and files with cat /proc/swaps.
  2. Turn off all swap devices and files with swapoff -a.
  3. Remove any matching reference found in /etc/fstab.
  4. Optional: Destroy any swap devices or files found in step 1 to prevent their reuse. Due to your concerns about leaking sensitive information, you may wish to consider performing some sort of secure wipe.
    man swapoff

(from here https://serverfault.com/questions/684771/best-way-to-disable-swap-in-linux)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文