appa_aix.htm

来自「Debian中文参考手册,系统介绍了Debian系统」· HTM 代码 · 共 1,190 行 · 第 1/5 页

HTM
1,190
字号
Controlling Paging
</font>
</h3>
<p>Constant and excessive <a id="sthref625" name="sthref625"></a>paging indicates that the real memory is over-committed. In general, you should:
</p>
<ul>
<li type="disc">
<p>Avoid constant paging unless the system is equipped with very fast expanded storage that makes paging between memory and expanded storage much faster than Oracle can read and write data between the SGA and disks.
</p>
</li>
<li type="disc">
<p>Allocate limited memory resources to where it is most beneficial to the system&#039;s performance. It is sometimes a recursive process of balancing the memory resource requirements and trade-offs. 
</p>
</li>
<li type="disc">
<p>If memory is not adequate, build a prioritized list of memory-requiring processes and elements of the system. Assign memory to where the performance gains are the greatest. A prioritized list might look like:
</p>
<ol type="1" start="1">
<li>
<p>OS and RDBMS kernels
</p>
</li>
<li>
<p>User and application processes
</p>
</li>
<li>
<p>Redo log buffer
</p>
</li>
<li>
<p>PGAs and shared pool
</p>
</li>
<li>
<p>Database block buffer caches
</p>
</li>
</ol>
</li>
</ul>
<p>For instance, if you query Oracle dynamic performance tables and views and find that both the shared pool and database buffer cache require more memory, assigning the limited spare memory to the shared pool might be more beneficial than assigning it to the database block buffer caches<strong>.</strong>
</p>
<p>The following AIX commands provide paging status and statistics:
</p>
<ul>
<li type="disc">
<p><code>vmstat</code> <code>-s </code>
</p>
</li>
<li type="disc">
<p><code>vmstat </code><em><code>interval</code></em><code> &#091;</code><em><code>repeats</code></em><code>&#093;</code>
</p>
</li>
<li type="disc">
<p><code>sar -r </code><em><code>interval</code></em><code> &#091;</code><em><code>repeats</code></em><code>&#093;</code>
</p>
</li>
</ul>
</div class="sect2">
<div class="sect2"><a id="sthref626" name="sthref626"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Setting the Database Block Size
</font>
</h3>
<p>You can configure the Oracle <a id="sthref627" name="sthref627"></a>database <a id="sthref628" name="sthref628"></a>block size for better I&#047;O throughput. On AIX, you can set the value of the DB&#095;BLOCK&#095;SIZE initialization parameter to between 2 KB to 32 KB, with a default of 4 KB. If the Oracle database is installed on a journaled file system, then the block size should be a multiple of the file system blocksize (4 KB on AIX). For databases on raw partitions, the Oracle database block size is a multiple of the operating system physical block size (512 bytes on AIX).
</p>
<p>Oracle Corporation recommends smaller Oracle database block sizes (2 KB or 4 KB) for online transaction processing (OLTP) or mixed workload environments and larger block sizes (8 KB, 16 KB, or 32 KB) for decision support system (DSS) workload environments.
</p>
</div class="sect2">
<div class="sect2"><a id="sthref629" name="sthref629"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Tuning the <a id="sthref630" name="sthref630"></a>Log Archive Buffers
</font>
</h3>
<p>You can improve the speed of archiving the database by dedicating larger buffers. However, over-configuring can degrade overall system performance. You can increase the LOG&#095;ARCHIVE&#095;BUFFER&#095;SIZE initialization parameter to 128 KB. The default value for the LOG&#095;ARCHIVE&#095;BUFFER&#095;SIZE parameter is 4 KB.
</p>
<p>Tune this parameter carefully so that overall performance of normal database activity does not degrade drastically. Performance improvements of 0 to 20 percent in the archiving process are possible. Some users report even larger improvements.
</p>
</div class="sect2">
<div class="sect2"><a id="sthref631" name="sthref631"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
I&#047;O Buffers and SQL&#042;Loader
</font>
</h3>
<p>For high-speed data loading, such as using the <a id="sthref632" name="sthref632"></a>SQL&#042;Loader direct path option in addition to loading data in parallel, the CPU spends most of its time waiting for I&#047;O to complete. By increasing the number of buffers, you can usually push the CPU usage harder, thereby increasing overall throughput.
</p>
<p>The number of buffers (set by the SQL&#042;Loader BUFFERS parameter) you choose depends on the amount of available memory and how hard you want to push CPU usage. See <em>Oracle9i Database Utilities </em>for information on adjusting the file processing options string for the BUFFERS parameter.
</p>
<p>The performance gains depend on CPU usage and the degree of parallelism that you use when loading data. 
</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><em>Oracle9i Database Utilities</em> for more generic information on the SQL&#042;Loader utility.
</td>
</tr></tbody>
</table><br />
</div>
<div class="sect3"><a id="sthref633" name="sthref633"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
BUFFER Parameter for the Import Utility
</font>
</h4>
<p>The BUFFER parameter for the Import utility should be set to a large value to optimize the performance of high-speed networks when they are used. For instance, if you use the IBM RS&#047;6000 Scalable POWERparallel Systems (SP) switch, you should use a value of at least 1 MB. <a id="sthref634" name="sthref634"></a><a id="sthref635" name="sthref635"></a>
</p>
</div class="sect3">
</div class="sect2">
</div class="sect1"><a id="i631245" name="i631245"></a>
<div class="sect1"><a id="sthref636" name="sthref636"></a>
<h2>
<font face="arial, helvetica, sans-serif" color="#330099">Disk I&#047;O Issues
</font>
</h2>
<p>Disk I&#047;O contention can result from poor memory management (with subsequent paging and swapping), or poor distribution of tablespaces and files across disks. Spread the I&#047;O load evenly across all disks.
</p>
<div class="sect2"><a id="sthref637" name="sthref637"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
AIX Logical Volume Manager
</font>
</h3><a id="i631283" name="i631283"></a>
<p>The AIX Logical Volume Manager (LVM) can stripe data across multiple disks to reduce disk contention. The primary objective of striping is to achieve high performance when reading and writing large sequential files. Effective use of the striping features in the LVM allows you to spread I&#047;O more evenly across disks, resulting in greater overall performance. 
</p>
<div class="sect3"><a id="sthref638" name="sthref638"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
Design a Striped Logical Volume
</font>
</h4><a id="i631286" name="i631286"></a>
<p>When you define a striped logical volume, you must specify the following items:
</p>
<table title="Striped Logical Volumn Item Specification" summary="This table describes the striped logical volumn items that you must specify." 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>Item
</strong></font></th>
<th id="r1c2" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Recommended Settings
</strong></font></th>
</tr>
</thead><tbody>
<tr align="left" valign="top">
<td id="r2c1" headers="r1c1" align="left" colspan="1" rowspan="1">Drives
</td>
<td headers="r2c1 r1c2" align="left" colspan="1" rowspan="1">At least two physical drives. The drives should have minimal activity when performance-critical sequential I&#047;O is executed. Sometimes you might need to stripe the logical volume between two or more adapters.
</td>
</tr>
<tr align="left" valign="top">
<td id="r3c1" headers="r1c1" align="left" colspan="1" rowspan="1">Stripe unit size
</td>
<td headers="r3c1 r1c2" align="left" colspan="1" rowspan="1">Although the stripe unit size can be any power of two from 2 KB to 128 KB, stripe sizes of 32 KB and 64 KB are good values for most workloads. For Oracle database files, the stripe size must be a multiple of the database block size.
</td>
</tr>
<tr align="left" valign="top">
<td id="r4c1" headers="r1c1" align="left" colspan="1" rowspan="1">Size
</td>
<td headers="r4c1 r1c2" align="left" colspan="1" rowspan="1">The number of physical partitions allocated to the logical volume must be a multiple of the number of disk drives used.
</td>
</tr>
<tr align="left" valign="top">
<td id="r5c1" headers="r1c1" align="left" colspan="1" rowspan="1">Attributes
</td>
<td headers="r5c1 r1c2" align="left" colspan="1" rowspan="1">Cannot be mirrored. Set the <code>copies</code> attribute to a value of 1<code>.</code>
</td>
</tr></tbody>
</table>
</div class="sect3">
<div class="sect3"><a id="sthref639" name="sthref639"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
Suggested Striped Logical Volume Parameters
</font>
</h4>
<p>Use the <code>vmtune</code> command to adjust the MINPGAHEAD, MAXPGAHEAD, and MAXFREE parameters to achieve the highest sequential I&#047;O throughput. See the <em>AIX Performance Tuning Guide, Version 3.2 and 4</em> or the <em>AIX5L Performance Management Guide </em>for the recommended settings.<em> </em>
</p>
<p>Make sure that the I&#047;O activity is evenly distributed across multiple disk drives by using AIX utilities such as <code>filemon</code>, <code>sar</code>, <code>iostat</code>, and other performance tools to identify any disks with high I&#047;O activity.
</p>
</div class="sect3">
<div class="sect3"><a id="sthref640" name="sthref640"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
Other Considerations
</font>
</h4>
<p>Performance gains from effective use of the LVM can vary greatly, depending on the LVM you use and the characteristics of the workload. For DSS workloads, you can see substantial improvement. For OLTP-type or mixed workloads, you can still expect significant performance gains. 
</p>
</div class="sect3">
</div class="sect2"><a id="i633938" name="i633938"></a>
<div class="sect2"><a id="sthref641" name="sthref641"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Using Journaled File Systems Compared to Using Raw Partitions
</font>
</h3>
<p>Note the following considerations when you are deciding whether to use journaled file systems or raw partitions:
</p>
<ul>
<li type="disc">
<p>File systems are continually being improved, as are various file system implementations. In some cases, file systems provide better I&#047;O performance than raw devices. 
</p>
</li>
<li type="disc">
<p>Different vendors implement the file system layer in different ways to exploit the strengths of different disks. This makes it difficult to compare file systems across platforms.
</p>
</li>
<li type="disc">
<p>The introduction of more powerful LVM interfaces substantially reduces the tasks of configuring and backing up logical disks based on raw partitions.
</p>
</li>
</ul>
<p>The degree of performance improvement largely depends on the I&#047;O characteristics of the workload.
</p>
<p>If you use a journaled file system, it is easier to manage and maintain database files than it is if you use raw devices. However, because JFS and JFS2 support only buffered read and write at present, every time data is transferred to or from the I&#047;O subsystem (other than the Oracle buffer cache or SGA) extra AIX file buffer caches are created. This is the main drawback to using a journaled file system, and this penalty becomes even greater when the I&#047;O subsystem is more heavily exercised. 
</p>
<p>Also, on heavily loaded systems, the contention for the AIX file buffer cache becomes the main bottleneck. Some side-effects include:
</p>
<ul>
<li type="disc">
<p>Increased work for the <code>pagedaemon</code> command which flushes data from the AIX file buffer cache to disk
</p>
</li>
<li type="disc">
<p>More memory sacrificed to the AIX file buffer cache
</p>
</li>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?