📄 appd_tru.htm
字号:
<br /><table summary="This is a layout table to format a note" title="This is a layout table to format a note" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong>Note:</strong>
</font>
</p>Oracle Corporation does not support versions of the Oracle executable optimized using the <code>spike</code> command. If you encounter a problem in an Oracle9<em>i</em> binary that has been optimized using Spike, reproduce the problem with the original un-optimized binary. If the problem persists, see the <a href="preface.htm#CIAGEHFG">"Preface"</a> for information on Oracle services and support.
</td>
</tr></tbody>
</table><br />
</div>
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref736" name="sthref736"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Using Spike
</font>
</h3>
<p>This section describes the system resources required by Spike, how and why to use Spike optimization flags, and the various ways to run Spike.
</p><a id="i631275" name="i631275"></a>
<br /><strong><font face="arial, helvetica, sans-serif" size="+1">Setting System Resources
</font></strong><br />
<p><a href="#g640615">Table D-2</a> lists the system resources required to run Spike.
</p><a id="sthref737" name="sthref737"></a><a id="g640615" name="g640615"></a>
<p><strong><em><font face="arial, helvetica, sans-serif">Table D-2 System Resource Requirements for Spike
</font></em></strong></p>
<table title="System Resource Requirements for Spike " summary="This table shows the system resources required to run Spike." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<thead>
<tr align="left" valign="top">
<th id="r1c1" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Resource
</strong></font></th>
<th id="r1c2" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Minimum Value
</strong></font></th>
</tr>
</thead><tbody>
<tr align="left" valign="top">
<td id="r2c1" headers="r1c1" align="left" colspan="1" rowspan="1">Physical memory
</td>
<td headers="r2c1 r1c2" align="left" colspan="1" rowspan="1">1024 MB
</td>
</tr>
<tr align="left" valign="top">
<td id="r3c1" headers="r1c1" align="left" colspan="1" rowspan="1">max-per-proc-address-space parameter in the <code>sysconfigtab</code> file
</td>
<td headers="r3c1 r1c2" align="left" colspan="1" rowspan="1">1024 MB
</td>
</tr>
<tr align="left" valign="top">
<td id="r4c1" headers="r1c1" align="left" colspan="1" rowspan="1">max-per-proc-data-space parameter in the <code>sysconfigtab</code> file
</td>
<td headers="r4c1 r1c2" align="left" colspan="1" rowspan="1">1024 MB
</td>
</tr>
<tr align="left" valign="top">
<td id="r5c1" headers="r1c1" align="left" colspan="1" rowspan="1">vm-maxvas parameter in the <code>sysconfigtab</code> file
</td>
<td headers="r5c1 r1c2" align="left" colspan="1" rowspan="1">1024 MB
</td>
</tr></tbody>
</table>
<p>To set the value of these parameters in the <code>/etc/sysconfigtab</code> file, edit the following lines:
</p>
<pre>proc:
</pre>
<pre> max-per-proc-address-space = 0x40000000
max-per-proc-data-size = 0x40000000
</pre>
<pre>vm:
</pre>
<pre> vm-maxvas = 0x40000000
</pre>
<pre>
</pre>
<p>Set the limits in your shell environment to the highest values. For the C shell, enter:
</p>
<pre>% limit datasize unlimited
% limit memoryuse unlimited
% limit vmemoryuse unlimited
</pre>
<p>Spike can run out of virtual memory if the stacksize limit is set too high. To avoid this problem, enter the following C shell command:
</p>
<pre>% limit stacksize 8192
</pre><a id="i631323" name="i631323"></a>
<br /><strong><font face="arial, helvetica, sans-serif" size="+1">Checking Optimization Flags
</font></strong><br />
<p>Spike provides a large number of optimization flags. However, you cannot use all <code>spike</code> command optimizations with Oracle9<em>i</em>. The following Spike optimization flags are certified to run with Oracle9<em>i</em>:
</p>
<pre>-arch, -controlOpt, -fb,<code> -feedback</code>, -map, -nosplit, -nochain, -noporder, -noaggressiveAlign, -o, optThresh, -splitThresh, -symbols_live, -tune, -v, -V
</pre>
<p>When you run Spike, it places a copy of the optimization flags in the image header comment section of the binary that you are optimizing. Oracle9<em>i</em> checks Spike optimizations used on itself at the beginning of instance startup. If Oracle9<em>i</em> detects an optimization not known to work for the Oracle9<em>i</em> binary, or if the binary had been previously optimized with OM (the predecessor to Spike from Compaq), the instance startup fails with an ORA-4940 error message. If the instance startup fails, check the alert log file for more information.
</p>
<div align="center">
<br /><table summary="This is a layout table to format a note" title="This is a layout table to format a note" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong>Note:</strong>
</font>
</p>Oracle9<em>i</em> release 2 (9.2.0.1.0) requires that you use the Spike <code>-symbols_live</code> optimization flag.
</td>
</tr></tbody>
</table><br />
</div><a id="i631384" name="i631384"></a>
<br /><strong><font face="arial, helvetica, sans-serif" size="+1">Running Spike
</font></strong><br />
<p>Use one of the following methods to optimize an executable using Spike:
</p>
<ul>
<li type="disc">
<p>Static spiking
</p>
</li>
<li type="disc">
<p>Running Spike with feedback
</p>
</li>
</ul>
<p>Static spiking requires only a few set-up steps and yields approximately half the performance benefit possible compared to running Spike with feedback.
</p>
<p>Running Spike with feedback includes all of the optimizations of static spiking plus additional optimizations that are workload-related. Running spike with feedback provides the best possible performance benefit, however, it requires considerably more effort than static spiking.
</p>
<p>For both running Spike with feedback and static spiking, Oracle Corporation recommends running the spiked Oracle binary in a test environment before moving it to a production environment.
</p>
<br /><strong><font face="arial, helvetica, sans-serif">Static Spiking
</font></strong><br />
<p>Static spiking performs optimizations that are not specific to your workload, such as manipulating the global pointer (gp) register and taking advantage of the CPU architecture. In a test environment, roughly half of the performance optimization gain possible from Spike was through static spiking. Furthermore, static spiking is relatively straight-forward and simple. The combination of simplicity and performance gain makes static spiking worth the effort.
</p>
<p>Perform the following steps to use static spiking:
</p>
<ol type="1" start="1">
<li>
<p>Shut down the database.
</p>
</li>
<li>
<p>Spike the <code>oracle</code> image by entering the following command:
</p>
<pre>$ spike oracle -o oracle.spike -symbols_live
</pre>
</li>
<li>
<p>Save the original image and create a symbolic link to the spiked image by entering the following commands:
</p>
<pre>$ mv oracle oracle.orig
$ ln -s oracle.spike oracle
</pre>
</li>
<li>
<p>Start up the database.
</p>
<br /><table summary="This is a layout table to format a note" title="This is a layout table to format a note" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong>Note:</strong>
</font>
</p>Before contacting Oracle for support, you must use the original image to reproduce any problems.
</td>
</tr></tbody>
</table><br />
</li>
</ol>
<br /><strong><font face="arial, helvetica, sans-serif">Running Spike with Feedback
</font></strong><br />
<p>Running Spike with feedback performs all of the same optimizations as static spiking plus optimizations that are workload-related such as hot and cold basic block movement. In a test environment, approximately half of the performance optimizations gained from Spike was due to the optimizations that depend on feedback information. Running Spike with feedback requires multiple steps and considerably more effort than static spiking. However, performance sensitive customers may find the extra effort worthwhile.
</p>
<p>Perform the followings steps to run Spike with feeback:
</p>
<ol type="1" start="1">
<li>
<p>Instrument the Oracle binary by entering the following command:
</p>
<pre>$ pixie -output oracle.pixie -dirname <em>dir</em> -pids <em>oracle_image</em>
</pre>
<p>In the preceding example, <em><code>oracle_image</code></em>  is your original image and <em><code>dir</code></em> is the name of the directory into which the instrumented executable writes the profiling data files.
</p>
<br /><table summary="This is a layout table to format a note" title="This is a layout table to format a note" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong>Note:</strong>
</font>
</p>The <code>-dirname</code> option saves the <code>oracle.Counts.</code><em><code>pid</code></em><code> </code>files in the <em><code>dir</code></em>  directory. Because these files are large and may be numerous depending on the workload, make sure that the directory has enough disk space.
</td>
</tr></tbody>
</table><br />
<p>This step also creates an <code>oracle.Addrs</code> file that is required later.
</p>
<p>The output of the <code>pixie</code> command might contain errors. You can safely ignore these errors.
</p>
</li>
<li>
<p>Shut down the database.
</p>
</li>
<li>
<p>Save the original image and create a symbolic link to the pixie image by entering the following commands:
</p>
<pre>$ mv oracle oracle.orig
$ ln -s oracle.pixie oracle
</pre>
</li>
<li>
<p>Start up the database and run your workload.
</p>
<p>You cannot run as many users as you can with the standard executable because the <code>pixie</code> executable is larger and slower. As you use the Oracle9<em>i</em> server, several <code>oracle.Counts.</code><em><code>pid</code></em><em> </em>files are created, where <em><code>pid</code></em> is the process ID for the corresponding Oracle process. Keep track of the process id of each Oracle process for which the optimization is aimed. These could be the shadow Oracle processes of the clients.
</p>
</li>
<li>
<p>Shut down the database.
</p>
</li>
<li>
<p>Create a symbolic link to replace the original executable by entering the following command:
</p>
<pre>$ ln -s oracle.orig oracle
</pre>
</li>
<li>
<p>If you can identify one <code>oracle</code>.<code>Counts.</code><em><code>pid</code></em> file as representative of your workload, perform step a. If you must merge several counts files together to better represent your workload, perform step b.
</p>
<ol type="a">
<li>
<p>Make sure that the <a id="i631439" name="i631439"></a><code>oracle.Addrs</code> file created by the <code>pixie</code> command, the <code>oracle</code>.<code>Counts.</code><em><code>pid </code></em>files, and the original Oracle executable are available.
</p>
<p>Use the process id (pid) to pick a representative <code>oracle</code>.<code>Counts.</code><em><code>pid </code></em>file and then copy it by entering the following command:
</p>
<pre>$ cp oracle.Counts.<em>pid</em> oracle.Counts
</pre>
</li>
<li>
<p>Use the <a id="i631449" name="i631449"></a><code>prof</code> utility to merge several <code>oracle</code>.<code>Counts.</code><em><code>pid </code></em>files. See the <code>prof</code> man pages for more information on this utility.
</p>
<p>If you are using the parallel query option, merge the <code>oracle</code>.<c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -