Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Strange Memory Spike Occurring

843811Apr 9 2003 — edited Aug 8 2003

Hi all,

I am encountering a weird memory spike running an application under Java 1.4.1_02 and I am wondering if anyone else has encountered it, it knows what the problem might be.

Here's what happens. I am running an application that we develop that (as a simplified explanation) processes requests. Everything ran fine under Java 1.3.1_06 and we are investigating moving it forward to 1.4.1_02. When I start up the system, I run through 4 identical requests as a test. The first three requests go through as expected. On the fourth request, one JVM (there are several JVM's going, communicating through CORBA) starts a vicous memory grab that pushes it's real memory usage from 20MB to 90MB and its virtual memory usage from 30MB to 1.6GB. While this is happening (takes about 2 to 2.5 minutes) everything else in the JVM stops happening (timers don't expire, code isn't executed, etc). After the memory consumption reaches its peak, the system slowly starts recovering the memory, back down to its orignal size (another 2 to 2.5 minutes.) At this point the system resumes operation exactly where it left off and works fine from there on, until it is restarted (I have run up to 10000 requests through afterwards without a problem.)

The memory usage happens in a two step process. It starts with one big jump of about 300MB (total between the real and virtual memory), then continues increasing in a gradual increase. The decrease happens in a mirror of this, with ta gradual decrease for a while, then a big drop at the end. The memory graph would look somehting like this:

                  1.6GB
                   /\
                  /  \
                 /    \
                /      \
          330MB/        \330MB
               |        |
               |        |
20MB___________|        |___________ 20MB
           
               ^        ^
               |        |
          processing  processing
            stops      resumes

I have run the process with both -Xrunhprof and -verbose options, and neither show anything that might be the cause of the problem. I then tried attaching to the process with a remote profiler and the problem did not occur. Further playing around with the command line showed that using -server as an option made the problem not occur.

My question is what caused it in the first place? I have concerns about this re-occurring elsewhere, especially if adding the -server option doesn't fix the problem just move it somewhere else.

Can anyone give me any help?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 5 2003
Added on Apr 9 2003
4 comments
369 views