Can you clarify first why, if your memory needs are increasing, you LOWERED the max heap from 25 to 20g?
And second, if your goal is indeed to determine why your memory use is increasing, fiddling with jvm tuning knobs seems the wrong approach. You'd instead want to find either what specifically is using more memory, or what has changed over time.
As for "what is using memory", have you confirmed if it's indeed the heap USE that is increasing? Meaning, if you do a gc, what does the usage fall to? Then some hours later (assuming jboss has not restarted), repeat that. Is the low point after a gc increasing or not? If it's not, then heap use is not increasing and so not seemingly a problem.
You might instead be looking only at the OS tracking of the size of the jboss or Java process. Just beware that reflects memory ALLOCATED rather than used (see above). And that could well be non-heap memory, like meta space. There are ways to observe how THAT is being used over time. And addressing that would be different from dealing with increased heap use.
Then as for what could be CAUSING the change in memory use you feel has happened over time, you may say also that "nothing has changed" in those months. But if you're referring to your configuration, I'd turn your attention to your web traffic. Since this is a jboss app, I'd ask: is ANY aspect of the site or sites open to the web? Even if a "login is required"?
Assuming it IS open to the web, I've helped many folks determine that they're incoming traffic is dramatically changing in volume and nature due to spiders, bots, hackers, and more. (And even an intranet app could be attacked from within the network.) Just the increase in traffic--whether successful or failing--could drive up memory use as your app tries to respond to that traffic.
And you can do such "traffic" investigation via web server logs, but using an APM would generally be more effective. Of course, the latter won't help in discerning a change from the past if you're just installing it, but it would help compare now to later, if you remain unable to resolve things readily.
Or maybe the ycrash folks or others will have different suggestions.
I'd appreciate if you'd reply with any thoughts, to let us know if you've considered mine here.
Edit your Comment