RAM Memory and the Swap Disk

 

Now that we know the amount of RAM on our server, we are ready to investigate the RAM and swap disk usage for the Oracle server. Whenever the memory demands of the server exceed that amount of RAM, the virtual memory facility is invoked. With virtual memory, segments of RAM are moved onto a special disk segment called the swap disk. The swap disk is a special segment of disk defined by the systems administrator to hold excess RAM memory contents. The virtual memory system commonly pages-out memory segments, and this is not an indicator of a memory problem. However, a page-in operation indicates that the server has exceeded the amount of available RAM and is recalling memory segments from the swap disk (see Figure 5-4).

Figure 5-26: RAM memory paging from the swap disk

Swapping (pi) slows down a server because it takes a large amount of time to copy memory segments from the swap disk back into RAM. On an Oracle database server, the solution to a page-in problem involves:

  • Smaller SGA Reduce the demand for RAM by making the SGA smaller. The SGA can be made smaller by reducing the db_block_buffers on Oracle8i and earlier versions, db_cache_size, sga_max_size, db_xK_cache_size on Oracle9i or shared_pool_size or java_pool_size init.ora parameters.

  • More RAM memory Add additional RAM memory to the server. (Remember that some 32-bit versions of Oracle cannot use more than 1.7GB of RAM.)

  • Reduce RAM demand Reduce RAM consumption of a database server by reducing the demands on Program Global Area (PGA) memory. Oracle parameters such as sort_area_size can greatly increase the amount of RAM allocated to each connected user's PGA.

A memory-bound database server always experiences paging from the swap disk. This is displayed in the vmstat utility as the po (page-out) and pi (page-in) columns of vmstat. Here we see that the database server is experiencing five page-in and nine page-out operations. You can tell that a server is having excessive memory requests by looking at page-in operations.

L 5-18

Root> vmstat 1 2

kthr     memory             page              faults        cpu    
----- ----------- ------------------------ ------------ -----------
r  b   avm   fre  re  pi  po  fr   sr  cy  in   sy  cs us sy id wa
0  0 218094   166   0  4   0   4   16   0 202  301 211 14 19 45 22
0  0 218094   166   0  5   9   4   14   0 202  301 211 14 19 45 22

In sum, page-out (po) operations are a normal part of virtual memory operation, but page-in (pi) operations indicate that the server has excessive RAM demands. Now let's take a look at a vmstat metric that is sometimes associated with a disk I/O bottleneck.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16158219/viewspace-588898/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/16158219/viewspace-588898/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值