ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzatz_5.4.0.1/51/admin/prftunewsa.htm

57 lines
3.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>Performance tips for wsadmin</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h4><a name="prftunewsa"></a>Performance tips for wsadmin</h4>
<ul>
<li><p>When you run a command from wsadmin, a new process is created with a new Java virtual machine (JVM). If you run multiple wsadmin -c commands from a batch file or a shell script, each command must run in its own JVM. The -f option creates only one process and JVM, and the Java classes are loaded only once, regardless of how many commands are in the file.</p>
<p>The following examples invoke multiple application installation commands:</p>
<ul>
<li><p><strong>Jacl:</strong></p>
<pre>wsadmin -c &quot;$AdminApp install /home/myApps/App1.ear {-appname appl1}&quot;
wsadmin -c &quot;$AdminApp install /home/myApps/App2.ear {-appname appl2}&quot;
wsadmin -c &quot;$AdminApp install /home/myApps/App3.ear {-appname appl3}&quot;</pre></li>
<li><p><strong>Jython:</strong></p>
<pre>wsadmin -lang jython -c &quot;AdminApp.install('/home/myApps/App1.ear',
'[-appname appl1]')&quot;
wsadmin -lang jython -c &quot;AdminApp.install('/home/myApps/App2.ear',
'[-appname appl2]')&quot;
wsadmin -lang jython -c &quot;AdminApp.install('/home/myApps/App3.ear',
'[-appname appl3]')&quot;</pre></li>
</ul>
<p>To improve performance, you can run the wsadmin command with the -f option and specify a file that contains the installation commands.</p>
<ul>
<li><p><strong>Jacl:</strong>
<br>The file is named appinst.jacl, and it contains these commands:</p>
<pre>$AdminApp install /home/myApps/App1.ear {-appname appl1}
$AdminApp install /home/myApps/App2.ear {-appname appl2}
$AdminApp install /home/myApps/App3.ear {-appname appl3}</pre>
<p>To invoke the file, run this command:</p>
<pre>wsadmin -f appinst.jacl</pre></li>
<li><p><strong>Jython:</strong>
<br>The file is named appinst.py, and it contains these commands:</p>
<pre>AdminApp.install('/home/myApps/App1.ear', '[-appname appl1]')
AdminApp.install('/home/myApps/App2.ear', '[-appname appl2]')
AdminApp.install('/home/myApps/App3.ear', '[-appname appl3]')</pre>
<p>To invoke the file, run this command:</p>
<pre>wsadmin -lang jython -f appinst.py</pre></li>
</ul><p></p></li>
<li><p>The AdminControl queryNames and completeObjectName commands can consume a large amount of resources in more complex topologies. For example, if you run a single instance that contains only a few MBeans, the <tt>$AdminControl queryNames *</tt> command performs well. However, 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 of the MBeans in the system. If you need the MBeans on a specific node, it is recommended that you run the command as follows:</p>
<pre>$AdminControl queryNames node=myNode,*</pre>
<p>In this example, the command returns a list of only the MBeans on myNode.<p></li>
</ul>
</body>
</html>