[20170209]理解pre_page_sga引數.txt
[20170209]理解pre_page_sga引數.txt
--昨天測試pre_page_sga=true的情況:
http://blog.itpub.net/267265/viewspace-2133198/
--//再次看看官方的定義:
PRE_PAGE_SGA determines whether Oracle reads the entire SGA into memory at instance startup. Operating system page table
entries are then prebuilt for each page of the SGA. This setting can increase the amount of time necessary for instance
startup, but it is likely to decrease the amount of time necessary for Oracle to reach its full performance capacity
after startup.
Note:
This setting does not prevent your operating system from paging or swapping the SGA after it is initially read into
memory.
PRE_PAGE_SGA can increase the process startup duration, because every process that starts must access every page in the
SGA. The cost of this strategy is fixed; however, you might simply determine that 20,000 pages must be touched every
time a process starts. This approach can be useful with some applications, but not with all applications. Overhead can
be significant if your system frequently creates and destroys processes by, for example, continually logging on and
logging off.
The advantage that PRE_PAGE_SGA can afford depends on page size. For example, if the SGA is 80 MB in size and the page
size is 4 KB, then 20,000 pages must be touched to refresh the SGA (80,000/4 = 20,000).
If the system permits you to set a 4 MB page size, then only 20 pages must be touched to refresh the SGA (80,000/4,000 =
20). The page size is operating system-specific and generally cannot be changed. Some operating systems, however, have a
special implementation for shared memory whereby you can change the page size.
--//按照上面的定義如果我使用hupapage,這樣啟動資料庫時,應該會載入全部頁面.還是測試看看:
1.環境:
--//首先修改引數vm.nr_hugepages=600.
# sysctl -p
# sysctl vm.nr_hugepages
vm.nr_hugepages = 600
2.pre_page_sga=false ,使用hugepage的情況:
SYS@book> startup
ORACLE instance started.
Total System Global Area 634732544 bytes
Fixed Size 2255792 bytes
Variable Size 197133392 bytes
Database Buffers 427819008 bytes
Redo Buffers 7524352 bytes
Database mounted.
Database opened.
SYS@book> show parameter pre_page_sga
NAME TYPE VALUE
------------ -------- -------
pre_page_sga boolean FALSE
$ cat /proc/meminfo | grep -i page
AnonPages: 173732 kB
PageTables: 11052 kB
AnonHugePages: 38912 kB
HugePages_Total: 600
HugePages_Free: 393
HugePages_Rsvd: 98
HugePages_Surp: 0
Hugepagesize: 2048 kB
--//alert記憶體如下:
************************ Large Pages Information *******************
Per process system memlock (soft) limit = 51 GB
Total Shared Global Region in Large Pages = 610 MB (100%)
Large Pages used by this instance: 305 (610 MB)
Large Pages unused system wide = 295 (590 MB)
Large Pages configured system wide = 600 (1200 MB)
Large Page size = 2048 KB
********************************************************************
--實際上現在使用600-393=207.
--HugePages_Rsvd: 98
--207+98=305 正好對上. 換一句化將現在還有98頁面塊沒有使用.僅僅使用207塊.
--HugePages_Total-HugePages_Free+HugePages_Rsvd 就是 目前例項需要的頁面數量.
3.pre_page_sga=true ,使用hugepage的情況:
SYS@book> alter system set pre_page_sga=true scope=spfile ;
System altered.
--//重啟資料庫.
$ cat /proc/meminfo | grep -i page
AnonPages: 179820 kB
PageTables: 11984 kB
AnonHugePages: 43008 kB
HugePages_Total: 600
HugePages_Free: 295
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
--//檢查alert*.log檔案:
************************ Large Pages Information *******************
Per process system memlock (soft) limit = 51 GB
Total Shared Global Region in Large Pages = 610 MB (100%)
Large Pages used by this instance: 305 (610 MB)
Large Pages unused system wide = 295 (590 MB)
Large Pages configured system wide = 600 (1200 MB)
Large Page size = 2048 KB
********************************************************************
--//HugePages_Rsvd是0.
--//600-295=305,使用305.
--//也就是pre_page_sga=true的情況下,啟動時使用全部sga記憶體.而不像pre_page_sga=false那樣,逐漸載入使用記憶體.
--//如果設定vm.nr_hugepages = 305,正好使用完,更加好理解,不再測試,留給大家測試.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2133260/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- pre_page_sga引數總結
- 【引數】使用lock_sga和pre_page_sga引數保證SGA常駐實體記憶體記憶體
- jmeter 引數理解JMeter
- 深入理解mysql引數MySql
- linux find depth引數理解Linux
- find命令-mtime引數理解
- 使用lock_sga和pre_page_sga引數保證SGA常駐實體記憶體記憶體
- [20151021]理解dbms_xplan.display_cursor的format引數all.txtORM
- 深入理解JVM(三)——配置引數JVM
- flume 寫往hdfs引數理解分析
- linux,mtime引數的理解Linux
- 帶你深入理解傳遞引數
- Request 接收引數亂碼原理解析
- JavaScript引數傳遞的深入理解JavaScript
- 理解spread運算子與rest引數REST
- 引數FAST_START_MTTR_TARGET的理解AST
- [20171206]SQLTUNE_CATEGORY引數.txtSQLGo
- [20190409]pre_page_sga=true與連線緩慢的問題.txt
- 1.5 - Numpy的方法中,axis引數的理解
- [20171105]exp imp buffer引數解析.txt
- [20160501]檢視包引數指令碼.txt指令碼
- optimizer_dynamic_sampling引數的理解
- 初始化引數OPEN_CURSORS的理解加深
- v$session中LAST_CALL_ET引數的理解SessionAST
- [20190917]oracle引數deferred屬性.txtOracle
- [20190409]latch get 引數where and why.txt
- [20210826]核心引數kernel.sem.txt
- [20180529]模擬會話引數變化.txt會話
- [20160516]統計分析引數method_opt.txt
- [20150325]關於引數archive_lag_target.txtHive
- kettle 引數——變數引數和常量引數變數
- [20190103]設定pre_page_sga=true啟動緩慢的問題.txt
- 淺談對python pandas中 inplace 引數的理解Python
- 你都理解建立執行緒池的引數嗎?執行緒
- innodb_flush_log_at_trx_commit引數的直白理解MIT
- 關於 groutine 喚醒中 skipframes 引數不理解
- 深入理解RabbitMQ中的prefetch_count引數MQ
- JAVAScript柯里化、部分應用引數終極理解JavaScript