How to reduce heap size in jvm 1.3.1 ??

Is it possible to force GC to reduce heap size ???
My application uses large maps and after loading one memory allocation looks like this:
[GC 92088K->84997K(105656K)]
If map is not needed I remove it and run Full GC.
Memory is dealocated but the heap size remains the same:
[GC 10088K->8499K(105656K), 0.0026571 secs]
Is any way to reduce it ??? I tried to use incremental GC, it worked in desired way but it is to slow.

Hi,
Did you try to set java min and max to different sizes?
Then you still need a full GC to reduce the heap
because only the full GC compacts memory.
For IBM JRE you will need this to compact anyway.
In general applications perform better with heapmin=max.
-Xmx<size> set maximum Java heap size. example: -Xmx64m
-Xmn<size> set new generation Java heap size. example: -Xmn64m
Different size make it compacter but are more expensive(time)
Do you run Full GC as system.gc()?
I would never do this.
Let the JRE take care of this.
Number 1 GC rule is avoid it.

Similar Messages

  • How to increase heap size in JVM??

    Hello all,
    Iam trying to deploy an EAR file from JBuilder6 to WebLogic6.1 and Iam running into java.lang.OutOfMemoryError in JBuilder!!..Can someone tell me how to overcome this problem.
    TIA

    there are a set of config files in the JBuilder directory (bin directory I think - removed JBuilder a while back) that specify JVM arguments, what JVM to run etc.
    Chuck

  • How to reduce the size of a pdf?

    How to reduce the size of a pdf?

    Not do-able with Reader. Acrobat Pro can reduce PDF file size, but... if it's text only (no media or images) it won't reduce any more than it already is.

  • How to reduce the size of icons and descriptions of pallets?

    Hi!
    1. The "Control bar" is still something missing and to display the location of the same functions are different depending on the selected tool.
    Therefore, the tools will I need to keep an eye on pallets or icons. But description of the pallets is too great for me, takes place and I can not see as many pallets as I need.
    2. The idea to create multiple workspace and its continuous change is not good for me.
    When I work I prefer to have the tools at its one location, then I can rely on My reflexes when choosing a tool, and not constantly look where this time or constantly switch the workspace.
    3. How to reduce the size of icons and descriptions of pallets I, then he could fit more pallets in one column?
    Best Regards!

    Hi Monika,
    Nice to read you again. Thank you for your response.
    Yes, I read. It does not solve the problem about which I write. I guess that solves your opinion? Please hint.

  • How to reduce the size of the pdf scanned file ?

    Hi, 
    I have canon PIXMA MG2120. I am trying to scan the documents but the size is to big to attach to email. Any Idea how to reduce the size of the PDF file?

    Hello
     For pdf size,you can compress the pdf size if you want to reduce the size of the pdf files.
    Here is the code to do it:
    using System.IO;
    using System.Drawing.Printing;
    using RasterEdge.Imaging;
    using RasterEdge.Imaging.Codec.Compression;
    using RasterEdge.Imaging.PDF;
    DocumentCompression.infile(@"C:\1.pdf");
    DocumentCompression.Outfile(@"C:\2.pdf");
    DocumentEncoder = DocumentEncoder.Group3Encoding
    RasterEdgeImaging Document = new RasterEdgeDocumentg();
    Image. DocumentCompression(@"C:\1.pdf", "C:\2.pdf", DocumentEncoder DocumentEncoder.Group3Encoding);

  • How to reduce the size of the query

    Hi all,
    Can any one suggest me how to reduce the size of the following query .
    /* Formatted on 2011/07/12 11:02 (Formatter Plus v4.8.8) */
    SELECT prs.pa_rqst_srvc_sid,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5031'
    AND ped.aaa_segment_loop_nmbr = '2000F') revenue_iid,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5013'
    AND ped.aaa_segment_loop_nmbr = '2000F') x12_code_list_qlfr_lkpcd,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5026'
    AND ped.aaa_segment_loop_nmbr = '2000F') procedure_iid,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5027'
    AND ped.aaa_segment_loop_nmbr = '2000F') mdfr_code,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5028'
    AND ped.aaa_segment_loop_nmbr = '2000F') mdfr2_code,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5029'
    AND ped.aaa_segment_loop_nmbr = '2000F') mdfr3_code,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5030'
    AND ped.aaa_segment_loop_nmbr = '2000F') mdfr4_code,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5014'
    AND ped.aaa_segment_loop_nmbr = '2000F') rqst_prcdr_amt,
    (SELECT prpre.erroneous_data_value
    FROM pa_error pe,
    pa_error_detail ped,
    pa_request_procedure_run_error prpre
    WHERE pe.pa_error_sid = ped.pa_error_sid
    AND ped.pa_error_sid = prpre.pa_error_sid
    AND ped.oprtnl_flag = 'A'
    AND prpre.oprtnl_flag = 'A'
    AND prpre.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND pe.pa_error_nmbr = '5015'
    AND ped.aaa_segment_loop_nmbr = '2000F') srvc_line_rate,
    'NA' drug_desc, 'NA' product_service_id, 'NA' uom_code,
    'NA' rqst_prcdr_units
    FROM pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf,
    pa_request pr,
    pa_request_service prs,
    pa_request_procedure prp
    WHERE ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ptr.pa_trnsctn_rqst_sid = pr.pa_trnsctn_rqst_sid
    AND pr.pa_rqst_sid = prs.pa_rqst_sid
    AND prs.pa_rqst_srvc_sid = prp.pa_rqst_srvc_sid
    AND pr.oprtnl_flag = 'A'
    AND prs.oprtnl_flag = 'A'
    AND ptr.oprtnl_flag = 'A'
    AND prp.oprtnl_flag = 'A'
    AND prs.rqst_ctgry_lkpcd = 'AR'
    AND ibf.original_file_name = 'HIPAA.165760000.20110613I001.278_IRej.dat';
    Thanks,
    P Prakash

    Hi,
    Maybe like that, but keep in mind that it is highly untested_ :SELECT
      prs.pa_rqst_srvc_sid,
      pvt.c5031 revenue_iid,
      pvt.c5013 x12_code_list_qlfr_lkpcd,
      pvt.c5026 procedure_iid,
      pvt.c5027 mdfr_code,
      pvt.c5028 mdfr2_code,
      pvt.c5029 mdfr3_code,
      pvt.c5030 mdfr4_code,
      pvt.c5014 rqst_prcdr_amt,
      pvt.c5015 srvc_line_rate,
      srvc_line_rate,
      'NA' drug_desc,
      'NA' product_service_id,
      'NA' uom_code,
      'NA' rqst_prcdr_units
    FROM
      pa_transaction_request ptr,
      input_acknwldgmnt ia,
      input_batch_file ibf,
      pa_request pr,
      pa_request_service prs,
      pa_request_procedure prp,
        SELECT
          prpre.pa_rqst_prcdr_sid,
          MAX(DECODE(pa_error_nmbr,'5013',prpre.erroneous_data_value,NULL)) c5013,
          MAX(DECODE(pa_error_nmbr,'5014',prpre.erroneous_data_value,NULL)) c5014,
          MAX(DECODE(pa_error_nmbr,'5015',prpre.erroneous_data_value,NULL)) c5015,
          MAX(DECODE(pa_error_nmbr,'5026',prpre.erroneous_data_value,NULL)) c5026,
          MAX(DECODE(pa_error_nmbr,'5027',prpre.erroneous_data_value,NULL)) c5027,
          MAX(DECODE(pa_error_nmbr,'5028',prpre.erroneous_data_value,NULL)) c5028,
          MAX(DECODE(pa_error_nmbr,'5029',prpre.erroneous_data_value,NULL)) c5029,
          MAX(DECODE(pa_error_nmbr,'5030',prpre.erroneous_data_value,NULL)) c5030,
          MAX(DECODE(pa_error_nmbr,'5031',prpre.erroneous_data_value,NULL)) c5031
        FROM
          pa_error pe,
          pa_error_detail ped,
          pa_request_procedure_run_error prpre
        WHERE
          pe.pa_error_sid     = ped.pa_error_sid
        AND ped.pa_error_sid  = prpre.pa_error_sid
        AND ped.oprtnl_flag   = 'A'
        AND prpre.oprtnl_flag = 'A'
        AND pe.pa_error_nmbr IN ('5013','5014','5015','5026','5027','5028','5029',
          '5030','5031')
        AND ped.aaa_segment_loop_nmbr = '2000F'
        GROUP BY
          prpre.pa_rqst_prcdr_sid
      pvt
    WHERE
      pvt.pa_rqst_prcdr_sid       = prp.pa_rqst_prcdr_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid   = ibf.input_batch_file_sid
    AND ptr.pa_trnsctn_rqst_sid   = pr.pa_trnsctn_rqst_sid
    AND pr.pa_rqst_sid            = prs.pa_rqst_sid
    AND prs.pa_rqst_srvc_sid      = prp.pa_rqst_srvc_sid
    AND pr.oprtnl_flag            = 'A'
    AND prs.oprtnl_flag           = 'A'
    AND ptr.oprtnl_flag           = 'A'
    AND prp.oprtnl_flag           = 'A'
    AND prs.rqst_ctgry_lkpcd      = 'AR'
    AND ibf.original_file_name    = 'HIPAA.165760000.20110613I001.278_IRej.dat';Edited by: Nicosa on Jul 12, 2011 2:20 PM
    Corrected columns aliases in outer query :
    - c5031 instead of 5031
    - c5013 instead of 5013

  • How to reduce the size of the paper for form in sapscripts?

    Hi All,
    How to reduce the size of the paper for form in sapscripts?
    Thank you.
    Regards,
    Alice

    Goto SE71, enter your form name and press F6.
    Now goto Basic Settings (Button Top right in the Dynpro, not in the button bar tho).
    Now change page format and orientation to desired one.

  • How to reduce the size of file after delete some datas?

    The size of the database file isn't smaller than ago after delete some data from database.
    How to reduce the size of file after delete some datas?

    Hi,
    What BDB release are you using? If it's one of the latest releases, then what you are looking for is the DB->compact() method:
    http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/dbcompact.html
    The DB->compact() method compacts Btree, Hash, and Recno access method databases, and optionally returns unused Btree, Hash or Recno database pages to the underlying filesystem. Please let me know if it helps.
    Bogdan Coman

  • How to reduce the size of the pdf file?

    How to reduce the size of the pdf file?
    Thank you for the help,
    Best
    Jamal

    You have two options:http://www.screencast.com/t/p3srGDGP
    In this screen shot I have two method chosen.
    the one highlighted in yellow is more effective, except in the case where the pdf was from a Scan which is graphics only.
    select the one in yellow first and click on Fonts. Remove all duplicates. for some reason, I don't know if its defect in Acrobat, but usually multiple copies of the exact Font will show up and some cases there will font families not even used in your document.  remove all duplicates.
    Note: Duplicates do not mean for example: Helvetica, Helevetica Bold, Helvetica Bold Italic (these are three different fonts).
    You can reduce the quality of the graphics used and so on while in menu.
    The feature highlighted in green  more or less just reduce the general qaulity of the PDF. and may work for some PDF's

  • How to reduce the size of cloned Oracle Applications Instance

    How to reduce the size of cloned Oracle applications instance, so as to save the storage space for the cloned systems.
    How can we remove unimplemented modules in the instance so that we can reclaim the space occupied by them.
    can any please suggest on this..?

    mumbai,
    I would recommend to leave it as it is.
    If you can add some inexpensive HDD to your test system then do so.
    The Apps DB storage decreasing process is quite painful and isn't straightforward.
    You can’t just delete unused schemas & tablesapces (if they are not used than they are not consuming reasonable space anyway). The modules in Apps are using each other procedures and objects. The effect of deleting one module (schema) is highly unpredictable.
    If you will do something like that than you will not be able to patch your cloned system after that.
    Some things can be done however in order to reduce size of a testing Apps system:
    - Decries UNDO & TEMP tablespaces. Normally you do not need that big tbs in test system as you have got in the production.
    - If your REDO LOG files are quite big and you have got a lot of redo groups you can recreated smaller REDO log files.
    - On Apps tier you can delete OUTput and LOG files
    In case you still would like to decrease data volume in your testing system you need to take a look on some tools which provide data subtracting capabilities from Apps DB. This process has to be quite intelligent. The tool have to know the data structures in APPS DB and subtract data in the way to not harm logical relationships between records. After a subtracting process you will need to make multiple FULL exp/imp cycles in order to reduce physical space consumed by the database. Beside the fact that those tools are quite expensive you will need to spend a lot of your time to implement those.
    BTW: That is the size of you production DB? Have you analyzed which module takes most of the space? May be you can identify top 10 objects and try to archive a data from those object preventing the future grow of the production database.
    Just my 0.02£
    Yury
    Check this out:
    A.
    http://www.freelists.org/archives/ora-apps-dba/05-2006/msg00000.html
    B.
    - Users can subscribe to your list by sending email to
    ora-apps-dba-request_at_freelists.org with 'subscribe' in the Subject field
    C.
    http://www.freelists.org/archives/ora-apps-dba/05-2006/threads.html

  • How to reduce the size of the search portlet

    How to reduce the size of the search portlet inserted into a
    page?
    Thanks,
    Mara

    Mara,
    you can reduce the size of the portlet customizing the HTML
    code... i had the same problem and i reproduced the search
    portlet with a dynamic page, customizing my HTML and using the
    categ. & perspective IDs of the original portlet. It works but
    is not an elegant way to do this... i'm searching a better way
    to do it. If you'll find, please let me know....
    Fab

  • How to set the heap size of JVM

    please let me know that how to set the heap size of JVM

    C:\>java -X
        -Xmixed           mixed mode execution (default)
        -Xint             interpreted mode execution only
        -Xbootclasspath:<directories and zip/jar files separated by ;>
                          set search path for bootstrap classes and resources
        -Xbootclasspath/a:<directories and zip/jar files separated by ;>
                          append to end of bootstrap class path
        -Xbootclasspath/p:<directories and zip/jar files separated by ;>
                          prepend in front of bootstrap class path
        -Xnoclassgc       disable class garbage collection
        -Xincgc           enable incremental garbage collection
        -Xbatch           disable background compilation
        -Xms<size>        set initial Java heap size
        -Xmx<size>        set maximum Java heap size
        -Xss<size>        set java thread stack size
        -Xprof            output cpu profiling data
        -Xrunhprof[:help]|[:<option>=<value>, ...]
                          perform JVMPI heap, cpu, or monitor profiling
        -Xdebug           enable remote debugging
        -Xfuture          enable strictest checks, anticipating future default
        -Xrs              reduce use of OS signals by Java/VM (see documentation)look at the -Xm? lines
        -Xms<size>        set initial Java heap size
        -Xmx<size>        set maximum Java heap sizeThis can be used e.g. like this:java -Xms8M -Xmx32M MyProgwhich runs MyProg in a java VM with the initial heap size of 8 MB and a maximum heap size of 32 MB.
    - Marcus

  • Upto how much I can set maximum Heap size for jvm?

    I am running application on 8GB RAM Windows 64 bits machine.
    I am running out of OutOfMemory (Heap Space). I want to increase the Heap Size for my jvm.
    But can anybody please tell me what is the limit by which I can set the maximum size for heap?
    Thanks in Advance,
    Jenish

    Max allowed memory per process is 2 raised to the 64th power. What maximum memory you can set depends on the memory available
    for your application. You may be able to set more than 8GB ram then it will use the swap space and it will slow down your application
    performance. So try different memory size and see which one works best for your application.

  • Maximum heap size of JVM

    hi,
    I need to set the maximum heap size of the JVM. I know that I can do
    it for a single run by saying:
    java -Xmx75M example.class
    But how do I make the JVM use this maximum heap size for all its
    runs, without specifying '-Xmx75M' in every run.
    I need this because I am using my system as a server for JSP web
    site. For that site if a very simple query is given such as 'a' in title, as many as 6000
    records as retrieved from my Filemaker Databases and the java
    ResultSet object is not able to handle those records. The system is
    then throwing an exception and error message 'Host not found' is
    sent back to the client's browser. As far as I know, Filemaker does
    not support 'LIMIT' keyword in queries.
    So please tell me how can I rectify that problem.
    Thanks in advance,
    niranjan maturi

    hi,
    I tried setting TOMCAT_OPTS. The maximum I could go in my system is 1300M
    i.e. set TOMCAT_OPTS="-DXmx=1300m".
    Still I am having the problem that when some 5000 records are fetched from the database, the ResultSet object is not able to handle them. It is able to handle upto 2000 records. I am using windows2000, jdk1.3.2 and Filemaker Pro 5.0 databases.
    I tried to set the maximum number of records that can be retrieved to 2000 so that the problem will be solved. But I am not able to set that as well. I did:
    Class.forName("com.fmi.jdbc.JdbcDriver").newInstance();
    Connection con = DriverManager.getConnection("standard statement");
    PreparedStatement pstmt = con.prepareStatement("select id, pubyear, Checkedoutby, >>callnumber from mprrc_materials");
    pstmt.setFetchSize(2000);
    ResultSet rs3 = pstmt.executeQuery();Its giving the error:
    java.lang.AbstractMethodError at that setFetchSize() statement.
    I guess the JDBC driver provided by Filemaker Pro does not support that. So what can be done to solve the problem.
    Thanks,
    Niranjan Maturi

  • How to increase heap size in java code, not using "java -Xms64m "

    Im writing a java programme for loading the german dictionary. my dictionary is very huge(around 300000+ words).
    while loading the dictioanry im getting error "OutOfMemoryError" .
    I found one solution to increase the heap size, but i want to increase the heap size in java programmer itself, not outside jar file. so i could not use "-Xms64m" option of jvm.
    Can anyone tell me how can i do this

    sunlover1984 wrote:
    Im writing a java programme for loading the german dictionary. my dictionary is very huge(around 300000+ words).
    while loading the dictioanry im getting error "OutOfMemoryError" .
    I found one solution to increase the heap size, but i want to increase the heap size in java programmer itself, not outside jar file. so i could not use "-Xms64m" option of jvm.
    Can anyone tell me how can i do thisThat option is a startup option for the JVM. That means if your jar is already loaded then you are already too late to try and call it.

