- 论坛徽章:
- 15
|
(我从别的地方找到的)
可能是你的问题回答:
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 |
|