• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

memory not GC'd after hours of sitting idle?

 
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have a couple of web servers running Tomcat 4.1.27 with j2sdk1.4.2_06, and on a little admin page, we print out the amount of total memory for the JVM and the amount of free memory. At the moment, I have the -Xmx and -Xms flags set to 768m (3/4 of a GB is what I'm going for), so the total is printing out at 799145984 bytes.

I used JMeter to run 200 threads against one of the app servers and it took several minutes to get the free memory down to 100 MB, and then about the same amount of time to push it under 50 MB. After sitting idle for about 6 hours, the sessions have all timed out and the free memory has climbed back up to 389221912 bytes. Why isn't it even higher than this? Most of the big stuff is stored in user sessions, and there aren't many global objects at all. Is the GC just not feeling pressure to do anything?

I didn't do much of anything with the other app server...just logged into a couple of users' sessions, and then parked a web browser on that admin page. Its total memory allocation is also 768 MB, but for some reason it now has only 86183104 bytes free! Another 3 minutes later, and I click refresh on the page and it's down to 77470448...all I or anyone else is doing is refreshing this one fairly simple page! It seems to go down every time I refresh the page. Isn't this bad? What do I check for? A couple of database reads are performed to display info on the page, but the number of open db connections in the pool isn't going up, so I don't think there's a leak there...

Thanks!
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm thinking this might be a Tomcat-specific issue?? So I'm going to move it to that forum, hopefully you'll get some good insight there.
 
Think of how dumb the average person is. Mathematically, half of them are EVEN DUMBER. Smart tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic