participate


Solaris Zones - unable to set kernel parameters using Reource Control
<<   Back to Forum  |   Give us Feedback
10 Duke Stars available
This topic has 4 replies on 1 page.
kgurucharan
Posts:3
Registered: 4/18/05
unable to set kernel parameters using Reource Control   
Apr 18, 2005 2:34 AM

 
HI,

I'm trying to install DB2 8.2 on solaris 10.the problem i'm encountering in installation is unable to set MSGMAX and MSGMNB kernel parameters. I tried setting the new replacement parameter process.max-msq-qbytes through projects->Resource Control from the management console.but still uinable to set the parameters.

Can anyone help me in setting the above kernel parameters.
Its not possible to set it thru /etc/system.

thanx

guru
 
fstuart
Posts:26
Registered: 6/22/05
Re: unable to set kernel parameters using Reource Control   
Apr 18, 2005 7:02 AM (reply 1 of 4)  (In reply to original post )

 
The default values in Solaris 10 are probably okay, but DB2 may not be able to tell that (e.g. sysdef in a local zone won't work).

Here's a link that might help:
http://blogs.sun.com/roller/comments/jkshah/Weblog/db2_working_under_solaris_10
 
jayanthad
Posts:2
Registered: 2/6/06
Re: unable to set kernel parameters using Reource Control   
Feb 6, 2006 3:02 PM (reply 2 of 4)  (In reply to #1 )

 
I also faced the same difficulties and was able to get rid of all problems using your instructions. Further I would like to share the db2util changes I have made to got it success.

...
...
# List of kernel parameters to be checked
#JD: KparamList="MSGMAX MSGMNB"
KparamList="" # JD
# Required value for kernel parameters
KparamValue=65535

rc=${TRUE?}
#JD: for param in ${KparamList?}; do
#JD: /usr/bin/grep ${param?} ${TMPFILE2?} 1>/dev/null 2>/dev/null
#JD: if [ $? -eq 0 ]; then
#JD: pvalue=0
#JD: pvalue=`/usr/bin/grep ${param?} ${TMPFILE2?} | /usr/bin/awk '{print $1}'`
#JD: fi
#JD: if [ ${pvalue:-0} -lt ${KparamValue?} ]; then
#JD: rc=${FALSE?}
#JD: display_msg ${DB2CAT?} 30 \
#JD: 'DBI1030E Kernel parameter %s must be set to %s.\n' ${param?} ${KparamValue?}
#JD: fi
#JD: done

if [ ${rc?} -eq ${FALSE?} ]; then
display_msg ${DB2CAT?} 109 \
....
....

Regards,
Jayantha Dikkumbura
Technical Specialist
 
safiume
Posts:23
Registered: 10/31/06
Re: unable to set kernel parameters using Reource Control   
Feb 6, 2006 7:10 PM (reply 3 of 4)  (In reply to original post )

 
I'm not familiar with the gui, but I have set resource controls from the command line.

The way to access and change system tunables in Solaris 10 has drastically changed from previous releases. Take a look at Solaris Containers-Resource Management and Solaris Zones documentation in the Solaris 10 system admin collection. This explains the 10 way of doing things and how tunables can be tweaked per user groupings. Under Solaris 10 even if you're not using zones, or containers you can only tweak the system using the project resource controls, not from /etc/system.

Say for instance I have an app server running as the user appserv in group 10 known as staff. I want to bump the shared memory per the app server install. The easiest way is to modify the resource limit for memory for the user that will run the app server software. To make shared memory 2gb right now for all users in the group/project of staff run:
prctl -n project.max-shm-memory -v 2147483648 -r -i project group.staff


To have the tuned resource persist across reboots (like /etc/system did for Solaris 9 and below) modify /etc/project with projmod.
projmod -a -K "project.max-shm-memory=(priv,2GB,deny)" group.staff 


This makes /etc/project look like the following:
# more /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::project.max-shm-memory=(priv,2147483648,deny)


This is really brief introduction to tunables on Solaris 10. For more information read:
Solaris Tunables Parameters Reference for Solaris 10
Solaris Containers-Resource Management and Solaris Zones
Solaris 10 Resource Manager Developer's Guide
and prjctl, projmod, project, rctladm man pages.

Cheers,
~~sa
 
safiume
Posts:23
Registered: 10/31/06
Re: unable to set kernel parameters using Reource Control   
Feb 13, 2006 6:54 PM (reply 4 of 4)  (In reply to #3 )

 
I finally had some time to find the actual syntax for tuning process.max-msq-qbytes and process.max-msg-messages. prctl will change those paramaters for an existing process.

As a proof of concept I changed process.max-msg-messages to a 64k. process 2221 is my shell.

 prctl -n process.max-msg-messages  -r -v 64k 2221 
bash-3.00# prctl 2221
process: 2221: -csh
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
process.max-port-events
        privileged      65.5K       -   deny                                 -
        system          2.15G     max   deny                                 -
process.max-msg-messages
        privileged      64.0K       -   deny                                 -
        system          4.29G     max   deny                                 -
process.max-msg-qbytes
        privileged      64.0KB      -   deny                                 -
        system          4.00GB    max   deny                                 -


And now to make this persist across reboots...
So long as I'm experimenting, I'll use projadd and add a new project which just includes me and not the rest of the users in the group staff.

bash-3.00# projadd -p 115 -U testuser \
-K "process.max-msg-messages=(priv,64K,deny)" \
-K "process.max-msg-qbytes=(priv,64K,deny)" \
user.me 


This creates the following /etc/project:
(note the last line is all on one line in the real file minus the \.)

placer% cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
user.me:115::testme::\
process.max-msg-messages=(priv,64000,deny);process.max-msg-qbytes=(priv,65536,deny)

After a reboot I checked the values by loging in under my user and running prctl.

placer% prctl $$
process: 419: -csh
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
process.max-port-events
        privileged      65.5K       -   deny                                 -
        system          2.15G     max   deny                                 -
process.max-msg-messages
        privileged      64.0K       -   deny                                 -
        system          4.29G     max   deny                                 -
process.max-msg-qbytes
        privileged      64.0KB      -   deny                                 -
        system          4.00GB    max   deny                                 -
process.max-sem-ops
        privileged        512       -   deny                                 -
        system          2.15G     max   deny                                 -
...


Solaris 10 has different tunables and default values from 8 and 9. It's default tunables should be good for most applications per a given system's hardware. There are some great blog articles, and discussions on opensolaris.org and blogs.sun.com on tuning that explain the intent of tuning and why we shouldn't have to tune.

Cheers,
~~sa
 
This topic has 4 replies on 1 page.
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics
    Users Online : 26
  • Guests : 129

About Sun forums
  • Sun Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Sun Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums