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

Improve base-line memory usage #3425

Merged
merged 2 commits into from Jan 25, 2017

Conversation

Projects
None yet
2 participants
@kroepke
Member

kroepke commented Jan 25, 2017

This change addresses both the changed memory profile of grizzly/jersey by switching back to its previous default as well as clearing out references to Message objects as early as possible during processing, to aid the garbage collector and preventing growing the old gen unnessarily.

Fixes #3423

kroepke added some commits Jan 25, 2017

force grizzly to use the HeapMemoryManager and not its default
the default switched to PooledMemoryManager which uses 10% of the heap for its pools by default
this creates too much old gen pressure for our purposes, so we switch back to the previous setting
clear messages in MessageEvent as soon as the processor is done with …
…them

this allows the garbage collector to eagerly collect those references and makes it less likely that the messages are promoted to the old gen (where they typically only increase memory pressure)
in the case of the output buffer the last set of messages in the ring would be help in memory, which can needlessly increase the memory footprint as well

@kroepke kroepke added this to the 2.2.0 milestone Jan 25, 2017

@bernd bernd self-assigned this Jan 25, 2017

@bernd

bernd approved these changes Jan 25, 2017

This fixes the problem!

image

LGTM 👍

@bernd bernd merged commit db68c6f into master Jan 25, 2017

4 checks passed

ci-web-linter Jenkins build graylog-pr-linter-check 1318 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details

@bernd bernd deleted the issue-3423 branch Jan 25, 2017

@bernd bernd removed the ready-for-review label Jan 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment