Skip to content
This repository was archived by the owner on Jul 27, 2022. It is now read-only.
This repository was archived by the owner on Jul 27, 2022. It is now read-only.

swap_limit semantics are confusing #35

@nipun-sehrawat

Description

@nipun-sehrawat

Hello,

MemorySpec allows users to set 'swap_limit', whose value ultimately maps to memory.memsw.limit_in_bytes. This is a bit confusing as these two entities represent different things: swap_limit gives the impression that one can specify the limit of swap space available to the application, whereas memory.memsw.limit_in_bytes value is the sum of memory and swap usage.

So, if I were to create a container with 50M memory and no swap, it's config would currently look like:
memory {
limit: 50M
swap: 50M
}

whereas, the following captures the intent better:
memory {
limit: 50M
swap: 0
}

What do folks think? I can make the required change, if this change in semantics is acceptable to the authors. We can deprecate the proto field and introduce a new one that specifies just the swap limit.

Thanks,
Nipun

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions