Re: SUMMARY: Re: Solaris10 resource control - max-shm-memory

From: Webpro (aielloster@gmail.com)
Date: Wed Jan 17 2007 - 13:15:27 EST


I continue to struggle with this in Solairs 10. Admittedly, I lack
any training in Solaris 10.

I cannot find the difinitive reference for implementing this in
Solaris 10 to achieve the same results as Solaris 8 and 9.

In solaris 8, we edit /etc/system and add entries like:

* Setting semiphores for DB
set semsys:seminfo_semmni=70
set semsys:seminfo_semmsl = 512
set semsys:seminfo_semmns = 10240
set semsys:seminfo_semmnu = 10240

* Enable large shared memory objects for DB
set shmsys:shminfo_shmmax = 0x80000000
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=20
set semsys:seminfo_semopm=100
set semsys:seminfo_semvmx=32767

These worked perfectly. The shmmax value set the maximum segement size.

With Solaris 10, the values in /etc/system STILL work, but it is
unknown if they work in the same way as in Solaris 8. Am I looking at
a maximum segment still? I can't really tell.

So, with a little investigation, I found I can create a "system"
project and set the shmmax value there (the rest seem to be supported
by new default values). So /etc/project has:
system:0::::project.max-shm-memory=(privileged,4294967295,deny)
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::

And the freakingly ugly command prctl $$ reports
project.max-shm-memory
        privileged 4.00GB - deny -
        system 16.0EB max deny -

OK!OK! prctl -n project.max-shm-memory $$ works too (I think it is magic):
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
        privileged 4.00GB - deny -
        system 16.0EB max deny

I created that entry using:
projmod -s -K 'project.max-shm-memory=(privileged,4294967295,deny)' system
and I implement it using:
prctl -n project.max-shm-memory -r -v 4gb -i project user.root

I reboot and I get:
project.max-shm-memory
        privileged 200GB - deny -
        system 16.0EB max deny -

Great 200GB! But if I try to create a 2gb segment, It fails. and I
have to set it all up again.

So, how why does the system project not survive a reboot? I have to
keep the old Soalris 8 /etc/system entries or issue this "prctl -n
project.max-shm-memory -r -v 4gb -i project user.root" all the time.

prtdiag
System Configuration: Sun Microsystems sun4u Netra 440
System clock frequency: 183 MHZ
Memory size: 8GB

==================================== CPUs ====================================
               E$ CPU CPU
CPU Freq Size Implementation Mask Status Location
--- -------- ---------- ------------------- ----- ------ --------
  0 1281 MHz 1MB SUNW,UltraSPARC-IIIi 2.4 on-line -
  1 1281 MHz 1MB SUNW,UltraSPARC-IIIi 2.4 on-line -
  2 1281 MHz 1MB SUNW,UltraSPARC-IIIi 2.4 on-line -
  3 1281 MHz 1MB SUNW,UltraSPARC-IIIi 2.4 on-line -

Thanks for any advice!

On 1/16/07, George Kahler <george@yorku.ca> wrote:
> Thanks to all who responded. In all I got responses from
>
> o Casper.Dik@Sun, who said:
>
> (The old limit was the maximum size *per segment*; the new limit is
> the maximum shared memory allowed, total)
>
> o Joe Webpro <aielloster@gmail.com>, who said:
> ...."I had spotty
> luck using projects and simply continue to use the /etc/system entries
> which globally sets the max shared memory value."
>
> o peter.van.gemert@accenture.com>, who said:
>
> Resource controls on projects are enforced on all process in a project.
> All process combined together will have a 4GB shared memory set. Is not
> set per process but it's a limit on the project.
>
> One process in your project will have a 4GB shared memory set. Ten
> processes will also have one 4GB shared memory set.
>
> o Usama Zubair" <uzubair@hotmail.com>, who said:
>
> It is for combined usage.
>
> o Deborah Crocker <crock@bama.ua.edu>, who said:
>
> Each is entitled to 4Gb. What they actually take, of course, is set in
> the oracle init.ora (or spfile) for the instance. Note that the default
> is 1/4 of memory, so on a 16Gb machine you would already have this.
>
> George
>
>
> >The DBAs have asked to configure a Sol10 system with 4GB of shared
> >memory for Oracle.
> >Unlike in Sol8 where I made the changes to /etc/system
> > (set shmsys:shminfo_shmmax=4294967295)
> >Sol10 requires me to make config changes to /etc/project. I'm not too
> >up on Sol10 and have plagiarized the following from some docs.
> > /usr/sbin/projadd -c 'Oracle User' 'user.oracle'
> > /usr/sbin/projmod -s -K 'project.max-sem-ids=(priv,500,deny);project.max-shm-memory=(priv,4G
> B,deny)' user.oracle
> >
> >My question is this:
> >Are all processes (user 'oracle') running under this
> >project entitled each to 4GB of shared mem or is the combined usage of
> >shared mem by all oracle processes limited by the 4GB ?
> _______________________________________________
> sunmanagers mailing list
> sunmanagers@sunmanagers.org
> http://www.sunmanagers.org/mailman/listinfo/sunmanagers
>

-- 
"Despite the high cost of living, it still remains popular!"
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:41:29 EDT