Skip to content

Adding support for memory swap settings for services#37872

Closed
wk8 wants to merge 2 commits intomoby:masterfrom
wk8:wk8/memory_flags_for_swarm
Closed

Adding support for memory swap settings for services#37872
wk8 wants to merge 2 commits intomoby:masterfrom
wk8:wk8/memory_flags_for_swarm

Conversation

@wk8
Copy link
Contributor

@wk8 wk8 commented Sep 18, 2018

- What I did

Adds support for memory swap options in services. That includes the API
plumbing, reflected in the API's doc. Added unit tests on the new feature.

- How I did it
Adds 2 new fields to service container specs, equivalent to docker run's
--memory-swap and --memory-swappiness.

- How to verify it
Includes integration tests.

- Related issues
#34654

- Description for the changelog

Adds support for memory swap options in services.

@cpuguy83
Copy link
Member

Let's be careful about how we expose these settings.
These are very low level and platform specific, and often confusing to users.

@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from 24dcec3 to 79035b9 Compare September 22, 2018 21:30
@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "wk8/memory_flags_for_swarm" [email protected]:wk8/moby.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354426360
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Sep 22, 2018
@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from 79035b9 to 6e825ea Compare September 22, 2018 21:53
@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Sep 22, 2018
@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from 478cc07 to 1a29d63 Compare September 23, 2018 22:33
@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Sep 23, 2018
@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from bf27614 to d7c123b Compare September 24, 2018 00:34
@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Sep 24, 2018
@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from b03fc60 to a3ecf6e Compare September 24, 2018 16:18
@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Sep 24, 2018
@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from a3ecf6e to 7d740c0 Compare September 24, 2018 16:21
@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Sep 24, 2018
@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from 7d740c0 to 7a1f141 Compare September 24, 2018 16:42
@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Sep 24, 2018
@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from 7a1f141 to 1aa7385 Compare September 24, 2018 16:44
@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Sep 24, 2018
@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from 1aa7385 to 2a6f9ea Compare September 24, 2018 16:47
@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Sep 24, 2018
@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from 2a6f9ea to 2cb44ac Compare September 24, 2018 17:05
@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Sep 24, 2018
@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from 2cb44ac to 4a05d9b Compare September 24, 2018 17:29
@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Sep 24, 2018
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anshulpundir that's the failing test. No timing issue at all :( it's set to -1 when failing...

@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from 4a05d9b to f744db0 Compare September 24, 2018 18:46
@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Sep 24, 2018
@wk8
Copy link
Contributor Author

wk8 commented May 30, 2019

@thaJeztah & @cpuguy83 : before I do the changes outlined in #37872 (comment), could you please validate that https://github.com/docker/swarmkit/pull/2865/files#diff-2825f8c43cd6822a89834c265124fe46 looks good to you, and that this shape for the Limits/Resources structs should be the final one, and won't need to be changed another time? Thanks.

@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from 25a29c4 to ee3144f Compare June 4, 2019 23:36
@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch 7 times, most recently from b709d06 to 05eb1d6 Compare July 29, 2019 22:35
@wk8 wk8 force-pushed the wk8/memory_flags_for_swarm branch from 05eb1d6 to 02e3d3c Compare July 29, 2019 22:40
@david-yu
Copy link

Is this ready to merge?

@sonickenbaker
Copy link

Any update on this one?

@m-barthelemy
Copy link

Hi, is this still being worked on?

@Me1kaa
Copy link

Me1kaa commented Nov 10, 2020

Any progress here?

@mhaddadi
Copy link

mhaddadi commented Apr 9, 2021

Hi, just wondering if this PR is still in progress as it would be useful to be able to deactivate swapping in swarm mode ?
Thanks

@everyx
Copy link

everyx commented Sep 20, 2022

Any update?

@D0wn3r
Copy link

D0wn3r commented Apr 4, 2023

Still not possible to deactivate swap ?

@crowley666x
Copy link

Any update?

@rickpeters
Copy link

Anybody still out here....?

@futureecomavi
Copy link

Is anything happening with this?

@demaniak
Copy link

Has there been any further traction on this?

@Ruppsn
Copy link

Ruppsn commented Jul 31, 2025

Has there been any further traction on this till now??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.