[20191204]hugepage相關引數含義.txt
[20191204]hugepage相關引數含義.txt
--//別人問題的問題,就是grep -i pages /proc/meminfo輸出的HugePages_Total,HugePages_Free,HugePages_Rsvd,HugePages_Surp含義.
# grep -i pages /proc/meminfo
AnonPages: 31476112 kB
HugePages_Total: 78600
HugePages_Free: 3092
HugePages_Rsvd: 3085
HugePages_Surp: 0
Hugepagesize: 2048 kB
--//為了更好說明,我修改指令碼加入asm例項分析:
# cat huge.sh
#! /bin/bash
total_shmsize=0
total_hugepagesize=0
for pid in `ps -ef | egrep "ora_pmon_|asm_pmon" |egrep -v "grep"| awk '{print $2}'`
do
echo
echo "-----------------------------------------------------------"
echo
# ps -ef | grep $pid | grep -v grep
ps v $pid
echo
shmsize=`grep -A 1 'SYSV00000000' /proc/$pid/smaps | grep "^Size:" | awk 'BEGIN{sum=0}{sum+=$2}END{print sum/1024}' | awk -F"." '{print $1}'`
hugepagesize=`grep -B 11 'KernelPageSize: 2048 kB' /proc/$pid/smaps | grep "^Size:" | awk 'BEGIN{sum=0}{sum+=$2}END{print sum/1024}' | awk -F"." '{print $1}'`
echo "INSTANCE SGA (SMALL/HUGE page)" : $shmsize "MB"
echo "INSTANCE SGA (HUGE PAGE)" $hugepagesize "MB"
echo "Percent Huge page :" $(( $hugepagesize *100 / $shmsize )) "%"
total_shmsize=$(( $shmsize + $total_shmsize ))
total_hugepagesize=$(( $total_hugepagesize + $hugepagesize ))
done
echo
echo "-----------------------------------------------------------"
echo "-----------------------------------------------------------"
echo
echo "SGA TOTAL (SMALL/HUGE page)" : $total_shmsize "MB"
echo "SGA TOTAL (HUGE PAGE)" $total_hugepagesize "MB"
echo "Percent Huge page :" $(( $total_hugepagesize *100 / $total_shmsize )) "%"
# . /usr/local/bin/huge.sh
-----------------------------------------------------------
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
21310 ? Ss 419:59 4 168518 2147781 13812 0.0 asm_pmon_+ASM1
INSTANCE SGA (SMALL/HUGE page) : 2044 MB
INSTANCE SGA (HUGE PAGE) 2046 MB
Percent Huge page : 100 %
-----------------------------------------------------------
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
23988 ? Ss 2304:27 7 189443 79487228 26248 0.0 ora_pmon_dbcn1
INSTANCE SGA (SMALL/HUGE page) : 77568 MB
INSTANCE SGA (HUGE PAGE) 77570 MB
Percent Huge page : 100 %
-----------------------------------------------------------
PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND
27535 ? Ss 579:31 0 189443 79485216 18832 0.0 ora_pmon_dben1
INSTANCE SGA (SMALL/HUGE page) : 77568 MB
INSTANCE SGA (HUGE PAGE) 77570 MB
Percent Huge page : 100 %
-----------------------------------------------------------
-----------------------------------------------------------
SGA TOTAL (SMALL/HUGE page) : 157180 MB
SGA TOTAL (HUGE PAGE) 157186 MB
Percent Huge page : 100 %
--//3個例項使用HUGEpages記憶體157186,157186/2 = 78593.
# grep -i pages /proc/meminfo
AnonPages: 30329756 kB
HugePages_Total: 78600
HugePages_Free: 3092
HugePages_Rsvd: 3085
HugePages_Surp: 0
Hugepagesize: 2048 kB
--//我的理解
--//HugePages_Total表示總量.
--//HugePages_Free表示沒有使用的數量.
--//HugePages_Rsvd表示reserved,保留未用的數量
--//HugePages_Surp表示surplus剩餘; 盈餘; 結餘的數量.
--//HugePages_Total-HugePages_Free+HugePages_Rsvd=78600-3092+3085 = 78593 ,就是當前全部例項使用hugepages的數量.
--//HugePages_Surp表示surplus剩餘; 盈餘; 結餘的數量.實際上設定vm.nr_overcommit_hugepages引數就可以看到.
--//並且vm.nr_hugepages不足的情況下就可以看到.注意測試這樣的情況必須設定use_large_pages=only.
--//看我的測試環境:
$ grep "^vm.nr" /etc/sysctl.conf
vm.nr_hugepages = 104
vm.nr_overcommit_hugepages = 1000
SYS@book> show parameter use_large
NAME TYPE VALUE
--------------- ------ -----
use_large_pages string ONLY
$ grep -i pages /proc/meminfo
AnonPages: 236260 kB
AnonHugePages: 0 kB
HugePages_Total: 309
HugePages_Free: 68
HugePages_Rsvd: 68
HugePages_Surp: 205
Hugepagesize: 2048 kB
--//我設定vm.nr_hugepages = 104,而實際需求總量是309.這樣需要從vm.nr_overcommit_hugepages借用
--//HugePages_Total-vm.nr_hugepages 309-104 = 205.HugePages_Surp表示就是這個含義.
$ . huge.sh
-----------------------------------------------------------
oracle 19367 1 0 15:59 ? 00:00:00 ora_pmon_book
INSTANCE SGA (SMALL/HUGE page) : 616 MB
INSTANCE SGA (HUGE PAGE) 618 MB
Percent Huge page : 100 %
-----------------------------------------------------------
SGA TOTAL (SMALL/HUGE page) : 616 MB
SGA TOTAL (HUGE PAGE) 618 MB
Percent Huge page : 100 %
--//表達能力有限,但願透過前面的例子能理解這些引數的含義.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2667178/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20220913]hugepage相關引數含義.txt
- Oracle direct path read相關隱含引數Oracle
- 【PARANETERS】Oracle異常恢復相關的隱含引數Oracle
- [20190417]隱含引數_SPIN_COUNT.txt
- [20191204]sqlplus特殊定義導致的問題.txtSQL
- Linux之相關英文縮寫含義Linux
- [20190401]隱含引數_mutex_spin_count.txtMutex
- pga相關引數
- histb 引導核心 boot_cmd 引數含義boot
- php引數3個點的含義PHP
- PostgreSQL AutoVacuum 相關引數SQL
- MySQL效能相關引數MySql
- Python中key引數的含義及用法Python
- Python 中 key 引數的含義及用法Python
- [20191206]隱含引數_db_always_check_system_ts.txt
- Spark的相關引數配置Spark
- MySQL 連線相關引數MySql
- 關於 SAP UI5 引數 $$updateGroupId 前面兩個 $ 符號的含義UI符號
- [20210428]AnonHugePages與transparent hugepage.txt
- [20191204]關於oracle例項是否使用hugepages問題2.txtOracle
- git merge合併程式碼時各引數含義Git
- [20220909]AnonHugePages與transparent hugepage 3.txt
- openGauss執行緒池相關引數執行緒
- Oracle安裝相關Linux引數(轉)OracleLinux
- mysql relay log相關引數說明MySql
- redis持久化相關引數解釋Redis持久化
- SAP Fiori 應用 url 中的 DraftUUID 引數的含義RaftUI
- SAP Fiori Launchpad url 引數 sap-app-origin-hint 的含義APP
- [20200420]V$SES_OPTIMIZER_ENV 查不到剛修改的隱含引數.txt
- PostgreSQL並行查詢相關配置引數SQL並行
- [20200422]瞭解相關程式的環境變數.txt變數
- [20191204]oracle能建立最大object_id是多少.txtOracleObject
- 【測試】Android Studio 相關下載及引數Android
- [20191202]關於hugepages相關問題.txt
- [20180413]bash 位置引數.txt
- 記一下rgb螢幕時序引數對應的含義
- [20221212]關於pre_page_sga引數的問題.txt
- [20180828]關於引數cursor_space_for_time(10g).txt