streamnative / function-mesh

The serverless framework purpose-built for event streaming applications.
https://functionmesh.io/
Apache License 2.0
210 stars 27 forks source link

optimize jvm parameters #708

Closed nlu90 closed 9 months ago

nlu90 commented 9 months ago

(If this PR fixes a github issue, please add Fixes #<xyz>.)

Fixes #

(or if this PR is one task of a github issue, please add Master Issue: #<xyz> to link to the master issue.)

Master Issue: #

Motivation

Reducing resource requirements and improving the process stability.

Modifications

  1. Allocate JVM memory based on the container memory and percentage. By default, the direct memory equals the max percentage. So the final allocation is 40% max heap + 40% max direct memory + 20% misc.
  2. Turn on GC logs
  3. Turn on heapdump

Describe the modifications you've done.

Verifying this change

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

Documentation

Check the box below.

Need to update docs?

github-actions[bot] commented 9 months ago

@nlu90:Thanks for your contribution. For this PR, do we need to update docs? (The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)