0

I have a Jetty application with a Jersey servlet. I am running continuous tests and see that the RES memory keeps increasing with top. I am using a threadpool in Jetty and setting max threads to 50. I do see Jetty recycling threads after some time since the ids keep going up like qtp1849433705-100. I believe this is ok or do I need some other setting?

I ran VisualVM to analyze if I have a leak. I ran it for a while and I see no apparent spikes either though the RES space gradually goes up. I ran a pmap too and do see several ``anon``` blocks but that doesn't give me a good sense if something is wrong.

Is there some other way to detect if I have a leak?

Visual VM

TGuy
  • 11
  • 1
  • Situation normal for Java and lightly loaded systems (like your screenshots show) - See https://stackoverflow.com/a/561450/775715 – Joakim Erdfelt Dec 18 '19 at 17:11
  • I would be less concerned if it was VIRT mem growing. Is there an upper limit till when the RSS can grow (does it grow till some percentage of Xmx)? As I understand it sums up majorly Heap+Code Cache+Stack+Threads. Could there be some other issue that is causing RSS to grow gradually, or is it that I am not hitting thresholds for JVM to stop growing? – TGuy Dec 18 '19 at 18:06
  • There's way more to it then that terse set of questions. The linked answer gives you a good rundown of how RSS behaves in the context of Java and how it behaves in the context of a lightly loaded system. – Joakim Erdfelt Dec 18 '19 at 18:40

0 Answers0