简体   繁体   English

编年史地图和码头集装箱?

[英]Chronicle map and docker containers?

Want to ask linux gurus if Chronicle can share state (be used) between docker containers on one host machine.想问问 linux 大师 Chronicle 是否可以在一台主机上的 docker 容器之间共享状态(被使用)。 Just an assumption: since chronicle uses memory mapped files and we can share (probably?) the same host's filesystem between containers we can probably use ChronicleMap functionality?只是一个假设:由于编年史使用内存映射文件,我们可以在容器之间共享(可能?)同一个主机的文件系统,我们可能可以使用 ChronicleMap 功能? Not sure about inter-container synchronization though... Does anybody have any thoughts?虽然不确定容器间同步......有人有什么想法吗?

Docker is not supported, but in theory it could work provided.不支持 Docker,但理论上它可以工作。

since chronicle uses memory mapped files and we can share (probably?) the same host's filesystem between containers we can probably use ChronicleMap functionality?由于编年史使用内存映射文件,我们可以在容器之间共享(可能?)同一个主机的文件系统,我们可能可以使用 ChronicleMap 功能?

They would have to be on the same physical machine.它们必须在同一台物理机器上。 Sharing between machines requires replication.机器之间的共享需要复制。

Not sure about inter-container synchronization though... Does anybody have any thoughts?虽然不确定容器间同步......有人有什么想法吗?

I would start by using replication and switch to a single copy if this becomes supported.如果支持,我将首先使用复制并切换到单个副本。

I feel weird saying Peter Lawery is wrong, and perhaps it wasn't supported in 2015, but chronicle map works fine in docker.我觉得很奇怪说 Peter Lawery 是错误的,也许它在 2015 年不受支持,但编年史地图在 docker 中工作正常。 As long as you mount the directory on the host of your persisted map into the containers.只要您将持久化映射主机上的目录挂载到容器中。

One thing to note, the memory limit of the docker container needs to be higher than the Xmx of a regular JVM for the same chronicle map.需要注意的一点是,对于相同的历史记录地图,docker 容器的内存限制需要高于常规 JVM 的 Xmx。

From this post: 从这篇文章:

Note: file and shmem may be shared among other cgroups.注意:file 和 shmem 可以在其他 cgroup 之间共享。 In that case, mapped_file is accounted only when the memory cgroup is owner of page cache.在这种情况下,仅当内存 cgroup 是页面缓存的所有者时,才考虑映射文件。

We found that filling the map was extremely slow (500x slower) if the memory limit of the container wasn't high enough for the whole off heap map.我们发现,如果容器的内存限制对于整个堆外映射来说不够高,则填充映射非常慢(慢 500 倍)。 iostat would imply chronicle maybe has to read large portions of the file to page in a portion of it? iostat 会暗示编年史可能必须读取文件的大部分内容才能在其中的一部分中找到页面?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM