ALLSTARS_ORACLE 发表于 2013-12-10 20:15:54

lock_sga 参数的疑问

lock_sga 参数的疑问


              lock_sga 这个参数防止sga的内存被交换出去,那么是不是应该所有库都用上呢,有哪些平台不支持这个参数吗。

1. Linux上如果设置了HugePage,那么就不需要设置
2. Solaris上不支持这个参数, 如果使用 ISM 那么默认SGA就pin在内存里了; 如果使用DISM就不能pin在内存里了. pmap -sx pid可以检测是否pin住了内存.
3. Solaris/AIX可以设置.

如果系统内内存非常充足,那么使用lock_sga就是best practice.推荐同时使用large page.

但是有时比如测试库, 系统上跑了7,8个测试库,所有的SGA加起来比OS内存都大,那么就不能设置lock_sga了.

对不起,笔误.
是HPUX/AIX/Linux可以设置. Solaris不可以设置.

根据下面的描述,10205 或者11g的话,默认LOCK_SGA = FALSE 就可以保证稳定的性能了吧



mos 1507249.1

Oracle Large Page Usage

Spécifications for Oracle large page usage are:

· AIX 6.1 and 7.1 support three or four page sizes, depending on the hardware: 4 KB (default), 64 KB (medium), 16 MB (large), and 16 GB(huge). All four page sizes are
  supported by Power Systems from POWER5+ firmware level 240-202 onward.

· Page sizes 64 KB and 16 MB have been shown to benefit Oracle performance by reducing kernel lookaside processing to resolve virtual to physical addresses.
  Oracle 11g uses 64 KB pages for dataspaces by default.

LOCK_SGA = FALSE

· This is the default. This means that the SGA is not pinned in memory.

· AIX performance support generally suggests not to pin SGA.

· Automatic Memory Management (AMM) will use 64 KB pages for SGA if memory is available.

· This is the suggested value, since it has been found that 64 KB pages yield nearly the same performance benefit as 16 MB pages and require no special
  management.

· Oracle 10.2.0.4 with Oracle patch 7226548 will also use 64 KB pages for the SGA.

我不这样想.
对于很多应用来讲,也许它们从来不需要考虑lock_sga (比如负载不大,或者偶尔慢一点/hung住无所谓,只要重起能解决问题就好etc)

Lock_SGA还是能够降低 latch/mutex 这种并发问题发生的频率的.

Thank you, Feng Gao

zengmuansha 发表于 2013-12-11 12:07:07

lock_sga 我理解是 当系统不够内存的时候 防止把ORACLE占用的内存移到交换分区里去
页: [1]
查看完整版本: lock_sga 参数的疑问