AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  fork: Not enough space

    Posted Fri March 26, 2010 02:11 AM

    Originally posted by: tttttttttttt


    Now we are doing a stress test for a java application with the curse UI on AIX. We used 200 concurrent users and ramp up one user each 30 seconds. And the resource situation is 12.75G physical memory and 512M virtual memory on our AIX server. When the JVM number increase to around 191, all real memory and virtual memory reach the limit. Then 40 jvm exit with the error "fork: Not enough space". The JVM numbers drop to 153 and release a lot of memory at the same time. Then the jvm number continue increasing with the following 9 users. I have the following questions for what happened:

    1. What kind of other situation will lead to the error: fork: Not enough space except virtual memory is insuffieint?

    2.At the beginning of JVM start, haven't the jVM allocated enough memory for running? Is the jVM stop as expected when no memory available during running on AIX?

    3.How can I know how much memory one JVM use? I used svmon -P and check the inuse part. But when I use this data mutiple the number of all java process, I found it exceed the physical memory + virtual memory.
    #AIX-Forum


  • 2.  Re: fork: Not enough space

    Posted Fri March 26, 2010 09:40 AM

    Originally posted by: j.gann


    > tttttttttttt wrote:

    >
    > 3.How can I know how much memory one JVM use? I used svmon -P and check the inuse part. But when I use this data mutiple the number of all java process, I found it exceed the physical memory + virtual memory.

    realize that some of the segments are shared (most notably the kernel segment, the program code and of course shared library code).
    #AIX-Forum


  • 3.  Re: fork: Not enough space

    Posted Sun March 28, 2010 05:22 AM

    Originally posted by: tttttttttttt


    As we want to do some capacity planning about how much memory will be needed for 200 jVMs running simultaneously, so I suppose that if we can get how much memory one JVm cost, then will get the needed memory amout by multipling it to the numbers of cocurrent users or jvms. In this case, I am not sure whch number I should use to measure the memory use for one JVM. Please advise, thanks!
    #AIX-Forum


  • 4.  Re: fork: Not enough space

    Posted Fri March 26, 2010 11:20 AM

    Originally posted by: SystemAdmin


    "12.75G physical memory and 512M virtual memory"

    Increase the size of your paging space. It should be equal to or greater than the amount of physical memory.
    #AIX-Forum


  • 5.  Re: fork: Not enough space

    Posted Sun March 28, 2010 05:27 AM

    Originally posted by: tttttttttttt


    yeah, the page space is indeed too small, but we will not change the size of the page space by now as the environment is not the production environment and what we need is just the result in the current configuration.
    #AIX-Forum


  • 6.  Re: fork: Not enough space

    Posted Mon March 29, 2010 08:45 AM

    Originally posted by: flodstrom


    While svmon is a nice tool I think one really need to fully understand all details before using the data for more readable purposes.

    It can be somewhat tricky to get precise numbers for something like this, but I would use something more simple than svmon. For example, use "ps aux" and look at your java processes. The "SZ" is the core image size of the process, the "RSS" is the amount of real memory used. Use the RSS value(s) to get an idea of what your production machine might need in terms of memory. Just keep in mind that the RSS value may very well grow over time so the initial startup value might not be so accurate.

    In "nmon" you can also see some usefull memory related data on a running system.
    #AIX-Forum


  • 7.  Re: fork: Not enough space

    Posted Tue March 30, 2010 10:00 AM

    Originally posted by: tttttttttttt


    Thanks for your kind reply! I still have some questions below:
    1. Heard that java process use two types of memory: java heap memory and native heap memory. Is it correct that the memory used by a java process is just the sum of java heap and native heap? Does the RSS include both of them?

    2. I know the java heap size can be changed by command, how can I know the current size? What is the default value for heap size? I am using 64 bit jdk 1.5 on AIX 6.1 which is also 64 bit.
    #AIX-Forum


  • 8.  Re: fork: Not enough space

    Posted Wed March 31, 2010 06:13 AM

    Originally posted by: nagger


    The UNIX OS (like AIX) provides one heap mechanism via the malloc (memory allocation) system call.
    What Java does internal to the program is Java's business.

    I would look for Java internal stats using Java tools - its not really a function of the AIX OS.
    AIX just sees a program.

    ta N
    #AIX-Forum


  • 9.  Re: fork: Not enough space

    Posted Mon March 29, 2010 02:02 PM

    Originally posted by: nagger


    2) Sure programs will get a large chunk of when started, they then ask for heap memory as they initialise, then when they are given work to do (like a request over the network) or start working on say an input file they will request more memory. Processes will continue to grow as demanded.

    Sure after a week they may have reached their maximum but in a few seconds and as you ramp up the number of processes it is likely that they will all be growing.

    I would (depending on the application) expect some reasonably steady state after a few minutes and look for a dip in CPU use to show the programs have reached the end of initialisation and data input.

    Of course, with Java this is likely to be a longer time.

    ta N
    #AIX-Forum