Docker Container's Memory Swappiness value outside of documented range

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












When I do docker inspectI read that



Ubuntu 16.04.4 LTS
Docker version 17.05.0-ce, build 89658be
# GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
"MemorySwappiness": -1,


or



Ubuntu 17.10
Docker version 17.09.0-ce, build afdb6d4
GRUB_CMDLINE_LINUX=""
"MemorySwappiness": null,


However the Documentation states that it is a value between 0 and 100.
The second example might result from Swapping being disabled on the docker host.



  • Am I missing some paragraph of documentation?

  • Are these undocumented values cast to 0? Or 100?






share|improve this question






















  • Probably because your kernel doesn't support memory swap and memory limit ("By default, if you do not set --memory-swappiness, the value is inherited from the host machine.") - docs.docker.com/config/containers/resource_constraints/…
    – ponsfrilus
    Apr 26 at 11:15










  • Probably. But how can I inherit a value of -1 if valid values range from 0 to 100 The value appears to be undocumented or I appear to fail at reading :-)
    – Björn
    Apr 27 at 8:30










  • Apparently -1 is the default value, docker engine somehow also treats null as -1. Docker is made by human, you can open a git issue to ask them to better document this part.
    – storm
    Apr 30 at 9:23











  • Sorry forgot the link
    – storm
    Apr 30 at 9:25














up vote
1
down vote

favorite












When I do docker inspectI read that



Ubuntu 16.04.4 LTS
Docker version 17.05.0-ce, build 89658be
# GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
"MemorySwappiness": -1,


or



Ubuntu 17.10
Docker version 17.09.0-ce, build afdb6d4
GRUB_CMDLINE_LINUX=""
"MemorySwappiness": null,


However the Documentation states that it is a value between 0 and 100.
The second example might result from Swapping being disabled on the docker host.



  • Am I missing some paragraph of documentation?

  • Are these undocumented values cast to 0? Or 100?






share|improve this question






















  • Probably because your kernel doesn't support memory swap and memory limit ("By default, if you do not set --memory-swappiness, the value is inherited from the host machine.") - docs.docker.com/config/containers/resource_constraints/…
    – ponsfrilus
    Apr 26 at 11:15










  • Probably. But how can I inherit a value of -1 if valid values range from 0 to 100 The value appears to be undocumented or I appear to fail at reading :-)
    – Björn
    Apr 27 at 8:30










  • Apparently -1 is the default value, docker engine somehow also treats null as -1. Docker is made by human, you can open a git issue to ask them to better document this part.
    – storm
    Apr 30 at 9:23











  • Sorry forgot the link
    – storm
    Apr 30 at 9:25












up vote
1
down vote

favorite









up vote
1
down vote

favorite











When I do docker inspectI read that



Ubuntu 16.04.4 LTS
Docker version 17.05.0-ce, build 89658be
# GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
"MemorySwappiness": -1,


or



Ubuntu 17.10
Docker version 17.09.0-ce, build afdb6d4
GRUB_CMDLINE_LINUX=""
"MemorySwappiness": null,


However the Documentation states that it is a value between 0 and 100.
The second example might result from Swapping being disabled on the docker host.



  • Am I missing some paragraph of documentation?

  • Are these undocumented values cast to 0? Or 100?






share|improve this question














When I do docker inspectI read that



Ubuntu 16.04.4 LTS
Docker version 17.05.0-ce, build 89658be
# GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
"MemorySwappiness": -1,


or



Ubuntu 17.10
Docker version 17.09.0-ce, build afdb6d4
GRUB_CMDLINE_LINUX=""
"MemorySwappiness": null,


However the Documentation states that it is a value between 0 and 100.
The second example might result from Swapping being disabled on the docker host.



  • Am I missing some paragraph of documentation?

  • Are these undocumented values cast to 0? Or 100?








share|improve this question













share|improve this question




share|improve this question








edited Apr 30 at 9:15

























asked Apr 26 at 11:12









Björn

1066




1066











  • Probably because your kernel doesn't support memory swap and memory limit ("By default, if you do not set --memory-swappiness, the value is inherited from the host machine.") - docs.docker.com/config/containers/resource_constraints/…
    – ponsfrilus
    Apr 26 at 11:15










  • Probably. But how can I inherit a value of -1 if valid values range from 0 to 100 The value appears to be undocumented or I appear to fail at reading :-)
    – Björn
    Apr 27 at 8:30










  • Apparently -1 is the default value, docker engine somehow also treats null as -1. Docker is made by human, you can open a git issue to ask them to better document this part.
    – storm
    Apr 30 at 9:23











  • Sorry forgot the link
    – storm
    Apr 30 at 9:25
















  • Probably because your kernel doesn't support memory swap and memory limit ("By default, if you do not set --memory-swappiness, the value is inherited from the host machine.") - docs.docker.com/config/containers/resource_constraints/…
    – ponsfrilus
    Apr 26 at 11:15










  • Probably. But how can I inherit a value of -1 if valid values range from 0 to 100 The value appears to be undocumented or I appear to fail at reading :-)
    – Björn
    Apr 27 at 8:30










  • Apparently -1 is the default value, docker engine somehow also treats null as -1. Docker is made by human, you can open a git issue to ask them to better document this part.
    – storm
    Apr 30 at 9:23











  • Sorry forgot the link
    – storm
    Apr 30 at 9:25















Probably because your kernel doesn't support memory swap and memory limit ("By default, if you do not set --memory-swappiness, the value is inherited from the host machine.") - docs.docker.com/config/containers/resource_constraints/…
– ponsfrilus
Apr 26 at 11:15




Probably because your kernel doesn't support memory swap and memory limit ("By default, if you do not set --memory-swappiness, the value is inherited from the host machine.") - docs.docker.com/config/containers/resource_constraints/…
– ponsfrilus
Apr 26 at 11:15












Probably. But how can I inherit a value of -1 if valid values range from 0 to 100 The value appears to be undocumented or I appear to fail at reading :-)
– Björn
Apr 27 at 8:30




Probably. But how can I inherit a value of -1 if valid values range from 0 to 100 The value appears to be undocumented or I appear to fail at reading :-)
– Björn
Apr 27 at 8:30












Apparently -1 is the default value, docker engine somehow also treats null as -1. Docker is made by human, you can open a git issue to ask them to better document this part.
– storm
Apr 30 at 9:23





Apparently -1 is the default value, docker engine somehow also treats null as -1. Docker is made by human, you can open a git issue to ask them to better document this part.
– storm
Apr 30 at 9:23













Sorry forgot the link
– storm
Apr 30 at 9:25




Sorry forgot the link
– storm
Apr 30 at 9:25










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










-1 is a deprecated value. As you can see in this issue 0 is the new -1



https://github.com/moby/moby/pull/33898






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028376%2fdocker-containers-memory-swappiness-value-outside-of-documented-range%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    -1 is a deprecated value. As you can see in this issue 0 is the new -1



    https://github.com/moby/moby/pull/33898






    share|improve this answer
























      up vote
      0
      down vote



      accepted










      -1 is a deprecated value. As you can see in this issue 0 is the new -1



      https://github.com/moby/moby/pull/33898






      share|improve this answer






















        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        -1 is a deprecated value. As you can see in this issue 0 is the new -1



        https://github.com/moby/moby/pull/33898






        share|improve this answer












        -1 is a deprecated value. As you can see in this issue 0 is the new -1



        https://github.com/moby/moby/pull/33898







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 16 at 11:08









        Björn

        1066




        1066



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1028376%2fdocker-containers-memory-swappiness-value-outside-of-documented-range%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491