简体   繁体   中英

Chronicle map and docker containers?

Want to ask linux gurus if Chronicle can share state (be used) between docker containers on one host machine. 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? Not sure about inter-container synchronization though... Does anybody have any thoughts?

Docker is not supported, but in theory it could work provided.

since chronicle uses memory mapped files and we can share (probably?) the same host's filesystem between containers we can probably use ChronicleMap functionality?

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. 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.

From this post:

Note: file and shmem may be shared among other cgroups. In that case, mapped_file is accounted only when the memory cgroup is owner of page cache.

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. iostat would imply chronicle maybe has to read large portions of the file to page in a portion of it?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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