Maybe you are looking for

  • Imac doesn't recognize my external hard drive--all of a sudden

    i've been using a LaCie external hard drive as my timemachine back up for several years without incident.  a few days ago i unplugged the lacie and when i plugged it back in, imac could no longer recognize it.  when i go to time machine and try to"se

  • Flash Player not working on other user accounts, only main.

    I have this problem everytime Flash updates and have only been able to fix it twice. On a Windows XP SP 2 I have 3 accounts. The main administator, an administator, and a guest account. Flash Player works for the main admin but not for the guest or o

  • While using airplay iPhone won't ring

    While using airplay my iPhone will not ring.  The music cuts out and the phone will vibrate for a short time but won't ring through the speakers like it did before this last update.  This behavior happens with both iPhone 5c and 4s. 

  • Depriciation Posting with Non-Leading Ledger

    Dear SAP Asset Experts,      I am struggling a lot for Depreciation Posting with  Non-Leading Ledgers. I have configured Non-Leading Ledgers and Assign with Dep areas, 1 - Define How Depreciation Areas Post to General Ledger Asset Accounting  Integr

  • Upload Component, Pass extra Variable

    Hello all. I have been trying to get an upload component to work for some time now, but have been having a few troubles getting one to do what i need.  Recently i found a component that does pretty much everything i want bar one thing, pass an extra