Skip to content
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

[feature request] pouch cli supports --memory-reservation #2701

Closed
zjumoon01 opened this issue Jan 29, 2019 · 4 comments · Fixed by #2860
Closed

[feature request] pouch cli supports --memory-reservation #2701

zjumoon01 opened this issue Jan 29, 2019 · 4 comments · Fixed by #2860
Labels
kind/feature kind/feature-request This is a feature request from community for PouchContainer

Comments

@zjumoon01
Copy link
Contributor

Why you need it?

Cgroup memory soft limit is a general feature. Docker command supports it with "--memory-reservation". Pouch CRI supports it via "memory_reservation" in LinuxContainerResources.

How it could be?

I'll be nice that pouch command supports --memory-reservation

Other related information

@pouchrobot pouchrobot added kind/feature kind/feature-request This is a feature request from community for PouchContainer labels Jan 29, 2019
@allencloud
Copy link
Collaborator

I think it is quite easy to make it in cli. Could you help to make it? @zjumoon01 🌥

@houstar
Copy link
Contributor

houstar commented Mar 18, 2019

I'll help to review this code 👍

@CodeJuan
Copy link
Contributor

CodeJuan commented May 23, 2019

Ⅱ. Describe what happened

./bin/pouch run -d --memory-reservation 4M busybox top
Error: unknown flag: --memory-reservation

Ⅲ. Describe what you expected to happen

# pouch run -d --memory-reservation 4M busybox top
58369a469f0579234538717575d0338eb969b4009c6136ef32b678c432d8c072

# pouch inspect -f {{.HostConfig.MemoryReservation}} 5836
4194304

# cat /sys/fs/cgroup/memory/default/58369a469f0579234538717575d0338eb969b4009c6136ef32b678c432d8c072/memory.soft_limit_in_bytes
4194304

@KevinBetterQ
Copy link
Contributor

#dibs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature kind/feature-request This is a feature request from community for PouchContainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants