-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Add memory.kernelTCP support for linux #37043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This requires bumping up API version? |
api/types/container/host_config.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KernelMemoryTCP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DaemonInfo.KernelMemoryTCPLimit?
@AkihiroSuda Updated. Please take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also update https://github.com/moby/moby/blob/master/docs/api/version-history.md
15d1a14
to
66b32fe
Compare
Codecov Report
@@ Coverage Diff @@
## master #37043 +/- ##
=========================================
Coverage ? 36.13%
=========================================
Files ? 610
Lines ? 45219
Branches ? 0
=========================================
Hits ? 16340
Misses ? 26642
Partials ? 2237 |
@AkihiroSuda The PR has been updated. Please take a look. |
daemon/daemon_unix.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!= 0
as in KernelMemory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AkihiroSuda The PR has been updated. Please take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Design and Code LGTM 👼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some nits; generally this looks good to me.
I'm curious (n00b warning ahead):
- how does this relate to general "memory" limits for the container? I take it this is outside of that limit? (i.e., a container with a memory limit can still exhaust the host by consuming memory for TCP)?
- Would there be some "formula" we can apply so that there's an easy way to set all memory constraints in one go (in addition to per type) - similar to how we added the
--cpus
option for services? - I assume we want to add this option for services as well?
api/types/container/host_config.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" (in bytes)" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @yongtang
api/swagger.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" in bytes" ?
daemon/daemon_unix.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we anticipate adding this to docker container update
as well, we need to think how to reset this
Update: I was wrong, it's a separate limit, not accounted into kmem |
Discussing in the maintainers meeting; how this relates to @kolyshkin will also look into the questions I put above (unless @yongtang has the answers 😄) |
could you rebase? |
This fix tries to address the issue raised in 37038 where there were no memory.kernelTCP support for linux. This fix add MemoryKernelTCP to HostConfig, and pass the config to runtime-spec. Additional test case has been added. This fix fixes 37038. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
8c674ba
to
ee74cd7
Compare
@thaJeztah @AkihiroSuda The PR has been rebased. Please take a look and see if it is ready? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@yongtang some CI issues
|
The swagger failure is due to swagger-gen using a map, therefore randomizing the order 😞 (that's being addressed by #36714, but it stalled, so will have to be carried) |
@thaJeztah oohhh 😱 🙀 😅 |
Failure is now due to a known flaky test #32673
everything else passed, so I'll merge |
- What I did
This fix tries to address the issue raised in #37038 where
there were no memory.kernelTCP support for linux.
- How I did it
This fix add MemoryKernelTCP to HostConfig, and pass
the config to runtime-spec.
- How to verify it
Additional test case has been added.
- Description for the changelog
This fix fixes #37038.
Signed-off-by: Yong Tang yong.tang.github@outlook.com