问题标签 [tmpfs]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
60 浏览

docker - 为什么我没有对 /run 的 rw 访问权限,它在 docker 中作为 tmpfs 安装?

在这里,为什么tmpfs-mode=1777不单独应用于 /run ?
它适用于其他目录。
这里有什么具体原因吗?

0 投票
0 回答
69 浏览

linux - 具有世界可写权限的 docker tmpfs

我正在尝试使用只读文件系统启动容器,但特定文件夹(/app)需要是世界可写的。

在第一个容器启动时,这可以正常工作。

然后我停止了容器并再次启动它。这一次,/app不再是世界可写的。

为什么在第一个 ( drwxrwxrwt) 和后续 ( drwxr-xr-x) 容器实例上会出现这种差异?如何使这个永久世界可写?

0 投票
1 回答
37 浏览

ruby - Ruby tmpfs 仅持续到执行完成

有没有tmpfs一种解决方案可以让我写入 Ruby 的内存,它只会持续到该 ruby​​ 实例完成。

它在相同的脚本中被消耗,如下所示:

0 投票
0 回答
18 浏览

docker - Need help/advice docker shutdown SIGKILL

I have created a docker image which is based of arch-plex.

I created this image because I wanted to have the database in memory so Plex would be faster.

The image includes nightly copying the database as a backup to the config folder.

Now I need some advice for creating the backup when the container receives the SIGTERM signal when it's stopped or restarted. I already figured out how I can wait for the Plex service to die and start copying the database.

However you will get a incomplete backup if it takes longer than 10 seconds to create the backup. Because this is the default time before the SIGKILL signal is sent by docker.

Is there a way to keep the container alive untill the backup has finished, without increasing the timeout before SIGKILL is send? Meaning I would like to have the solution in the image.

I don't mind if I have to use another language than bash/shell, as long as it is a pre-compiled language.

0 投票
1 回答
160 浏览

kubernetes - Kubernetes:Pod 之间的内存共享缓存

我正在寻找在同一节点上的 pod 之间共享只读内存缓存的任何现有实现。这种设置将允许快速访问,而无需将整个缓存加载到每个 pod 内存中。

示例:1GB 查找字典保持最新,每个 pod 都具有对数据的读取访问权限,从而允许快速查找而无需有效地将数据克隆到内存中。所以最终结果将是节点上仅使用 1GB 内存,而不是 1GB * N(pod 数量)

k8s的想象解决方案:

  1. 具有 tmpfs 卷 RW 的单个(守护进程)pod,维护最新的缓存数据
  2. 具有相同 tmpfs 卷 R(only) 的多个 pod,映射数据文件以读取数据
    1. 自然地读出值并对其进行操作预计会产生传递内存使用

笔记:

  • 我发现了多个关于 pod 之间的卷共享的条目,但没有针对上述内容的完整解决方案参考
  • tmpfs 是 R/W 缓存速度的理想选择,但显然它可以超过常规 fs
  • 寻找可以是特定语言或不可知论的解决方案以供参考
    • 特定语言将利用特定语言将文件数据映射为字典/其他 KV 查找
    • 语言不可知和更通用的解决方案可以使用sqlite,在我们这里的例子中,进程是 pod