appa_aix.htm
来自「Debian中文参考手册,系统介绍了Debian系统」· HTM 代码 · 共 1,190 行 · 第 1/5 页
HTM
1,190 行
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//en"
"http://www.w3c.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" sml:lang="en" lang="en">
<head>
<!-- Run date = May 1, 2002 19:19:1 -->
<meta name="XHTML Generator" content="Oracle SGML to XHTML converter - Version 3.1.2">
<title> Tuning for Oracle9i on AIX</title>
<link rel="next" href="appb_hp.htm" title="Next">
</head>
<body bgcolor="#ffffff">
<a id="top" name="top"></a>
<a href="#BEGIN">Skip Headers</a><br><br>
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="left" valign="top"><font face="helvetica, arial, sans-serif">
<b>Oracle9<em>i</em> Administrator's Reference </b>
<br />
<b>Release 2 (9.2.0.1.0) for UNIX Systems: AIX-Based Systems, Compaq Tru64 UNIX, HP 9000 Series HP-UX, Linux Intel, and Sun Solaris</b>
<br />
Part No. A97297-01
</font>
</td>
<td valign="bottom" align="right" width="144">
<table cellspacing="0" cellpadding="0" width="100%">
</tr>
<td align="center" valign="top" width="25%"><a href="toc.htm"><img src="../Support/gifs/conticon.gif" alt="Go To Table Of Contents" border="0" height="30" width="30"><br /><font size="-2">Contents</font></a></td>
<td align="center" valign="top" width="25%"><a href="index.htm"><img src="../Support/gifs/indxicon.gif" alt="Go To Index" border="0" height="30" width="30"><br /><font size="-2">Index</font></a></td>
</tr>
</table>
</td>
</tr>
</table>
<hr />
<p>
<a href="ch5_net.htm">
<img src="../Support/gifs/larrow.gif" alt="Previous" border="0" height="30" width="30"></a>
<a href="appb_hp.htm">
<img src="../Support/gifs/rarrow.gif" alt="Next" border="0" height="30" width="30"></a>
</p>
<a name="BEGIN"></a>
<div class="IND">
<!-- End Header --><a id="g640701" name="g640701"></a><a id="i637023" name="i637023"></a>
<h1>
<font face="arial, helvetica, sans-serif" color="#330099">A
<br /> Tuning for Oracle9<em>i</em> on AIX
</font>
</h1>
<p>This appendix contains the following tuning information for Oracle9<em>i</em> on AIX:
</p>
<ul>
<li type="disc">
<p><a href="#i631085">Memory and Paging</a>
</p>
</li>
<li type="disc">
<p><a href="#i631245">Disk I/O Issues</a>
</p>
</li>
<li type="disc">
<p><a href="#i631579">CPU Scheduling and Process Priorities</a>
</p>
</li>
<li type="disc">
<p><a href="#BABGDHAH">Resilvering with Oracle9<em>i</em></a>
</p>
</li>
</ul><a id="i631085" name="i631085"></a>
<div class="sect1"><a id="sthref601" name="sthref601"></a>
<h2>
<font face="arial, helvetica, sans-serif" color="#330099">Memory and Paging
</font>
</h2>
<p><a id="sthref602" name="sthref602"></a>Memory contention occurs when processes require more memory than is available. To cope with the shortage, the system pages programs and data between memory and disks.
</p><a id="i631089" name="i631089"></a>
<div class="sect2"><a id="sthref603" name="sthref603"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Controlling Buffer-Cache Paging Activity
</font>
</h3>
<p>Excessive <a id="sthref604" name="sthref604"></a>paging activity decreases performance substantially. This can become a problem with database files created on journaled file systems (JFS and JFS2). In this situation, a large number of SGA data buffers might also have analogous journaled file system buffers containing the most frequently referenced data. The behavior of the AIX file buffer cache manager can have a significant impact on performance. It can cause an I/O bottleneck, resulting in lower overall system throughput.
</p>
<p>On AIX, tuning <a id="sthref605" name="sthref605"></a>buffer-cache paging activity is possible but it must be done carefully and infrequently. Use the <code>vmstat</code> command to tune the following AIX system parameters:
</p>
<table title="vmstat command parameter description" summary="This table describes the vmstat command parameters." 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><strong>Parameter</strong>
</strong></font></th>
<th id="r1c2" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Description
</strong></font></th>
</tr>
</thead><tbody>
<tr align="left" valign="top">
<td id="r2c1" headers="r1c1" align="left" colspan="1" rowspan="1"><a id="sthref606" name="sthref606"></a><a id="sthref607" name="sthref607"></a>MINFREE
</td>
<td headers="r2c1 r1c2" align="left" colspan="1" rowspan="1">The minimum free-list size. If the free-list space in the buffer falls below this size, the system uses page stealing to replenish the free list.
</td>
</tr>
<tr align="left" valign="top">
<td id="r3c1" headers="r1c1" align="left" colspan="1" rowspan="1"><a id="sthref608" name="sthref608"></a><a id="sthref609" name="sthref609"></a>MAXFREE
</td>
<td headers="r3c1 r1c2" align="left" colspan="1" rowspan="1">The maximum free-list size. If the free-list space in the buffer exceeds this size, the system stops using page stealing to replenish the free list.
</td>
</tr>
<tr align="left" valign="top">
<td id="r4c1" headers="r1c1" align="left" colspan="1" rowspan="1"><a id="sthref610" name="sthref610"></a><a id="sthref611" name="sthref611"></a>MINPERM
</td>
<td headers="r4c1 r1c2" align="left" colspan="1" rowspan="1">The minimum number of permanent buffer pages for file I/O.
</td>
</tr>
<tr align="left" valign="top">
<td id="r5c1" headers="r1c1" align="left" colspan="1" rowspan="1"><a id="sthref612" name="sthref612"></a><a id="sthref613" name="sthref613"></a>MAXPERM
</td>
<td headers="r5c1 r1c2" align="left" colspan="1" rowspan="1">The maximum number of permanent buffer pages for file I/O.
</td>
</tr></tbody>
</table>
<div align="center">
<br /><table summary="This is a layout table to format a tip" title="This is a layout table to format a tip" 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>See Also:</strong>
</font>
</p><em>AIX Performance Tuning Guide, Version 3.2 and 4 or the AIX5L Performance Management Guide for more information on AIX system parameters.</em>
</td>
</tr></tbody>
</table><br />
</div>
<p>Log on as the <code>root</code> user and use the <code>vmtune</code> command to change these limits. The AIX <code><a id="sthref614" name="sthref614"></a>vmtune</code> command is operating-system version specific. If you run the <code>vmtune</code> command from one release on a different AIX release, the operating system might fail.
</p>
<div class="sect3"><a id="sthref615" name="sthref615"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
Tuning the MINFREE and MAXFREE Parameters
</font>
</h4>
<p>You can base the size of the MINFREE parameter on the working set size of the programs that require a quick response. You must have enough pages in the free list so that the loaded program does not need to replenish the free list. You can determine the size of the working set for a program by using the <code>svmon</code> <code>-p</code> command. The value of the MAXFREE parameter should be greater than the value of the MINFREE parameter by the value of the MAXPGAHEAD parameter, or 8 pages, which ever is higher. For instance, if you determine that the MINFREE parameter value should be 128 pages and the MAXPGAHEAD parameter value is 16 pages, enter the following command to set the value of the MINFREE parameter to 128 pages and the value of the MAXFREE parameter to 144 pages:
</p>
<pre>$ /usr/samples/kernel/vmtune -f 128 -F 144
</pre>
</div class="sect3">
</div class="sect2">
<div class="sect2"><a id="sthref616" name="sthref616"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Tuning the AIX File Buffer Cache
</font>
</h3>
<p>The purpose of the AIX file buffer cache is to reduce disk access frequency when journaled file systems are used. If this cache is too small, disk usage increases and potentially saturates one or more disks. If the cache is too large, memory is wasted.
</p>
<div align="center">
<br /><table summary="This is a layout table to format a tip" title="This is a layout table to format a tip" 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>See Also:</strong>
</font>
</p><a href="#i631089">"Controlling Buffer-Cache Paging Activity"</a> for information on the implications of increasing the AIX file buffer cache.
</td>
</tr></tbody>
</table><br />
</div>
<p>You can configure the AIX file buffer cache by adjusting the MINPERM and MAXPERM parameters. In general, if the buffer hit ratio is low (less than 90 percent), as determined by the <code>sar -b</code> command, increasing the MINPERM parameter value might help. If maintaining a high buffer hit ratio is not critical, decreasing the MINPERM parameter value increases the physical memory available. Refer to your AIX documentation for more information on increasing the size of the AIX file buffer cache.
</p>
<p>The performance gain cannot be quantified easily, because it depends on the degree of multiprogramming and the I/O characteristics of the workload.
</p>
<div class="sect3"><a id="sthref617" name="sthref617"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
Tuning the MINPERM and MAXPERM Parameters
</font>
</h4>
<p>AIX provides a mechanism for you to loosely control the ratio of page frames used for files versus those used for computational (working or program text) segments by adjusting the <a id="sthref618" name="sthref618"></a><a id="sthref619" name="sthref619"></a>MINPERM and<a id="sthref620" name="sthref620"></a><a id="sthref621" name="sthref621"></a> MAXPERM values according to the following guidelines:
</p>
<ul>
<li type="disc">
<p>If the percentage of real memory occupied by file pages falls below the MINPERM value, the page-replacement algorithm steals both file and computational pages, regardless of repage rates.
</p>
</li>
<li type="disc">
<p>If the percentage of real memory occupied by file pages rises above the MAXPERM value, the page-replacement algorithm steals both file and computational pages.
</p>
</li>
<li type="disc">
<p>If the percentage of real memory occupied by file pages is between the MINPERM and MAXPERM parameter values, the virtual memory manager (VMM) normally steals only file pages, but if the repaging rate for file pages is higher then the repaging rate for computational pages, the computational pages are stolen as well.
</p>
</li>
</ul>
<p>Use the following algorithm to calculate the default values:
</p>
<ul>
<li type="disc">
<p>MINPERM (in pages) = ((number of page frames)-1024) * 0.2
</p>
</li>
<li type="disc">
<p>MAXPERM (in pages) = ((number of page frames)-1024) * 0.8
</p>
</li>
</ul>
<p>Use the following command to change the value of the MINPERM parameter to 5 percent of the total number of page frames, and the value of the MAXPERM parameter to 20 percent of the total number of page frames:
</p>
<pre># vmtune -p 5 -P 20
</pre>
<p>The default values are 20 percent and 80 percent, respectively.
</p>
<p>If the database files are on raw devices, you can set the MINPERM and MAXPERM parameters to low values, for example 5 percent and 20 percent, respectively. This is because the AIX file buffer cache is not used for raw devices. The memory might be better used for other purposes, such as the Oracle System Global Area.
</p>
</div class="sect3">
</div class="sect2">
<div class="sect2"><a id="sthref622" name="sthref622"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Allocating Sufficient Paging Space
</font>
</h3>
<p>Inadequate <a id="sthref623" name="sthref623"></a>paging space usually causes the system to hang or suffer abnormally slow response times. On AIX, you can dynamically add paging space on raw disk partitions. The amount of paging space you should configure depends on the amount of physical memory present and the paging space requirements of your applications. Use the <code>lsps</code> command to monitor paging space use and the <code>vmstat</code> command to monitor system paging activities. To increase the paging space, use the <code>smit pgsp</code> command.
</p>
<p>Prior to AIX 4.3.2, paging space needed to be large, typically two to three times the size of real memory. This is because page space was pre-allocated when a program started, whether it used the page space or not. AIX 4.3.2 and higher use deferred paging, where paging space is not allocated until needed. The system uses swap space only if it runs out of real memory. If the memory is sized correctly, there is no paging and the page space can be small. Workloads where the demand for pages does not fluctuate significantly perform well with a small paging space. Workloads likely to have peak periods of increased paging require enough paging space to handle the peak number of pages.
</p>
</div class="sect2">
<div class="sect2"><a id="sthref624" name="sthref624"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?