Oracle
setprivgrp/大文本頁錯誤
問題描述
在 HP
UX
上的dmesg輸出或syslog中發現下面的信息
Process pid num=
does not have mem locking privileges
^ or a meaningful PID with PHKL_
/
[PHKL_
]
required for using large text pages in this version
See setprivgrp command
這是怎麼回事?
配置信息
操作系統
HP
UX
版本
硬件系統
HP
系列
H
解決方法
這個顯示表示執行了一個要求使用大文本頁的二進制文件(因為
chatr +pi L
在二進制文件上運行)
用ADB 可以關閉該信息
echo
allow_superpage_text?W
| adb
w /stand/vmunix
安裝了PHKL_
/
後
就無須再用這種方式關閉(要求重新啟動
並且如果重建內核
必須重復執行)
如果不應使用該特性
那麼最好用chatr(
)重新設置二進制文件
請求應用缺省的
k 頁
如果應當使用該特性
則進程執行時所在的組應當被賦予MLOCK 權限
例如
如果這是一個Oracle進程
Oracle 用戶所在的組為dba
setprivgrp dba CHOWN MLOCK
為永久性實現這個目的
應當修改/etc/privgroup (位於/sbin/init
d/set_prvgrp: /usr/sbin/setprivgrp
f /etc/privgroup)(如有邊要創建該文件
添加一行
dba CHOWN MLOCK
)
但如果使用了Advanced或Online JFS
則必須安裝下面的VxFS補丁程序
以避免在裝載可導致進程掛起
無法殺死的二進制文件過程中死鎖
:
PHKL_
(s
) 或 PHKL_
(s
)
背景資料:
處理器需要將虛擬地址映射到物理頁地址上
它們使用一個硬件TLB (翻譯後援緩沖器)來緩沖最近使用的譯文
如果譯文不在TLB中
就會出現讀取頁目錄和更新TLB的開銷
PA
處理器與較老的處理器相比
TLB故障的代價更大
但是它可以處理更大的頁面尺寸
所以您需要的TLB登錄項可能更少
HP
UX
內核不能要求裝載具有大文本頁的二進制文件
因此它必須在exec(
)過程中讀一次
然後將其鎖入RAM中
只有在進程具有MLOCK 權限的情況下
內核才能進行此項處理
而這個權限是在已經用setprivgrp 賦予當前組的情況下獲得的
TLB故障的減少和文本頁故障的消除應當能夠提高系統性能
代價就是啟動時間稍微有些長(啟動過程中裝載整個的二進制文件)
損失可用於其它目的的RAM頁(現在內存中駐留整個二進制文件
而不只是最近使用過的頁面)
following with all English text
Oracle
setprivgrp/large text pages errors
Problem Description
On HP
UX
I see the following message in the dmesg output or syslog:
Process pid num=
does not have mem locking privileges
^ or a meaningful PID with PHKL_
/
[PHKL_
]
required for using large text pages in this version
See setprivgrp command
What is happening?
Configuration Info
Operating System
HP
UX
Version
Hardware System
HP
Series
H
Solution
This message means a binary was exec(
)uted which asked to use large text pages (because
chatr +pi L
was run on the binary file)
The message can be disabled with ADB:
echo
allow_superpage_text?W
| adb
w /stand/vmunix
Disabling it this way (which requires a reboot and must be repeated if the kernel was rebuilt) is no longer necessary with PHKL_
/
If the feature should not be used
using chatr(
) to reset the binary to request the default
k pages is the preferred method
If the
feature should be used
the group the process is executing in should be granted the MLOCK privilege
e
g
if this is an Oracle
process and the group the Oracle user is in is dba:
setprivgrp dba CHOWN MLOCK
To do this permanently
/etc/privgroup (which is read in
/sbin/init
d/set_prvgrp: /usr/sbin/setprivgrp
f /etc/privgroup)
should be edited (create if necessary
add a line
dba CHOWN MLOCK
)
However
if Advanced or Online JFS is used
the following VxFS patch
needs to be installed to prevent a deadlock during the load of the binary that would result in a hung
un
killable process:
PHKL_
(s
) or PHKL_
(s
)
Background:
Processors need to map virtual to physical page addresses
They use a
piece of hardware
the TLB (Transaction Lookaside Buffer) to cache recently used translations
If a translation is not in the TLB
overhead to read the page directory and update the TLB is incurred
PA
processors have a larger penalty for a TLB miss than older processors
but can handle larger page sizes
so that you may need
fewer TLB entries
The HP
UX
kernel cannot demand load a binary with large text pages
so it has to read it once during exec(
) and lock it into RAM
The kernel will only do that if the process has the MLOCK privilege
which is granted if the current group has been given this privilege with setprivgrp
The reduction of TLB misses and elimination of text page faults should increase performance
The cost is a slightly larger startup time (during which the whole binary is loaded) and the loss of RAM pages available
for other purposes (the whole binary is now resident in memory
not just the recently used pages)
From:http://tw.wingwit.com/Article/program/Oracle/201311/18686.html