Set Xms/Xmx based on Jconsole memory monitoring

I used jconsole to monitor memory usage of a java server program running with JDK 1.5.0.3 in Linux, in order to set the Xms/Xmx option for the program. I found that memory usage of the process is no more than 4MB. But somehow after setting the Xms/Xmx to be 4MB, the server program could not run (its client programs could not connect to it). So I tuned the Xms/Xmx value and when I raised them to 512MB, then the server worked again.
I don't understand why this happens. Is Jconsole reading not a good reflection of the heap memory usage? Or something else might be wrong?
Thanks for any idea on this.

<Jos van der Velden> wrote in message news:[email protected]..
Hi,
We are using weblogic 8.1 sp3 with the jdk1.4.2_05 (we do not use jrocket) for the implementation of some of our solutions.
We are trying to optimize performance generally on servers with 2 processors and 4-8Gb of RAM, and some exceptions such as forinstance a test-machine we have at the moment with 4 processors and 20 Gb of RAM.
>
Although we seem to be able to improve performance by raising the settings for Xms and Xmx to 1024m ( even though our developmenttests done in the labs in Cary, NC - USA have resulted in recommendations that show lower values ) we would like to have some more
info because not all info we have points to the same directions. For instance
1. What are theoretically the maximum values for these settings (in particular Xms and Xmx)?Theoretically the maximum is a memory space addressable by a process.
2. Should Xms and Xmx be set to the same value (as mentioned in info from your website - see below), or are there situations wheredifferent values could improve performance ?
For a production environment Xms and Xmx should be equal so that JVM doesn't
spend time shrinking and expanding heap.
3. Is there other general advice you can give for improving performance using these settings ?Generally it is a good idea to keep heap under 1G. Bigger heap means longer GC-s.
You may consider co-locating cluster nodes running in separate JVMs if you have
enough CPUs and extensive RAM. Generally 2 CPUs per weblogic instance is enough.
Regards,
Slava Imeshev

