Oracle数据库配置大页

0    1429    10

Tags:

👉 本文共约4899个字,系统预计阅读时间或需19分钟。

简介

有关大页和透明大页的介绍:https://www.xmmup.com/linux-biaozhundayehetoumingdaye.html

在Linux中配置hugepage可以提高oracle的性能,减少oracle sga的页交换,类似于aix中的lagepage。
当你主机的物理内存为64G,设SGA>=32G时,建议开启大页。

要查看是否存在大页表的问题,可以使用如下的命令来检查页表的大小:

如果发现页表的大小不是几十兆,而是达到了1GB以上,就说明数据库存在此问题。基于共享内存的多进程架构的程序都会存在此问题。

Oracle 官方是推荐我们使用 Huge pages 的,它拥有以下的好处:

  • Larger Page Size and Less # of Pages: Default page size is 4K whereas the HugeTLB size is 2048K. That meansthe system would need to handle 512 times less pages.

  • Reduced Page Table Walking:Since a HugePage covers greater contiguous virtual address range than a regularsized page, a probability of getting a TLB hit per TLB entry with HugePages arehigher than with regular pages. This reduces the number of times page tablesare walked to obtain physical address from a virtual address.

  • Less Overhead for MemoryOperations: On virtual memory systems (any modern OS) each memory operation isactually two abstract memory operations. With HugePages, since there are lessnumber of pages to work on, the possible bottleneck on page table access isclearly avoided.

  • Less Memory Usage: From theOracle Database perspective, with HugePages, the Linux kernel will use lessmemory to create pagetables to maintain virtual to physical mappings for SGAaddress range, in comparison to regular size pages. This makes more memory tobe available for process-private computations or PGA usage.

  • No Swapping: We must avoidswapping to happen on Linux OS at all Document 1295478.1. HugePages are notswappable (whereas regular pages are). Therefore there is no page replacementmechanism overhead. HugePages are universally regarded as pinned.

  • No 'kswapd' Operations: kswapdwill get very busy if there is a very large area to be paged (i.e. 13 millionpage table entries for 50GB memory) and will use an incredible amount of CPUresource. When HugePages are used, kswapd is not involved in managing them. Seealso Document 361670.1

Huge pages 和 Oracle 11g新 特性 AMM ( Automatic Memory Management )是相互冲突的,但是 ASMM ( Automatic Shared Memory Management )仍然可以继续使用。

Oracle 官方推荐我们使用 标准大页(Huge pages ),但是却建议我们关闭 透明大页(Transparent Huge pages) ,因为透明大页存在一些问题:

  1. 在 RAC 环境下 透明大页( TransparentHugePages )会导致异常节点重启,和性能问题;
  2. 在单机环境中,透明大页( TransparentHugePages ) 也会导致一些异常的性能问题;

    如何关闭透明大页请参考:https://www.xmmup.com/linux-biaozhundayehetoumingdaye.html

如何配置开启大页

参考:HugePages on Oracle Linux 64-bit (Doc ID 361468.1)

本人提供Oracle(OCP、OCM)、MySQL(OCP)、PostgreSQL(PGCA、PGCE、PGCM)等数据库的培训和考证业务,私聊QQ646634621或微信db_bao,谢谢!
Oracle数据库配置大页后续精彩内容已被小麦苗无情隐藏,请输入验证码解锁本站所有文章!
验证码:
请先关注本站微信公众号,然后回复“验证码”,获取验证码。在微信里搜索“DB宝”或者“www_xmmup_com”或者微信扫描右侧二维码都可以关注本站微信公众号。

标签:

Avatar photo

小麦苗

学习或考证,均可联系麦老师,请加微信db_bao或QQ646634621

您可能还喜欢...

发表回复

嘿,我是小麦,需要帮助随时找我哦。
  • 18509239930
  • 个人微信

  • DB宝
  • 个人邮箱
  • 点击加入QQ群
  • 个人微店

  • 回到顶部