wsadmin tool performance tips - WAS 6.x

 

wsadmin tool performance tips

 

+

Search Tips   |   Advanced Search

 

The following performance tips are for the wsadmin tool:

  • If the deployment manager is running at a higher service maintenance level than that of the node agent, run the wsadmin.sh or the wsadmin.bat from the bin directory of the deployment manager.

  • When you launch a script using the wsadmin.bat or the wsadmin.sh files, a new process is created with a new JVM API. If you use scripting with multiple wsadmin -c commands from a batch file or a shell script, these commands run 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 load only once.

    The following example, illustrates running multiple application installation commands from a batch file:

    Jacl...

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

    or

    Jython...

    wsadmin -lang jython -c "AdminApp.install('c:\myApps\App1.ear', '[-appname appl1]')"
    wsadmin -lang jython -c "AdminApp.install('c:\myApps\App2.ear', '[-appname appl2]')"
    wsadmin -lang jython -c "AdminApp.install('c:\myApps\App3.ear', '[-appname appl3]')"
    

    ...or for example, using Jacl, one can create the appinst.jacl file that contains the commands...

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

    Invoke this file using the following command...

    wsadmin -f appinst.jacl

    Or using Jython, one can create the appinst.py file, that contains the commands

    AdminApp.install('c:\myApps\App1.ear', '[-appname appl1]')
    AdminApp.install('c:\myApps\App2.ear', '[-appname appl2]')
    AdminApp.install('c:\myApps\App3.ear', '[-appname appl3]')
    

    Then invoke this file using the following command: wsadmin -lang jython -f appinst.py.

  • Use the AdminControl queryNames and completeObjectName commands carefully with a large installation. For example, if only a few beans exist on a single machine, the $AdminControl queryNames * command 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 we need the MBeans on a node, it is easier to invoke "$AdminControl queryNames node=mynode,*". The JMX system management infrastructure forwards requests to the system to fulfill the first query, *. The second query, node=mynode,* is targeted to a specific machine.

  • The 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 the actions that the AdminControl object performs on running MBeans, and actions that the AdminConfig object performs on configuration objects.