Similar Messages

  • -Xms -Xmx /  Problem increasing plugin memory

    A very interesting problem..
    On a Win2000 Professional m/c with plugin versions 1.3.*,1.4.*, IE 5.5
    I am trying to extend the memory 768M to 1G by doing
    -Xms768M -Xmx1024M
    I tried different combinations of max and min heap size.
    Anything more than a 256M makes the browser crash. Sometimes that happens even for 256M.
    Any idea??
    I would greatly appreciate any inputs.
    Thanks
    aabr.

    I have been having this same problem with an application we deploy for about 2 years! I've never been able to find out what exactly the problem is... Now, we are moving to WebStart, I thought getting away from IE would be a good way to get away from this problem, but WebStart also crashes when using "certain" values for -Xms and -Xmx
    What do we do now, I know there must be lots of people with this problem. I'll open a new POST on the WebStart forum, since it happens on it also.
    I really want to get this problem fixed.

  • Java Heap Sizes  -Xms  -Xmx

    Gurus,
    Could some body help me to understand the differentiate between heap size parameters -Xms and -Xmx ? I usually change both of them. One another is that, the maximum heap size we can use is total ram/2 ?
    Thanks,

    Text from the above link
    ==================
    As part of the Best Practices, we know that we should be setting -Xms & -Xmx Java command line parameters. What are these settings and why is it required to set these.
    As JAVA starts, it creates within the systems memory a Java Virtual Machine (JVM). JVM is where the complete processing of any Java program takes place. All JAVA applications (including IQv6) by default allocates & reserves up to 64 MB of memory resource pool from the system on which it is running.
    The Xms is the initial / minimum Java memory (heap) size within the JVM. Setting the initial memory (heap) size higher can help in a couple of ways. First, it will allow garbage collection (GC) to work less which is more efficient. The higher initial memory value will cause the size of the memory (heap) not to have to grow as fast as a lower initial memory (heap) size, thereby saving the overhead of the Java VM asking the OS for more memory.
    The Xmx is the maximum Java memory (heap) size within the Java Virtual Memory (JVM). As the JVM gets closer to fully utilizing the initial memory, it checks the Xmx settings to find out if it can draw more memory from the system resources. If can, it does so. For the JVM to allocate contiguous memory to itself is a very expensive operation. So as the JVM gets closer to the initial memory, the JVM will use aggressive garbage collection (to clean the memory and if possible avoid memory allocation), increasing the load on the system.
    If JVM is in need of memory beyond the value set in Xmx, the JVM will not be able to draw more memory from system resource (even if available) and run out of memory. Hence, the -Xms and -Xmx memory parameters should be increased depending upon the demand estimation of the system. Ideally both same should be the same value (set at maximum possible as per demand estimation). This ensure that the maximum memory is allocated right at the start-up eliminating the need for extra memory allocation during program execution. We recommend aggressive maximum memory (heap) size of between 1/2 and 3/4 of physical memory.
    Edited by: oracleSQR on Oct 7, 2009 10:38 AM

  • ABAP debugger - Memory monitoring

    When in a debugging mode, go to menu --->
    Settings -> Memory monitoring (turn on this setting).
    However, since this feature is turned on, where do I get the result of the trace?

    Hi,
      You can check the results in the debugging mode itself,by clicking the "setting" button after the "overview" button.
    Go to table & give the internal table name & it will tell you the Memory Allocated & Memory used by the internal table.
    If you click on one of the lines of the internla table,it will give you the memory used by that particular line.

  • Memory monitoring in ABAP debugger

    Can anyone tell me the relevance of memory monitoring in ABAP debugger and and how to use it practically. I have searched the forums but did not find anything.

    Hi Sameer,
    If you choose the Settings pushbutton and select the Memory Monitoring radio button, or if you choose the menu Settings  ® Memory Monitoring, the system will inspect the roll area of the current mode after every ABAP statement. This allows you to check whether neighboring memory areas have been overwritten.
    The system checks of the memory segments  in order to find the memory overwrites for each executed statement. SAP uses this settings internally to find potential kernal bugs. Turning on this setting significantly decreases application performance.
    This internal setting is not relavent for ABAP developers.
    please check this link
    http://www.sappro.com/downloads/Settings&SystemAreas.pdf
    http://help.sap.com/saphelp_nw70/helpdata/en/c6/617d0ce68c11d2b2ab080009b43351/content.htm
    best regards,
    raam

  • How do I set-up my TV as a dual monitor for my MacBook Pro?

    Hi
    I have a mid-2009 MacBook Pro running (OS X 10.8.2) Mountain Lion, and recently I rearranged my home workspace so that I can view my TV from my desk while I work.
    I would like to set-up my TV as a dual monitor for my MacBook Pro, so I can stream videos on my TV screen and have the whole screen to do work on my MacBook Pro at the same time.
    Is this possible? I've seen people use TVs as a mirror display (where it works as their main and only monitor), but never as a fully operational dual display.
    As an example, I would like to have my MacBook screen showing a desktop with the whole screen devoted to Photoshop, while I have another desktop running on my TV, which shows an internet browser or other application.
    If this is possible, what cords/hardware would I need, and what are the settings that will enable me to do this?
    - My TV is a modern flatscreen LCD, and it has two HDMI ports in the back.
    - It's about 9-10 feet from my desk.
    If anyone could help, that'd be awesome!
    Thanks.

    Yes, you can do that.
    You'll need a mini displayport to HDMI adaptor:
    http://store.apple.com/us/product/H1824ZM/A/moshi-mini-dp-to-hdmi-adapter-with-a udio-support
    and an HDMI cable long enough to reach your TV
    (look on Amazon or Monoprice for the best price on any of those parts)
    In your display options, you will just choose extended desktop vs mirrored display.

  • How to use Memory Monitor on Sun ONE Studio 4 ??

    Hello,
    I am creating a midlet using the Nokia 7210 emulator. When trying to load a Canvas, an "Unable to run application" alert appears and the midlet quits.
    Presuming this is due to a memory problem, I've inserted a System.gc() call before I create the new canvas, but the midlet still exits.
    So to help me get to the bottom of it, I thought I had best try s1s4's Memory Monitor utlity - but I can't get it to work. I have ticked the 'Enable Memory Monitor' box on the Monitor tab of Preferences for the Installed Emulator (J2ME Wireless Toolkit 1.0.4_01), but nothing happens after the midlet runs and quits.
    Does anyone have any suggestions?
    Many thanks in advance,
    James

    I don't know. I've never tried.
    Look at the manual (7210midpSimGuide.pdf in the docs directory). Maybe there is something in there. In the command line options there are a bunch of tracing options that you can specify, like tracing allocations, garbage collections, stackmaps, etc.
    shmoove

  • How can i target a movie of which i set the name based on a variable?

    Hi.
    I have the attached code:
    And i want to target the imgHolder
    ; that i have just created through the while function. I mean I
    attach a movieclip from the library to which I give a name composed
    from "imgHolder"+i where i is the number of the node from the xml.
    After that i want to succesfully target the newly created
    movieclip and get it's _x so i can attach the next movieclip next
    to the previous one. After that i will have a set of function based
    on the "imgHolder"+i movieclip.
    But i need to know how to succesfully target the movieclip.
    Thanks a lot.

    use the attach code option to display code in this forum.
    otherwise, your code is altered and difficult to read.

  • WTK�s memory monitor is very slow

    Hello people! I was using the WTK�s(2.2) memory monitor and it�s woking well. But now, the momory monitor is too slow. Almost stopping the application (a simple game). I don�t understand, the system is the same! The code is the same! The computer is the same! Somebody can help me? Thanks!

    Run Etrecheck and post the results
    You backed up first and made a clone of your system?
    You used Recovery Mode and Disk Utility to repair the drive.
    Use to be we HAD TO clear system cache and extension caches before doing any type of install or upgrade.
    Maybe the report will show some possible explanation, incl. if the directory is healthy.

  • How to set dynamic color , based on xml element

    Hi,
    We have a requirement, where based on certain conditions, a cell will be shown in a specific color. We would like the coloir to be based on an XML element. The xml element will have values like '#FF00FF' etc..
    We tried using xsl attribute with the following syntax ,
    <xsl:attribute xdofo:ctx="block"name="color"><?stdcolor?></xsl:attribute><?end if?>
    where stdcolor is the xml element, but when we use this , this is giving a syntax error.
    Let us know, if this is possible or is there any other alternate way to do this.
    Regards,
    - Vasu -

    Hi Vasu,
    http://winrichman.blogspot.com/2008/09/how-to-set-dynamic-color-based-on-xml.html
    use the following :)
    <xsl:attribute xdofo:ctx="block" name="color" ><xsl:value-of select="stdcolor" /></xsl:attribute>
    TO get the colors you wanted , you can refer to
    http://www.w3schools.com/Html/html_colors.asp

  • Memory monitor for Project Raptor

    I have earlier written a Memory monitor for JDeveloper 10.1.3 EA, where you can see the heap memory being consumed by the IDE.
    This works for raptor too due to its JDeveloper base.
    The extension was included in the JDeveloper Check for Updates.
    You can use the same extension for Raptor also.
    Option 1 : Use Check for updates by adding the following update center link:
    Update Center : http://myjavaserver.com/~rajvissa/center.xml
    Option 2: download the jar file and drop into ur < RAPTOR_HOME >/jdev/extensions folder
    Link: http://jroller.com/resources/r/rajvissa/memory.monitor.10.1.3.jar
    How it looks:
    Memory monitor for Project Raptor : http://www.jroller.com/page/rajvissa?catname=/JDeveloper
    Probably Raptor can add this to their update center like JDeveloper 10.1.3 EA.
    I tried this and found that raptor's memory consumption is < 70MB most of the time (I am not a DBA)

    Hi
    I installed it with option 2: option 1 did not work. I am unsure if it's my issue or general.
    Nice... I can control the amount of used memory!!
    Thanks,
    Andrea

  • EHS: Set up Table-based Value assignment Error.

    Hi all,
    We are customizin Basic Data & Tools and when trying to set table based assignments (table TCG11_VAI; program RC1TCG11_02) we are getting no entries in the table. The message shown is always <i>"0 unchanged entries, 0 new entries, 0 entries deleted"</i> independant on the entry criteria
    The problem is that we can create those entries manually but it will be endless
    Has this happened to anyone before? Any idea?
    Many thanks and regards,
    Alberto

    Hi all,
    We have just find the solution.
    Just for your information the problem was that the IMG activity "Adopt
    Standard Specification Database" was executed but not working properly
    because no data can be copied from client 000. Then when executing "Set
    Up table Based Value Assignment" no entries were made in the table. We
    have just change the client, execute "Adopt Standard Specification
    Database" and then "Set Up table Based Value Assignment" and now is
    working properly
    Alberto

  • Setting Overrides on all relevant Rules and Monitors

    Can someone please help me with the following question? I was reading the post below (I believe written by
    Cameron
    Fuller) detailing some best practice around overrides. It stated if you override a ‘parameter’ for one rule/monitor (e.g. let’s say a parameter
    dealing with a threshold) you should override the parameter for ‘all’ rules and monitors 'that use this parameter'. More information from the post below
    Make sure that an overridden parameter is set for every rule and for every monitor that uses the parameter
    When you override a parameter, make sure that the parameter is configured for each rule that uses the parameter and for each monitor that uses the parameter. There may be more than
    one rule or monitor that uses the particular parameter. For example, the following rules and monitors use the
    Intersite Expected Max Latency parameter: Monitors
    AD Replication Monitoring
    Rules
    AD Replication Performance Collection - Metric Replication Latency
    AD Replication Performance Collection - Metric Replication Latency: Maximum
    AD Replication Performance Collection - Metric Replication Latency: Minimum
    AD Replication Performance Collection - Metric Replication Latency: Average
    Now my question is:
    How do I discovery all the rules/monitors that are using this particular ‘parameter’?
    For example using either PowerShell or SQL query. If PowerShell I assume you would have to
    use Get-Rule or Get-SCOMRule with the –Criteria filter. Does anyone have an example please?
    As a side note I could do the following in PowerShell as one way to find all cmdlets what use the –path parameter as one of their parameters
    Get-Command -CommandType cmdlet | where {$_.parameters.keys -eq "path"}
    So to recap: As above if I want to set an override on ‘Intersite Expected Max Latency’
    for a given rule or monitor how do I find all other rules/monitors also use ‘Intersite Expected Max Latency’
    as I can override these too?
    Thanks All
    AAnotherUser__
    AAnotherUser__

    Hi,
    We may use the specific word to filter out those proper rules and monitors, to filter out all monitors that which name contains latency:
    get-scommonitor -name “*latency*”
    Please refer to the below links to find more details about the get-scomrule and get-scommonitor command:
    Get-SCOMRule
    http://technet.microsoft.com/en-us/library/hh918556(v=sc.20).aspx
    Get-SCOMMonitor
    http://technet.microsoft.com/en-us/library/hh918469(v=sc.20).aspx
    Regards,
    Yan Li
    Regards, Yan Li

  • Set a variable in SAP/ABAP memory

    Hi,
    We run a transaction in asynchronous mode or synchronous mode. When we set a variable in the SAP memory when running in synchronous mode, it is getting stored and we are able to get it back.
    But when we run the transaction in default asynchronous mode, it is not setting the variable in the SAP memory and not getting it back.
    Note: By default it runs in asynchronous mode, we set it to synchronous mode only through debugging.
    Can someone please tell me how we can store the variable in the SAP memory when it runs in asynchronous mode ?
    Thanks
    Priya.

    Hi Priya,
    Import and Export parameters cannot be used directly to implement in asynchronous transactions.
    You program an asynchronous method in the implementation program between the macro instructions BEGIN_METHOD <Method> and END_METHOD .
    The system generates an implementation from the specifications you made when defining the method. The unique ID of the object is available in the structure of the key fields under the variable OBJECT-KEY .
    An asynchronous method can be implemented with a transaction. The transaction is called in the program with the ABAP command CALL TRANSACTION . The input fields in the first screen of the transaction are assigned values from the key fields of the object and possibly from the import parameters of the method via processing parameters ("SET/GET parameters"). This first screen is then skipped when the transaction is called (... AND SKIP FIRST SCREEN ).
    Example
    Implementing the method EditAsynchron ( Change quality notification asynchronously ).
    The method operates on an object of the type BUS2078 ( quality notification). This object type has the key field Number ( notification number ). This method has no import parameters.
    You implement this method by calling transaction QM02 .
    When called, the transaction requires the sales document that is available as key of the object from the variable OBJECT-KEY-NUMBER .
    Method Edit (simplified)
    BEGIN_METHOD EditAsynchron CHANGING CONTAINER.
      SET PARAMETER ID 'IQM' FIELD OBJECT-KEY-NUMBER.
      CALL TRANSACTION 'QM02' AND SKIP FIRST SCREEN.
    END_METHOD.

  • Memory Monitor

    I am trying to instrument a large application to monitor for possible memory leaks in the current or future versions.
    I am using a similar approach to ...\Labview 8.2\Examples\memmon.llb\Memory Monitor.vi.  One problem is that the VI Server property VI.Metric.DataSize does not seem to be available if the VI is running (or waiting to run).  The property node returns error 1000, VI not is a .  Is there any other way to programmatically get detailed memory statistics for each VI?  Why is this information available in the profiler and in the VI Properties->Memory Usage window but not in a property node?
    It  would also be great to get a list of all active queues and notifiers on the system, but I suspect this is not available anywhere.  If anyone has good ideas about this, it would be great.
    Thanks,
    Jason Dunham

    Jason,
    Unfortunately, I am not aware of a way to do this programmatically.  As for the VI property Metrics:Total Data Size, according to the LabVIEW help, you cannot read this property if the VI is running.  Please see this post for the reasoning behind this.
    Regards,
    Craig D
    Applications Engineer
    National Instruments

Maybe you are looking for

  • Email Notification of Purchase Order

    Hi Gurus We are on SAP 4.7 doing an MM implementation. We have the following requirement: We have 2 levels of PO release. When the PO is created or changed, an email notification should be sent to the person responsible for 1st release. When the 1st

  • How to get rid of 7.0.3 and get back to 6.5.2

    I bought QuickTime Pro 6 early last year and have since been - mindlessly, I admit - routinely accepting the automatic upgrades to QuickTime. It never occurred to me that an upgrade would reduce the functionality of the product. I don't use QT much s

  • WAP200 and entry for primary dns cannot be 0 and 255

    I have a wap200 with a static ipaddress e.g. 192.168.249.205/24 (it is for management and is in vlan 1). Firmware of the wap is 2.0.4.0. No gw and no dns. (they are not necessary) I export the config . I have a second wap200 and import the config.bin

  • Typing messages in Spanish

    Does anyone know if you can change the keyboard to allow for accents used in Spanish?

  • Can't update iPod to 1.2 with iTunes 7.0

    Hey... I just recently installed iTunes 7, and I can use the music store just fine. However, when I try to update my iPod to version 1.2, I receive and error stating: "iTunes could not connect to the iPod update server because you are not connected t