wsadmin tool performance tips

The following performance tips are for the wsadmin tool:

  1. When you launch a script using wsadmin.sh, a new process is created with a new JVM API. If you use scripting with multiple wsadmin -c commands from a shell script, these commands execute slower than if you use a single wsadmin -f command. The -f option runs faster because only one process and JVM API are created for installation and the Java classes for the installation only load once.

    The following example executes multiple application installation commands from a script.

    wsadmin -c "$AdminApp install /myApps/App1.ear {-appname appl1}"
    wsadmin -c "$AdminApp install /myApps/App2.ear {-appname appl2}"
    wsadmin -c "$AdminApp install /myApps/App3.ear {-appname appl3}"
    
    

    A faster way would be to put the following in a file, filename.jacl...

    $AdminApp install /myApps/App1.ear {-appname appl1}
    $AdminApp install /myApps/App2.ear {-appname appl2}
    $AdminApp install /myApps/App3.ear {-appname appl3}
    
    

    Then invoke filename.jacl file using:

    wsadmin -f appinst.jacl

  2. Use the AdminControl queryNames and completeObjectName commands carefully with a large installation.

    If there are only a few beans on a single machine, the command...

    $AdminControl queryNames *
    ...performs well. If a scripting client connects to the deployment manager in a multiple machine environment, use a command only if it is necessary for the script to obtain a list of all the Mbeans in the system.

    If you need the Mbeans on a node, it is faster to invoke

    $AdminControl queryNames node=nodename,*

    The JMX system management infrastructure forwards requests to the system to fulfill the first query, * . The second query, node=nodename,* is targeted to a specific machine.

  3. WAS is a distributed system, and scripts perform better if you minimize remote requests.

    If some action or interrogation is required on several items, for example, servers, it is more efficient to obtain the list of items once and iterate locally. This procedure applies to actions that the AdminControl command performs on running MBeans, and actions that the AdminConfig command performs on configuration objects.


 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.