Use MCR with Docker Swarm¶
Swarm overview¶
Mirantis Container Runtime (MCR) supports the use of Docker Swarm.
The following Docker documentation topics offer detailed information that can help you to run MCR in swarm mode:
Compose Deploy specification (Swarm) — stack and long-form service definitions
Swarm service memory and OOM tuning¶
Swarm mode offers the same broad capabilities as upstream Docker Engine for services and stacks, including networking, placement, secrets, volumes, and the full set of options on docker service create and docker service update.
Used alongside --limit-memory, CPU limits, and other supported options, the following additional flags provide more fine-grained service resource control:
Flag |
Description |
|---|---|
Constrains how much disk-backed swap can back a task when physical memory is exhausted. Allowing swap can keep a service running but often increases latency; disabling or tightening swap can make performance more predictable at the cost of earlier failure under pressure. |
|
Influences how aggressively the kernel can move anonymous pages to swap, which affects responsiveness versus reclaim behavior. |
|
Tunes the host out-of-memory killer’s preference for terminating task processes relative to other processes, so you can favor critical services or deprioritize expendable ones. |
These settings interact with cgroup configuration, kernel behavior, and other resource limits.
Tip
Try out your changes in a test environment and validate under realistic load before making a broad rollout.
When you create or update a service, combine the additional flags with --limit-memory, any other resource options, and the rest of the service definition that the workload requires.
For current flag names, defaults, accepted values, and units, run:
docker service create --help
docker service update --help