Process size

Hi all,
I ran java program on HP-UX. I set maximum heap size to 128MB.
The point is I used top command to see process size.
Why the process size can grow up to 700MB?
How come? Where is the memory come from?
Thank you

this sounds strange, i think i've seen the java.exe process size use much more memory than the -mx limit would suggest when memory mapping files using the nio libraries - does your code use the nio libraries?
asjf

Similar Messages

  • Why make process size so huge on WindowsXP?

    It seems like no matter how much memory my application uses. For example I can make a very simple app that just shows a JFrame. Runtime.getRuntime.totalMemory() claims that I am using 4MB, which seems like a lot for a simple frame window. TaskManager says that the application (JRE) is using 18MB. The JVM process size is over 4X larger. Is there anything that the developer can do to reduce the process size?
    I realize that the JRE is loading classes, spawning its own threads which require heap space and stack space, but the perception that most people get when looking at TaskManager is "Wow there must be a memory leak in that application it using 80MB." I know because my manager has said some close to that with a few expletives thrown in. This makes it hard for me to convince him that Java is a great choice for developing desktop applications.
    I think that instead of implementing new language features like auto-boxing and spending time developing Timbuktu language support, this needs to be addressed. Otherwise I think many desktop application developers will have the same difficulty and may forced to look at using C++ with GTK or Mono.

    Remember that a computer has much more memory at it's disposal than
    just RAM as modern operating system use swap memory to give greater memory. Have you tried
    running with the -client command line option.hm, my machine is 512MB and since I've started running eclipse there has been a definite improvement in disk thrashing (sporadically) when switching between applications..
    as a corporate user, i get to request a machine upgrade sometime next year (yay!) but someone pointed out to me that this isn't the typical scenario - but guess its just a few years away when this really doesn't matter so much
    I tried the -Xmx and -mx options. The process size is not affected, only Runtime.getRuntime().getMaxMemory() is affectedah, ok - must have been confused there..
    i found this bug:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4864304
    which seems to have become an umbrella bug for various swing memory issues - it does look like that have been real improvements in 1.5
    eg my own quick test - running SwingSet2 (java1.4 version) with both 1.4.2_04 and an early beta of 1.5 gives around a 10 - 15MB difference which does seem a real good result (its also faster..) but the absolute measurement is still around 60MB - i think maybe its something to do with font cacheing - not being able to rely on the underlying OS's font rendering capabilities
    another relevent thing could be jvm sharing:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4416624
    which i think the point about is that it mitigates the per-jvm memory costs - so you only take that hit once..

  • How to increase JVM Process size for WebLogic running SOA Applications.

    Hi,
    I believe 32 Bit OS can address up to 4GB memory so theoretically 32 Bit JVM can use 4GB but practical convention is 2GB as other 2GB is used by OS itself and also this default JVM Process size is set somewhere and I also believe that if JVM is 32 bit on 64Bit OS even though JVM will run on 32Bit Virtual Machine so JVM does not know that it is 64Bit OS in that case again it can use max Process default size up to 2GB.
    And for 64Bit JVM, I can allocate more than 4GB depend on my available RAM size to Xmx, MaxPermSize parameters in java.exe file and after that I can set the same value in “setSOADomainEnv.cmd” or to “setDomainEnv.cmd” file.
    But I am 99% sure by just assigning more memory value to Xmx, MaxPermSize in “setSOADomainEnv.cmd” file only won’t work (not setting Xmx in java.exe), if it would have worked then in my case when I was assigning 1536 to Xmx in “setSOADomainEnv.cmd” file then why it was showing out of memory error. I think that is because it was only taking default 2GB for my 32 Bit JVM not considering 3GB or 4GB. So i think i have to change default memory size what JVM can use (<http://www.wikihow.com/Increase-Java-Memory-in-Windows-7> but i am using windows 8 so for that I don’t know the option to change this default Process Size)
    I also believe that first JVM start and before start it check how much memory it can use from it’s own –Xmx parameter in some ware configuration or java.exe file and after that it allocate that much size of JVM Process Memory in RAM then after it loads Weblogic or Java Applications in its (Heap + Non-heap + Native Area) which are parts of JVM Process memory
    I read post on :< http://stackoverflow.com/questions/3143579/how-can-jvm-use-more-than-4gb-of-memory > and < http://alvinalexander.com/blog/post/java/java-xmx-xms-memory-heap-size-control >
    All used  : 
    java -Xmx64m -classpath ".:${THE_CLASSPATH}" ${PROGRAM_NAME}
    java –Xmx6g     //command which will call java/JVM interpreter which will hold –Xmx parameter to set Heap size for JVM
                                    before JVM comes in memory (JVM process memory)
    now my question is can I manually open any configuration file or java.exe same like “setSOADomainEnv.cmd” or “setDomainEnv.cmd” (I know since java.exe is exe I can’t open simply but I want similar work around)
    so that I don’t need to type java –Xmx6g every time when I run weblogic (and then later I can change weblogic “setDomainEnv.cmd” Xmx and PermSize to more than default size 4GB to 5GB or 6GB in the case of 64Bit OS)
    Please correct me if I am wrong in my understanding.
    Thanks.

    These days the VM will detect a "server" machine and set up the memory appropriate for that.
    You can create a simple java console application and have it print the memory settings (find the appropriate java class fort that.)
    There is of course the possibility that your application is running out of memory because it is doing something wrong and not because the VM doesn't have enough memory.  You can force that in a test setup by LOWERING the maximum amount of memory and thus making it more likely that an out of memory exception will occur.

  • Maximum process size !

    Hi guys !
    What is the maximum virtual process size in Solaris 8 64 bit. I know in 32 bit Solaris it is 2GB.
    I'm troubleshooting a Java out of memory error.
    Thanks,
    - Solarised

    Extending the size of JRE Heap is not always the answer, you will need to start tuning your garbage collection to free off more memory on a more regular basis. Also I you are going to extend the size of your JRE Heap then ensure you get the minimum and maximum parameters correct, I would suggest you set them to the same size. Last point to remember, only calculate the size of your JRE Heap from the available memory, not the total memory.

  • Process Size Increase

    Hi,
    While stress testing our application we found increase in the process size. When we run our application for 5 hrs+ the size increases by 1MB+. We used the pmap -x , and it shows the increase in the heap.
    We used purify and sun workshop for finding the memory leak . Both of them show no memory leak. They do show increase in the MIU/Live memory. The way we do our test is in continous cycles. We do same set of operations in every cycle. When we started the application it was 30MB and when we did first cycle it increased to 68 MB. The heap increases by 1MB every 5hrs. After 250 cycles it has increased 10MB.
    Any idea why the heap keep on increasing? Is there any way to reclaim the memory?
    Thanks,
    Meena

    Hello,
    It seems that your program has some "memory overuse" problems.
    Memory overuse occurs when the program always allocates some new memory blocks on the heap (new, malloc) but never deletes them. Most of the time, these blocks are not "memory leaks" because the pointers on these blocks still exist, so that a garbage collector does not solve the issue.
    The classical example is a linked list that always grows...
    The only way to solve this, IMHO, is to track the memory in-use before and after processing.
    Using Rational purify, you can call purify_all_inuse() to see all blocks inuse or purify_new_inuse() to see the new allocated blocks. Do this before and after processing, then check what is different.
    Then you will have to understand why these blocks have been allocated, and then correct the problem.
    Good luck,

  • Process size growing

    Hi,
    We are running our application throught weblogic 5.1. If you observe the process size through top command one of the application process size is keep on growing and after some point of time it's reaching up to the memory max limit nad we need to restart the machine.
    So what we are thinking is there is a posibility of memory leaks in our source code. Before going to that i wanted to make sure that i can do any thing with weblogic configuration ..? can anybody help me in this regard ..? Please consider this issues as very urgent.
    Regards,
    Ganesh

    Consider forcing garbage collection within weblogic. You can see if
    you turn on verbosegc in your start script in weblogic. Monitor when
    garbage collection occurs.
    hope this helps
    abdul rahman
    Ganesh <[email protected]> wrote in message news:<3ea817b8$[email protected]>...
    Hi,
    We are running our application throught weblogic 5.1. If you observe the process size through top command one of the application process size is keep on growing and after some point of time it's reaching up to the memory max limit nad we need to restart the machine.
    So what we are thinking is there is a posibility of memory leaks in our source code. Before going to that i wanted to make sure that i can do any thing with weblogic configuration ..? can anybody help me in this regard ..? Please consider this issues as very urgent.
    Regards,
    Ganesh

  • Big Process Size

    Hi:
    Can anyone provide ideas to reduce the process size of a simple java application running on Sun OS v5.8 box ? All this application does is call Thread.sleep(300*1000). "top" command reports that the total process size is 28M and resident memory size is 8M.
    The following is one of the lines from running the "pmap" command on the process:
    Address Kbytes Mapped File
    FD40000 12880 dev:32,16 ino:389873
    I am using the java version "1.3.0._02".
    Thank you.

    You could use the command line options to reduce the minimum heap size and the minimum stack size, but I doubt there will be any substantial gains.

  • Reducing process size on XP

    Hi,
    I am running 10.2 EE on my desktop, Windows XP sp2 (Athlon X2 with 1Gb ram). I only use the db for local testing with very little data and load. I'd like to reduce the process size a bit if possible. Right now it shows Mem Usage between 200mb and 250Mb, and VM size hovers around 350mb - 370Mb.
    Which parameters in which files should I be looking at to reduce this somewhat?
    thanks!

    What do you mean by process size here?
    The amount of memory used by oracle based on the init<SID>.ora parameter.
    from SQL plus
    Show SGA will give the memory occupied by oracle process.
    If you want you can reduce the Memory size.

  • DM 3.0.0.665: Individual dataflow diagrams forget process size and position

    Some of my dataflow diagrams do not remember the size and position of processes when I move or resize them.
    The problem only seems to affect "external" processes, ie processes that are not subprocesses to the diagram.
    How can I avoid this behavior?
    / Marc de Oliveira

    Marc,
    I logged bug for that. Unfortunately there is no workaround.
    Philip

  • Backgroup processes size

    the size of the alert log and other files generated by background processes are getting high! would like to know if these files can be deleted and if also ai can trim the size of the alertlog on a regular basis.
    thanks in advance.

    Generally it's harmless to delete these files. They are for troubleshooting purpose. alert log is frequently used by Oracle for logging purpose. If you remove it while server is running, oracle will create a new one.
    Since all these file are text files, you usually get very good compress ratio if you zip them. I will suggest you run gzip to zip them. and have an alert log rotation script.
    You can use
    oracle_trace_collection_size
    to limit the trace file size.

  • Maximum data segment size for a process

    Hello
    we have an issue in our proxy server with the size of a process.
    the process grow in size and when it reaches 4Gbytes, the process stop with an error that it cannot allocate memory, we check and there's plently of swap left,. all the ulimit settings in solaris 10 are set to 'unlimited'
    is there a way i can see or determine, bypass configure what is the maximum process size. on a 64bit solaris.
    thank you in advance
    Mario G.

    It sounds like you're running a 32-bit app. You need a 64-bit application for it to be able to utilize more than 4 GB of RAM.

  • How to determine the size of the JVM process?

    Hi,
    How to determine the total process size of the JVM process (that includes Heap, Non Heap and Native memory)?
    Is there any command to obtain this value on Solaris (for Sun JVM)?
    I refer the process size to http://middlewaremagic.com/weblogic/wp-content/uploads/2010/11/Java_Heap_Diagram_12.jpg) here.
    Many thanks for your help in advance!

    Hi,
    Make sure that Total Heap + Native memory will be consider as total Memory.
    That means in 32 bit you will have only at most 4 GB for process + additional 2 GB for OS.
    So let assume if you have 4GM RAM then out of the 4GB you can allocate 2GB as Heap and 512m as Perm in case of Hot spot and remaining will be consider as Native memory.
    But in case of 64 bit will change you will have good amount of the memory so you can use plenty of Heap and Perm size.
    Still if you have query let me know.
    Regards,
    Kal

  • JVM heap size limit under Windows

    Hi,
    I'm looking either for some help with a workaround, or
    confirmation that the information I've found is still the case for the
    current state of Java.
    Development machine is Win XP Pro, 2G RAM.
    Biggest heap I can allocate is about 1.6G, and that is not large enough for this
    app.
    I have a Swing application that
    1) must run on Win XP, 32 bit
    2) must implement an editor (similar to Excel but with fewer features) to handle large csv files
    ( up to about 800Mb).
    3) Strong preference for Java 5, though higher could conceivably be supported.
    Research so far tells me that this is the result of process memory limitations
    of Windows and the JVM, and that I might be able to squeeze a little more heap with
    Windows' rebase command, but probably not enough and I would start running the
    risk of conflicts with other applications on my users' systems. Ugh.
    Also I read of the Windows /3GB switch, but posts say that the JDK's available are not
    built to be able to use that feature. I havent had a chance to add memory to
    test that yet. However, I'm also under the impression that I should be able to
    allocate a heap larger than physical RAM ... except for that process size limit.
    So ... my information is basically that I'm stuck with a limit of about 1.6G for
    heap size, regardless of the RAM on my computer.
    Can anyone confirm whether that is still correct, preferably with a pointer to some
    official reference ?
    Or better yet, point me toward a workaround?
    Thanks!
    -tom

    >
    Some bookmarks I have on this topic.
    http://sinewalker.wordpress.com/2007/03/04/32-bit-windows-and-jvm-virtual-memory-limit/
    http://stackoverflow.com/questions/171205/java-maximum-memory-on-windows-xp
    The first link pulled together what I found in lots of bits and pieces elsewhere, nice to have a coherent summary :)
    The second link offered a bit of insight into the jvm that I hadn't seen yet .
    Thanks!

  • Solaris JVM Process Growth

    Hi,
    I am investigating a problem where we experience continual growth of our JVM process. The overall process size and native heap size of the JVM process continually grow at the same rate. I am monitoring these using the commands 'ps - o pid,vsz,rss' and 'pmap -x' respectively. The increases are in multiples of 8Kb.
    I have checked our java application using Optimizeit and it is not leaking memory. I have also monitored the size of the VM java heap using the '-verbose:gc' garbage collection debugging option. Garbage collection appears normal and the VM heap size remains below that specified by the '-Xmx' option.
    It appears that the memory growth is occurring in native code of the JVM process but I am at a loss on how to determine what is causing this. Can anyone advise me what may be causing this JVM process growth or ways in which I may be able to find this out?
    I am using JRE 1.4.2 SE (1.4.2_08_b03) on Solaris 8. Within the JVM we are running our web app in Tomcat 4.1.
    The shared libraries loaded by the JVM (as shown by pldd) are:
    /usr/lib/libthread.so.1
    /usr/lib/libdl.so.1
    /usr/lib/libc.so.1
    /usr/platform/sun4u/lib/libc_psr.so.1
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/client/libjvm.so
    /usr/lib/libCrun.so.1
    /usr/lib/libsocket.so.1
    /usr/lib/libnsl.so.1
    /usr/lib/libm.so.1
    /usr/lib/libsched.so.1
    /usr/lib/libmp.so.2
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/native_threads/libhpi.so
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libverify.so
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libjava.so
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libzip.so
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libjdwp.so
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libdt_socket.so
    /usr/lib/nss_files.so.1
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libnet.so
    /vob/ntg-thirdparty/tibco/rv-7.1/sol28/lib/libtibrvj.so
    /vob/ntg-thirdparty/tibco/rv-7.1/sol28/lib/libtibrvcmq.so
    /vob/ntg-thirdparty/tibco/rv-7.1/sol28/lib/libtibrvcm.so
    /vob/ntg-thirdparty/tibco/rv-7.1/sol28/lib/libtibrvft.so
    /vob/ntg-thirdparty/tibco/rv-7.1/sol28/lib/libtibrv.so
    /usr/lib/libpthread.so.1
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libnio.so
    /usr/lib/librt.so.1
    /usr/lib/libaio.so.1
    /usr/lib/libsendfile.so.1
    /vob/ntg/dev/resources/lib/sol8gcc/libjavaperljni.so
    /vob/ntg/dev/thirdparty/perl-5.8.0-gcc-thread/lib/libperl.so
    /usr/lib/libw.so.1
    /vob/ntg/dev/resources/lib/sol8gcc/libstdc++.so.2.10.0
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libioser12.so
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libawt.so
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libmlib_image.so
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/headless/libmawt.so
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libcmm.so
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libfontmanager.so
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libdcpr.so
    /vob/ntg-thirdparty/java/j2sdk1.4.2_08/jre/lib/sparc/libjpeg.so
    Any Help is much appreciated.

    Hi
    If u can, use 1.4.2_10 (latest as of now). There is a bug 6250517, fixed in _09. Not sure if u r making any calls to NetworkInterface.getNetworkInterfaces.
    Also noticed that you are using tibco. How about putting -Xcheck:jni and see if it picks up anything.
    Unfortunately Solaris 8 didnt have libumem for tracking memory allocation. If u have any Solaris 9/10 boxes, you can use libumem to track it down.
    http://access1.sun.com/techarticles/libumem.html

  • Help with windows Prcesses  - using "com.jniwrapper.win32.process.Process"

    Hi everybody,
    I'm trying to get a list of running processes, and for each process I need its Process ID, Process Name, and the command line that run this process.
    I found a way to get everything but the command-line, by JNI wrappers (below are links to their documentation).
    com.jniwrapper.win32.process.CurrentProcess (has the method - getCOmmanLine() ) :
    http://www.teamdev.com/downloads/jniwrapper/winpack/javadoc/com/jniwrapper/win32/process/Process.html -
    com.jniwrapper.win32.process.Process
    http://www.teamdev.com/downloads/jniwrapper/winpack/javadoc/com/jniwrapper/win32/process/Process.html
    I wrote the following code :
    String a, b;
    List processes = Process.getProcesses();
    for (int i = 0; i < processes.size(); i++) {
    Process process = (Process)processes.get(i);
    a = "process: FileName = " process.getProcessImageFileName();
    b = "id = " process.getProcessID();
    But I need to create an object of "CurrentProcess" (that extends Process class) in order to get the command-line. However, this class only has an empty constructor:
    CurrentProcess() - Creates an instance that corresponds to currently running process.
    and I don't understand what does "corresponds to currently running process" means (Cause there are many running processes) , and how to use it in my code.
    I would appreciate you help very much!
    Thanks,
    Nofar.
    Edited by: Nofarb on Jul 11, 2010 2:38 AM
    Edited by: Nofarb on Jul 11, 2010 2:41 AM

    I'm trying that as well, :)
    I was hoping maybe one of you have some experience with that.
    Thanks anyway.

Maybe you are looking for