Skip to content

Support for specifying JAVA_OPTS statically that effect Memory Calculations in a buildpack fork #423

@youngm

Description

@youngm

I've finally got some time to look at v4.0 and here is some feedback.

I would like to be able to specify some default memory parameters statically in the buildpack itself for my fork. I presumed that if I put some memory in the java_opts.yml it would get included in memory calculations but it appears it doesn't.

My particular use case is that I'd like to start everyone out with a default stack size of -Xss256K. With a thread count of 300, 256K can save a couple of hundred meg of heap for the app.

Best case scenario, if the user specifies a custom -Xss in their JAVA_OPTS environment variable I'd like it to override my default. If that is too tricky then I could live with them overriding the default config in a buildpack config environment variable.

If inclined to use java_opts.yml for this, the only mildly tricky thing about that I specify other baseline settings in there like -XX:+UseG1GC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=25 -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true Users who need to simply override -Xss by replaceing java_opts.yml config may not know that they are inadvertently replacing this other standard config.

Thoughts?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions