Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8288243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:14:33+00:00 2026-06-08T12:14:33+00:00

I have a standalone Java application which has: -Xmx1024m -Xms1024m -XX:MaxPermSize=256m -XX:PermSize=256m Over the

  • 0

I have a standalone Java application which has:

-Xmx1024m -Xms1024m -XX:MaxPermSize=256m -XX:PermSize=256m

Over the course of time it hogs more and more memory, starts to swap(and slow down) and eventually died a number of times(not OOM+dump, just died, nothing on /var/log/messages).

What I’ve tried so far:

  1. Heap dumps: live objects take 200-300Mb out of 1G heap –> ok with heap
  2. Number of live threads is rather constant(~60-70) –> ok with thread stacks
  3. JMX stops answering at some point(mb it answers but timeout is lower)
  4. Turn off swap – it dies faster
  5. strace – seems everything slows down a bit, app still haven’t died, and not sure for which things look there
  6. Checking top: VIRT grows to 5.5Gb, RSS to 3.7 Gb
  7. Checking vmstat(obviously we start to swap):

     --------------------------procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
    Sun Jul 22 16:10:26 2012:  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
    Sun Jul 22 16:48:41 2012:  0  0 138652 2502504  40360 706592    1    0   169    21 1047  206 20  1 74  4  0
    . . . 
    Sun Jul 22 18:10:59 2012:  0  0 138648  24816  58600 1609212    0    0   124   669  913 24436 43 22 34  2  0
    Sun Jul 22 19:10:22 2012: 33  1 138644  33304   4960 1107480    0    0   100   536  810 19536 44 22 23 10  0
    Sun Jul 22 20:10:28 2012: 54  1 213916  26928   2864 578832    3  360   100   710  639 12702 43 16 30 11  0
    Sun Jul 22 21:10:43 2012:  0  0 629256  26116   2992 467808   84  176   278  1320 1293 24243 50 19 29  3  0
    Sun Jul 22 22:10:55 2012:  4  0 772168  29136   1240 165900  203   94   435  1188 1278 21851 48 16 33  2  0
    Sun Jul 22 23:10:57 2012:  0  1 2429536  26280   1880 169816 6875 6471  7081  6878 2146 8447 18 37  1 45  0
    
  8. sar also shows steady system% growth = swapping:

     15:40:02          CPU     %user     %nice   %system   %iowait    %steal     %idle
     17:40:01          all     51.00      0.00      7.81      3.04      0.00     38.15
     19:40:01          all     48.43      0.00     18.89      2.07      0.00     30.60
     20:40:01          all     43.93      0.00     15.84      5.54      0.00     34.70
     21:40:01          all     46.14      0.00     15.44      6.57      0.00     31.85
     22:40:01          all     44.25      0.00     20.94      5.43      0.00     29.39
     23:40:01          all     18.24      0.00     52.13     21.17      0.00      8.46
     12:40:02          all     22.03      0.00     41.70     15.46      0.00     20.81
    
  9. Checking pmap gaves the following largest contributors:

      000000005416c000 1505760K rwx--    [ anon ]
      00000000b0000000 1310720K rwx--    [ anon ]
      00002aaab9001000 2079748K rwx--    [ anon ]
    
  10. Trying to correlate addresses I’ve got from pmap from stuff dumped by strace gave me no matches

  11. Adding more memory is not practical(just make problem appear later)

  12. Switching JVM’s is not possible(env is not under our control)

And the question is:
What else can I try to track down the problem’s cause or try to work around it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:14:34+00:00Added an answer on June 8, 2026 at 12:14 pm

    Problem was in a profiler library attached – it recorded CPU calls/allocation sites, thus required memory to store that.

    So, human factor here 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to write a standalone Java application which will have a embedded HTTP
I have some code which is a standalone java application comprising of 30+ classes.
I have a standalone java application, which uses JPA for its persistence. Right now
I have developed a standalone application using java, in which I am executing an
I have implemented a standalone java application which uses the swing framework for GUI.As
I have a standalone Java application written with Apache Camel which I want to
I have a Component which I am using both in a standalone Java application
I have a standalone java application that fires up several JMS consumers using the
I have a standalone application in which I have to prompt the user with
Hai I have developed a standalone application in which when an user logs in,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.