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

Default JVM heap max size (-Xmx) should be increased #1269

Closed
pisymbol opened this issue Dec 13, 2019 · 3 comments
Closed

Default JVM heap max size (-Xmx) should be increased #1269

pisymbol opened this issue Dec 13, 2019 · 3 comments
Milestone

Comments

@pisymbol
Copy link

The 'seldon-container-engine' sidecar that is attached to every service runs as a Spring application that monitors and routes incoming prediction requests to the underlying wrapper service (in Python, that's the wrapped Flask application that calls your model class).

When the JVM runs out of heap, lots of weird and unexplainable problems occur. For example, I had one model that was processing large 4k images for classification and the JSON result was failing to serialize into a protobuf because of lack of heap. I had another instance where the model would fail fairly silently.

Raising the maximum heap size should not degrade slim deployments either IMO. All it does is allows the JVM to use more heap space if the container is given more memory. But I admit, I am not a Java expert nor do I drink coffee.

@pisymbol pisymbol added the triage Needs to be triaged and prioritised accordingly label Dec 13, 2019
@ukclivecox
Copy link
Contributor

By setting a max heap Java may keep growing to fill this up before doing a big GC. Need to check how this works with kubernetes requests and limits for memory

@ukclivecox ukclivecox removed the triage Needs to be triaged and prioritised accordingly label Dec 16, 2019
@ukclivecox ukclivecox added this to the 1.1 milestone Dec 16, 2019
@pisymbol
Copy link
Author

Don't you want that rather than crashing in unexpected ways?

How about this:

Can you auto discovery the amount of memory k8s allocates on container startup via some wrapper script that ultimately calls 'java' with the "right" CLI parameters? The container engine could I suppose just set a percentage of memory as a default for the heap.

@ukclivecox
Copy link
Contributor

We are moving to go and you can configure so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants