免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5360 | 回复: 1
打印 上一主题 下一主题

solaris10 内核参数问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-07-12 15:21 |只看该作者 |倒序浏览
solaris10 内核参数问题
在solaris10上安装oracle10g,

修改/etc/system 文件前:
root # prctl -n project.max-shm-memory -i project user.root
project: 1: user.root
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 2.4GB - deny -
system 16.0EB max deny -

修改/etc/system, 添加下行, reboot机器
set shmsys:shminfo_shmmax=4294967295

重启机器后:
root@ # prctl -n project.max-shm-memory -i project user.root
project: 1: user.root
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 1024GB - deny -
system 16.0EB max deny -


问题: set shmsys:shminfo_shmmax=4294967295
不是要把最大共享内存设置为4GB吗, 怎么变成了1024GB ?

论坛徽章:
15
2015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-15 17:29:44午马
日期:2015-01-06 17:06:51子鼠
日期:2014-11-24 10:11:13寅虎
日期:2014-08-18 07:10:55酉鸡
日期:2014-04-02 12:24:51双子座
日期:2014-04-02 12:19:44天秤座
日期:2014-03-17 11:43:36亥猪
日期:2014-03-13 08:13:51未羊
日期:2014-03-11 12:42:03白羊座
日期:2013-11-20 10:15:18CU大牛徽章
日期:2013-04-17 11:48:45
2 [报告]
发表于 2006-07-13 07:40 |只看该作者
(我从别的地方找到的)

可能是你的问题回答:
Thanks to Jeffrey, Angelo, Kristopher, francisco, kalyan, Ian, Peter, other Peter, Thomas and also David Powell from Solaris Kernel Development.

Peter
A. van Gemert said:
\"The shared memory settings are now set on projects. You
have to create
a project and set the shared memory settings on this project. Then start your application in the project.\"

Dave Powell, Solaris Kernel
Development said:
\"  You can still set the above limit in /etc/system; we realized many people have scripts or practices built around using it as an interface and when making the changes in Solaris 10 you refer to were careful to support customization of /etc/system in a compatible fashion. \" \"  Once the pressure is off, I recommend investigating the resource controls facility in Solaris, which allows you to set such limits on a per-project (and sometimes per-process) basis.\"


The real solution now:

Jeffrey Donovan
said:

\"As root:

Get current settings to compare after changes:
oracle
-c \'sh -c \"prctl -i process $$\"\'  > /tmp/current_settings

projmod -s -K
\"project.max-shm-memory=(privileged,4GB,deny)\"
\'user.oracle\'
su oracle -c
\'sh -c \"prctl -i process $$\"\' << to check
projadd -c \"Oracle\" \'user.oracle\'
projmod -s -K \"project.max-shm-memory=(privileged,4GB,deny)\"
\'user.oracle\'
Get new settings:
su oracle -c \'sh -c \"prctl -i process $$\"\' >
/tmp/new_settings

If you do a diff on the two files, you should see shared
max mem is
4gb.\"


Thomas Carter said:

\"The file \"/etc/project\" defines
the settings: user.oracle:100::::project.max-shm-memory=(privileged,17179869184,deny);
project.max-sem-ids=(privileged,600,deny);project.max-shm-ids=(privilege
d,600,deny)

The user.<username> entry defines the default project for that specific
user. This sets what used to be called shmmax to ~17GB as well as the
maximum number of semaphores to 600 and the maximum number of shared memory segments to 600.\"



Peter Blackburn said:

\"If you want to set
it up for a specific user:

        shmem=\"4095MB\"

        projadd user.${user}
projmod -sK \"project.max-shm-memory=(priv,${shmem},deny)\"
user.${user}

OR
you can just make it the default:

        projmod -sK
\"project.max-shm-memory=(priv,${shmem},deny)\"
default



Thank you very
much for all your answers.

David Coronel

他的问题是:

Okay I\'m stuck on this one and have
rarely felt so much pressure.

Before
Solaris 10, if I wanted to set the
shmmax parameter I would simply do:

set
shmsys:shminfo_shmmax=4294967295
Now it seems you cannot do this anymore
with Solaris 10 and that you can
do
it dynamically and for each zone.
We\'re not using any zones on our Solaris 10
box and I need to make a
permanent system change (or at least a quick fix for
the time being).

I
know a little about the command prctl $$ to get the
system parameters
but where do I go from there?

Any help would be greatly
appreciated.

Thank
you,
David
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP