JVM tuning Xms Xmx etc - Weblogic

This is a discussion on JVM tuning Xms Xmx etc - Weblogic ; 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 processor= s and 4-8Gb of ...

+ Reply to Thread
Results 1 to 2 of 2

JVM tuning Xms Xmx etc

  1. Default JVM tuning Xms Xmx etc

    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 processor=
    s and 4-8Gb of RAM, and some exceptions such as for instance 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 development tests done in the la=
    bs in Cary, NC - USA have resulted in recommendations that show lower value=
    s ) we would like to have some more info because not all info we have point=
    s to the same directions. For instance=20
    1. What are theoretically the maximum values for these settings (in particu=
    lar Xms and Xmx)?
    2. Should Xms and Xmx be set to the same value (as mentioned in info from y=
    our website - see below), or are there situations where different values co=
    uld improve performance ?
    3. Is there other general advice you can give for improving performance usi=
    ng these settings ?

    Extra info pices inserted below.

    Kind regards,
    Jos van der Velden
    SAS Portugal
    *********************************************************EXTRA_INFO_1

    Setting WebLogic Managed Server Memory Arguments
    The following memory arguments for the WebLogic Managed Server are recommen=
    ded by development:

    -server =C3=A2=E2=82=AC=E2=80=9CXms512m =C3=A2=E2=82=AC=E2=80=9CXmx512m =C3=
    =A2=E2=82=AC=E2=80=9CXX:NewSize=3D64m

    =C3=A2=E2=82=AC=E2=80=9CXX:MaxNewSize=3D64m =C3=A2=E2=82=AC=E2=80=9CXX:MaxP=
    ermSize=3D128m =C3=A2=E2=82=AC=E2=80=9CXss128k

    -XX:-UseTLAB =C3=A2=E2=82=AC=E2=80=9CXX:+UseConcMarkSweepGC

    -XX:+UseCMSCompactAtFullCollection

    -XX:+DisableExplicitGC

    -Dsun.rmi.dgc.client.gcInterval=3D3600000

    -Djava.awt.headless=3Dtrue

    -Djava.security.manager

    These options can be specified via the WebLogic Administrator Console in th=
    e Arguments field under the Remote Start tab in the properties for the WebL=
    ogic Managed Server.

    source: SAS installation manual (draft version)
    *********************************************************EXTRA_INFO_2

    Argument
    Description
    =20
    -Xms and -Xmx=20
    Specify the minimum and maximum values (in megabytes) for Java heap memory=
    ..=20

    For example, you may want to start the server with a default allocation of =
    200 megabytes of Java heap memory to the WebLogic Server. To do so, you can=
    start the server with the java -Xms200m and -Xmx200m options.=20

    For best performance it is recommended that the minimum and maximum values =
    be the same so that the JVM does not resize the heap.

    The values assigned to these parameters can dramatically affect the perform=
    ance of your WebLogic Server and are provided here only as general defaults=
    .. In a production environment you should carefully consider the correct mem=
    ory heap size to use for your applications and environment.
    =20

    source: http://e-docs.bea.com/wls/docs70/adm...startstop.html

    *********************************************************EXTRA_INFO_3

    set MEM_ARGS=3D[-XmsNumberm] [-XmxNumberm]=20

    where Number is a numerical value in megabytes (MB). The-XmsNumberm argumen=
    t establishes a minimum heap size for the JVM and the -XmxNumberm sets a ma=
    ximum heap size. By default, the minimum heap size is 23 MB and the maximum=
    heap size is 200 MB.

    source: http://e-docs.bea.com/wls/docs81/adm...e.html#1192313

    *********************************************************EXTRA_INFO_4
    Java Heap Size Options
    You achieve best performance by individually tuning each application. Howev=
    er, configuring the Java HotSpot VM heap size options listed in Table 3-2 w=
    hen starting WebLogic Server increases performance for most applications.

    These options may differ depending on your architecture and operating syste=
    m. See your vendor's documentation for platform-specific JVM tuning options=
    ..=20

    Table 3-2 Java Heap Size Options =20
    Task
    Option
    Recommended Value
    =20
    Setting the New generation heap size
    -XX:NewSize
    Set this value to a multiple of 1024 that is greater than 1MB. As a genera=
    l rule, set -XX:NewSize to be one-fourth the size of the maximum heap size.=
    Increase the value of this option for larger numbers of short-lived object=
    s.

    Be sure to increase the New generation as you increase the number of proces=
    sors. Memory allocation can be parallel, but garbage collection is not para=
    llel.
    =20
    Setting the maximum New generation heap size
    -XX:MaxNewSize
    Set this value to a multiple of 1024 that is greater than 1MB.
    =20
    Setting New heap size ratios
    -XX:SurvivorRatio
    The New generation area is divided into three sub-areas: Eden, and two sur=
    vivor spaces that are equal in size.=20

    Configure the ratio of the Eden/survivor space size. Try setting this value=
    to 8, and then monitor your garbage collection.
    =20
    Setting minimum heap size
    -Xms
    Set the minimum size of the memory allocation pool. Set this value to a mu=
    ltiple of 1024 that is greater than 1MB. As a general rule, set minimum hea=
    p size (-Xms) equal to the maximum heap size (-Xmx) to minimize garbage col=
    lections.
    =20
    Setting maximum heap size
    -Xmx
    Set the maximum size of the memory allocation pool. Set this value to a mu=
    ltiple of 1024 that is greater than 1MB.
    =20
    Note: For information about setting the appropriate heap sizes for WebLogic=
    's JRockit JVM, see WebLogic JRockit Documentation.

    source: http://e-docs.bea.com/wls/docs81/per...g.html#1115453

  2. Default Re: JVM tuning Xms Xmx etc

    <Jos van der Velden> wrote in message news:600011589@newsgroups.bea.com...
    > 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 process=

    ors and 4-8Gb of RAM, and some exceptions such as for
    instance a test-machine we have at the moment with 4 processors and 20 Gb o=
    f RAM.
    >
    > Although we seem to be able to improve performance by raising the setting=

    s for Xms and Xmx to 1024m ( even though our development
    tests done in the labs in Cary, NC - USA have resulted in recommendations t=
    hat show lower values ) we would like to have some more
    info because not all info we have points to the same directions. For instan=
    ce
    > 1. What are theoretically the maximum values for these settings (in parti=

    cular 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 where
    different 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 u=

    sing 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 en=
    ough.


    Regards,


    Slava Imeshev

+ Reply to Thread