moby / moby/swarmkit

Add support for memswap_limit

Open
#3,187 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.7k
Forks
676
Avg merge
4d 9h
Merged PRs (30d)
6

Description

Currently Swap related options of standalone docker aren't available in Swarm Mode.

Docker compose supports top level(under service) element of memswap_limit, but using it with stack deploy causes error:

memswap_limit: Set resource limits using deploy.resources

and resources section doesnt's support either top level elements memswap_limit nor memswap.

I've tried it in deploy.resources.limits as well, but no success:

services.my_srv.deploy.resources.limits Additional property memswap is not allowed

Related to this closed(but not fixed) issue https://github.com/docker/compose/issues/7594#issuecomment-2521853318

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name source files or tests. Start by tracing how stack deploy validates deploy.resources and how Swarm Mode represents resource limits, then compare that path with the standalone Compose memswap_limit option. Done means a stack can specify the requested swap limit without validation errors and the setting is applied by Swarm.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devops, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.