Skip to content

[INLONG-8251][Agent] Add global memory limit for file collect#8253

Merged
dockerzhang merged 11 commits intoapache:masterfrom
justinwwhuang:develop
Jun 16, 2023
Merged

[INLONG-8251][Agent] Add global memory limit for file collect#8253
dockerzhang merged 11 commits intoapache:masterfrom
justinwwhuang:develop

Conversation

@justinwwhuang
Copy link
Contributor

Prepare a Pull Request

add global memory limit for file collect

Motivation

in some cases the jvm heap limits to 256m, but we need to collect more than 1001g files at the same time, that causes oom. maybe the file type would frequently change, but we dont want to change the configure all the time. so i just add the global memory limit no longer by the message count but by the total data len*

Modifications

add global memeory limit for file collect, for three module: reader, channel and writer. the way to limit is semaphore

Verifying this change

(Please pick either of the following options)

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

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

  • This change added tests and can be verified as follows:

    (example:)

    • Added integration tests for end-to-end deployment with large payloads (10MB)
    • Extended integration test for recovery after broker failure

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation

@justinwwhuang justinwwhuang reopened this Jun 15, 2023
@dockerzhang dockerzhang changed the title [INLONG-8251][agent] add global memory limit for file collect [INLONG-8251][Agent] Add global memory limit for file collect Jun 15, 2023
@dockerzhang dockerzhang requested review from EMsnap and pocozh June 15, 2023 07:10
Copy link
Contributor

@luchunliang luchunliang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@healchow healchow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@EMsnap EMsnap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

Copy link
Contributor

@doleyzi doleyzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dockerzhang dockerzhang merged commit 32e29b8 into apache:master Jun 16, 2023
@justinwwhuang justinwwhuang deleted the develop branch June 16, 2023 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improve][Agent] Add global memory limit for file collect

6 participants