°Ô½Ã¹° 260°Ç
   
[RHEL7.3] HUGE PAGE ¼³Á¤ [ Transparent Huge Pages (THP) ]
±Û¾´ÀÌ : theko ³¯Â¥ : 2017-10-10 (È­) 20:22 Á¶È¸ : 6727
¸®´ª½º¿¡¼­ µðÆúÆ® ¸Þ¸ð¸® ÆäÀÌÁö »çÀÌÁî°¡ 4K Àε¥, 2M ¸Þ°¡ ´ÜÀ§·Î »ç¿ëÇÏ´Â°É HUGE PAGE ¶ó°í ÇÕ´Ï´Ù.
¿À¶óŬÀ̳ª PPAS/POSTGRESQL À̳ª HUGE PAGE ¼³Á¤À» Çؼ­ ¼º´É °³¼±ÀÌ °¡´ÉÇÕ´Ï´Ù.

´Ü Transparent Huge Pages (THP) ¹æ½ÄÀ¸·Î huge page »ç¿ë½Ã´Â, ¿À¶óŬÀ̳ª PostgreSQL ¸ðµÎ ¼º´ÉÀÌÀúÇϵǹǷΠ°ü·Ã ¼³Á¤À» ²ô½Ã±â ¹Ù¶ø´Ï´Ù.

´Ù½Ã ¸»ÇÏÀÚ¸é,
redhat/centos ¼­¹ö¿¡¼­  ppas/postgresql ÀÇ shared buffers ¸Þ¸ð¸®¸¦ huge page ¼¼ÆÃÀ» Çؼ­ »ç¿ëÇÏ°í ½Í´Ù¸é, Transparent Huge Pages (THP) ¼³Á¤Àº off ÇϽÅÈÄ »ç¿ëÇϽñ⠹ٶø´Ï´Ù.

echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag

¾Æ·¡¿¡ ³Ö´Â°Ô °¡Àå È®½Ç
vi /etc/grub.conf
...
title Red Hat Enterprise Linux (2.6.32-431.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/vg_gsdmdb01-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_gsdmdb01/lv_root rd_NO_MD rd_LVM_LV=vg_gsdmdb01/lv_swap SYSFonT=latarcyrheb-sun16 crashkernel=128M  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet transparent_hugepage=never
        initrd /initramfs-2.6.32-431.el6.x86_64.img
...

(ºÎÆÃÇÒ¶§¸¶´Ù Àû¿ëµÇµµ·Ï rc.local ¿¡ Àû´çÈ÷ ³ÖÀ¸½Ã°í)
THP ¿¡ ´ëÇؼ­´Â ¾Æ·¡ ÂüÁ¶
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Guide/s-memory-transhuge.html


-- THP È°¼ºÈ­¶§ --

    [enterprisedb@test:/data/test]$ grep Huge /proc/meminfo
    AnonHugePages:     32768 kB
    HugePages_Total:   32768
    HugePages_Free:    32665
    HugePages_Rsvd:     2583
    HugePages_Surp:        0
    Hugepagesize:       2048 kB
    [enterprisedb@test:/data/test]$


-- THP OFF ½Ã --

    [enterprisedb@test:/data/test]$
    AnonHugePages:         0 kB
    HugePages_Total:   32768
    HugePages_Free:    32037
    HugePages_Rsvd:    27173
    HugePages_Surp:        0
    Hugepagesize:       2048 kB
    [enterprisedb@test:/data/test]$

¸µÅ© :
http://www.postgresdba.com/bbs/board.php?bo_table=B12&wr_id=84

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com