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

[DROOLS-7589] add memory occupation to session stats + optionally exit above memory threshold #93

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

mariofusco
Copy link
Member

@tkobayas These are the minor changes that I agreed with Madhu during yesterday's call. Even though the memory occupation doesn't belong to a single session but it's referred to the whole JVM, he said that it would be interesting to have that value reported among the session stats. In future, in case we will find more of these values referred to the entire system, we may want to add a proper SystemStats object and move also the memory stats there. Moreover he wanted the possibility to optionally kill the JVM when the memory threshold is reached. I'm not entirely sure if how I implemented this makes sense or there is a better alternative, so please double check it and feel free to propose better options.

@tkobayas
Copy link
Collaborator

I'm not entirely sure if how I implemented this makes sense or there is a better alternative, so please double check it and feel free to propose better options.

I confirmed with the load test (test_webhook.yml and test_webhook_source.py) that the ansible-rulebook process immediately exits with the log

...
Sequence 20670
Sequence 20671
2023-11-20 12:13:50 863 [main] ERROR org.drools.ansible.rulebook.integration.api.rulesengine.MemoryMonitorUtil - Memory occupation is above the threshold: 91% > 90%. MaxMemory = 536870912, UsedMemory = 489383144
(venv) [tkobayas ansible-rulebook]$

so, yeah, it works as one straightforward option.

@mariofusco mariofusco merged commit 855268f into kiegroup:main Nov 20, 2023
1 check passed
@mariofusco mariofusco deleted the d7589 branch November 20, 2023 07:27
mariofusco added a commit that referenced this pull request Jan 15, 2024
…t above memory threshold (#93)

(cherry picked from commit 855268f)
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

Successfully merging this pull request may close these issues.

2 participants