Hi Thiago,
Thiago Sobral wrote:
> please, I need some help to set some kernel parameters within resource
> manager.
>
> On Solaris9 I used to type the parameters below into /etc/system, but
> now I read that I need to setup this using resource manager.
Strictly speaking, it isn't necessary. If you put these settings in
/etc/system, the S10+ kernel will behave in a compatible fashion.
The resource controls offer greater flexibility, though (e.g. you can
change them without rebooting and have different limits for different
people).
> set msgsys:msginfo_msgmnb = 4294967295
> set msgsys:msginfo_msgmax = 10240
> set msgsys:msginfo_msgssz = 8
> set msgsys:msginfo_msgtql = 14000
> set msgsys:msginfo_msgseg = 32767
> set msgsys:msginfo_msgmap = 32767
> set shmsys:shminfo_shmmin = 1
>
> To do this, I created a project called SPHALLEON into /etc/project, but
> the message queue still has the same value (unchanged), and the others
> parameters too.
>
> /etc/system entry:
>
SPHALLEON:13:SPHALLEON:tsobral,root::process.max-msg-qbytes=(priv,4294967295,deny);\
> msgsys.msginfo_msgseg=(priv,8,deny);\
> process.max-msg-messages=(priv,14000,deny);\
> shmsys.shminfo_shmmin=(priv,32767,deny);
While some of the old tunables have equivalents, some of them are
obsolete -- the tunables will be ignored and there are no resource
control equivalents. To configure a project to have your limits, you
only need to set process.max-msg-qbytes and process.max-msg-messages
(which you have done correctly). msginfo_msgseg and shminfo_shmmin
are no longer used [1].
You can find a complete list of equivalents and retired tunables at:
http://www.opensolaris.org/os/project/rm/rctls/sysv/
> with the `projects -l` command, I saw the SPHALLEON project available,
> but should I need to apply this on the system ?
> Isn't enough the /etc/project entry ?
The only other thing you need to do is make sure the programs you
want to be subject to these limits are running in the project you've
created. You can do this manually using 'newtask -p SPHALLEON', or
you can update /etc/user_attr to make SPHALLEON the default project
for a particular user. e.g.
thiago::::project=SPHALLEON
Note this only applies to subsequent login sessions.
To skip the last step, you could set these limits on the project
'user.thiago', 'group.<thiago's group>', or 'default', since those
are the projects the system will automatically attempt to place you
in when you log in. See getdefaultproj(3PROJECT) for more details.
Lastly, if your application is running as an SMF service, you can
specify the desired project in the start method's method context.
Dave
[1] These tunables, along with msginfo_msgssz and msginfo_msgmap, are
also unused in Solaris 9.