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

story: add max memory cap to pyston #73

Open
dPeS opened this issue Aug 3, 2021 · 2 comments
Open

story: add max memory cap to pyston #73

dPeS opened this issue Aug 3, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@dPeS
Copy link

dPeS commented Aug 3, 2021

I cannot tell CPython that memory is limited to value X. I run thousands of python workers @mesos stack where I need to pre slice the memory. That is big operation issue with python.

It will be killer feature to have something similar to "xmx" parameter in java world. I know that pyston won't free needed memory but it should be aware of max memory and make more pressure on GC work.

@kmod
Copy link
Contributor

kmod commented Aug 3, 2021

That's a really interesting idea! What would happen if you approach the memory limit? I would imagine that there is usually relatively little memory for the cycle collector to free since most memory management is done via refcounting, but maybe there are other space-time tradeoffs that could be adjusted.

@dPeS
Copy link
Author

dPeS commented Aug 5, 2021

What would happen if you approach the memory limit?

in java world GC is fired much more often + doing more careful work

In general python world has a lot of memory quirks (such [1]) - for my OPS point of view: runtime that is aware of memory limits would be large step forward. Right now we loose http requests while CPython is killed by mem limit on cgroup and I have no way to tell if it was: memory leak or legit memory allocation since "maybe GC was about to fire but didn't manage to" (because of oom kill).

[1] pandas-dev/pandas#2659 (comment)

@undingen undingen added the enhancement New feature or request label Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants