tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: M selcukkaraca <selcuk.karaca () aski ! gov ! tr>
To: tru64-unix-managers
Subject: SUMMARY:How to set gh-chunks correctly
Date: Fri, 03 Mar 2000 17:00:21 +0000	[thread overview]
Message-ID: <96079341819307.tru64-unix-managers.marc@archive.invalid> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: multipart/mixed; boundary="------=_NextPart_000_0036_01BF84EE.E7D28680", Size: 27993 bytes --]

This is a multi-part message in MIME format.

------=_NextPart_000_0036_01BF84EE.E7D28680
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Sorry for this latency,

Thanks to all of the following admins,
-- Han Pilmeyer, han@zk3.dec.com
- Vipin Gokhale
- Alan Davis (answer greatly appreciated)

vmemconfigure:segmented shared memory and granularity hints are mutually
exclusive.Turning off granularity hints.

as the above error messages says, Segmented shared memory and =
granularity hints can not co-exist.So you have to set

ssm-threshold=3D0 (in the ipc subsystem)

You can do this with the dxkerneltuner or=20
sysconfig -r ipc ssm-treshold=3D0  (changes kernel attribute in run-time =
but lost after boot so best method is to change the boot time value with =
dxkerneltuner and reboot the box)

I think this allows to cancel the segmented shared memory  option.

You must reserve as many as shared memory used by oracle SGA.  Another =
important point , memory reserved by gh-chunks can not be used by OS so =
if it is more than needed, it can not be returned to OS .

 Steps for this (as far as I understood) BUT I COULD NOT IMPLEMENT THIS =
IN MY MACHINE BECAUSE I COULD NOT REBOOT MY BOX !!! (YET)
1- Make the oracle SGA (can be seen with ipcs -mb ) evenly divisible by =
8388608 (8 MB in decimal)  (it is advised to regulate sharedpool area =
for this)
2- gh-chunks =3D Your_SGA_size / 4 MB (=3D 4194304) (may be +1) (to open =
granularity hints )
3- ssm-treshold=3D0=20
4- shm-max=3Dat least your_SGA_size (this provides SGA to be in *only* 1 =
shared segment which optimize performance )
5- reboot your box

If I am wrong please correct me. Anyway, you can find much more than =
this in the following DOC.

selcuk.karaca@aski.gov.tr

I am giving the whole doc sent by  Alan Davis which very good.
------------------------Starting from =
here---------------------------------------------------------------------=
----

Forcing Oracle to use 8 MB-aligned shared memory segments.
=20
This note was written by Elizabeth Sperling and Glenn Stasse of the=20
Washington, D.C. Benchmark Center. It addresses some setup features when
running Oracle7 on Digital UNIX/Alpha systems. It is applicable to
Digital UNIX Version 3.x systems with the OSF350-055 patch installed and
to Digital UNIX version 3.2D systems.=20
=20
Introduction:
=20
An optimization has been developed for the use of large, shared memory
segments on Digital Unix V3.x. This optimization involves the use of
shared page table entries(PTEs) to map shared memory segments and the
use of an Alpha  architectural feature called granularity hints. When
this patch is applied and  the shared memory segments are properly
aligned, each process attaching to the shared segments will use the
shared PTEs to map the shared segments, reducing memory consumption and
improving performance, particularly when attaching and detaching to the
shared segments.=20
=20
A by-product of this optimization is that the shared memory segments
need to  be aligned on 8MB boundaries (that is, the lower 23 bits of the
address must be  zero) in order to function properly. Non-aligned
segments will bypass the  shared PTE mechanism and revert to the
traditional virtual memory system.
=20
This note addresses one method found to be successful in size-aligning
the shared memory usage of Oracle7 such that the Oracle shared memory
usage is falls on an even 8MB boundary. This note does NOT address the
need for a shared segment's attach address to be aligned.=20
=20
Setting a value for Granularity Hints for shared memory segments:
=20
The granularity hints fix makes use of the granularity hints bits in the
page table entry (PTE) as specified in the Alpha Architecture.
Granularity hints is a Translation Buffer (TB) optimization that allows
the TB to map more than a single page. Enabling the granularity hints
fix also enables the shared PTE fix. The granularity hints fix is
enabled by setting the "gh-chunks" parameter in OSF /etc/sysconfigtab.
The gh-chunks parameter is the number of 4 Megabyte chunks reserved at
boot time for shared memory use.=20
=20
In /etc/sysconfigtab set the value for gh-chunks according to the size
of your  shared memory requirements. The entry should be similar to the
following:=20
=20
vm:
        gh-chunks=3D512
            OR
        gh-chunks=3D0x200
=20
This reserves 2 Gigabytes of physical memory for shared memory.  The
calculation is:=20
=20
        In decimal:  4194304 * 512 =3D 2147483648
        In Hex:      0x400000 * 0x200 =3D 0x80000000
=20
Please Note: Memory that is set aside at boot time for shared memory by
specifying a value for gh-chunks will not be used for anything other
than shared memory. Unused memory from this region is not given back to
the system.=20
=20
Finding Current Values for the database
=20
You can determine the systems view of shared memory segments with the
command  'ipcs -mb'. On a system using an SGA of approximately 2.4GB
this displays:
=20
Shared Memory:
T      ID     KEY      MODE        OWNER    GROUP      SEGSZ
m       0 71535248 --rw-r-----     oracle   users        784
m       1 138644112 --rw-r-----    oracle   users 2139095040
m       2 205752976 --rw-r-----    oracle   users  273563648
=20
Note the two values for SEGSZ owned by Oracle(other than the first).
This is  the QUANTITY of shared memory allocated by Oracle for the SGA,
etc. The sum of  these two numbers (2139095040 + 273563648 =3D =
2412658688)
is not evenly  divisible by 8388608 (8 MB in decimal) so these segments
are not properly  aligned. (In fact, the first of these two values IS
properly aligned already so all the modifications will apply to the
second value, which is the difference between the largest segment
available and the application requirements.)=20
=20
Calculating new values
=20
A simple way to get to the value you need is:
=20
 Divide the sum of the shared segments by 8MB:
   2412658688/8388608 =3D 287
 Round up(or down) to the next highest value and multiply by 8MB:
   288*8388608 =3D 2415919104
 Subtract the original value for shared memory from the new
value:
   2415919104 - 2412658688 =3D 3260416
 Add THIS value to the parameter shared_pool_size in
initXXXX.ora:
   80000000 + 3260416 =3D 83260416
=20
After modifying shared_pool_size and bouncing the database, the same
'ipcs -mb' command now shows: Shared Memory:=20
=20
T      ID     KEY      MODE        OWNER    GROUP       SEGSZ
m       0 71535248 --rw-r-----     oracle    users        784
m       1 138644112 --rw-r-----    oracle    users 2139095040
m       2 205752976 --rw-r-----    oracle    users  276824064
=20
Note the growth in the size of the second segment. The first segment is
already as big as it can be so the difference will be reflected in the
size of  the second segment. (This may NOT be the case when the SGA size
is less than 2  GB.) These sum of these two values are properly aligned:
=20
 2139095040 + 276824064 =3D 2415919104 which is properly aligned
because:
 2415919104/(8388608*288) =3D 1
=20
Another way to think about it is the shared memory used by Oracle is
composed  of 288 8MB segments.
=20
Notes and Comments
=20
Note 1:
=20
This entire exercise is meaningless on systems where the patch to use
shared PTEs has not been applied.=20
=20
Note 2:
=20
This methodology should result in improved performance although no
testing has  been done to characterize this.
=20
Note 3:
=20
There are other values in the Oracle parameter file that affect the size
of Oracle's shared memory usage. You can tweak any of them that are
appropriate for your requirements but in the end the ipcs display must
total an even multiple of 8388608. Adding a value to shared pool is a
fairly easy way out.=20
=20
Note 4:
When the SGA is 2GB and above, a good value to use for shm-max in
/etc/sysconfigtab is 2139095040. Other notes around suggested a value of
2118123520. This new value has the lower 23 bits =3D 0 (i.e., properly
aligned).
=20
Note 5:
Trying to relate the values Oracle gives you for it's usage to the ipcs
display can be a difficult. There is overhead added to the request made
by the application. Consider the following:=20
=20
When the Oracle database starts up it displays:
=20
ORACLE instance started.
Database mounted.
Database opened.
Total System Global Area    2412649680 bytes
              Fixed Size         70736 bytes
           Variable Size     117770368 bytes
        Database Buffers    2293760000 bytes
            Redo Buffers       1048576 bytes
=20
(You can get the same numbers using the query 'select * from v$sga;' and
'select sum(value) from v$sga;'.)
=20
The sum of Fixed Size, Variable Size, Database Buffers, and Redo Buffers
is  2412649680. The sum of the ipcs display is 2412658688. The
difference between  the two is 9008, a value that relates in no obvious
way. Chasing these numbers  around may not yield quick results! It's
probably faster to look at the numbers in the ipcs display, change the
values in initXXX.ora, and bounce the database.=20
=20
Note 6:
=20
For completeness sake here are the raw values used while working on this
note.
=20
Before (shared_pool_size=3D80000000)
--------------------------------------------
=20
ipcs -mb
Shared Memory:
T      ID     KEY      MODE        OWNER    GROUP     SEGSZ
m       0 71535248 --rw-r-----    oracle    users       784
m       1 138644112 --rw-r-----    oracle    users2139095040
m       2 205752976 --rw-r-----    oracle    users 273563648
=20
ORACLE instance started.
Database mounted.
Database opened.
Total System Global Area    2412649680 bytes
              Fixed Size         70736 bytes
           Variable Size     117770368 bytes
        Database Buffers    2293760000 bytes
            Redo Buffers       1048576 bytes
=20

After (shared_pool_size=3D83260448)
--------------------------------------------
ipcs -mb
Shared Memory:
T      ID     KEY      MODE        OWNER    GROUP     SEGSZ
m       0 71535248 --rw-r-----    oracle    users       784
m       1 138644112 --rw-r-----    oracle    users2139095040
m       2 205752976 --rw-r-----    oracle    users 276824064
=20
ORACLE instance started.
Database mounted.
Database opened.
Total System Global Area    2415910128 bytes
              Fixed Size         70736 bytes
           Variable Size     121030816 bytes
        Database Buffers    2293760000 bytes
            Redo Buffers       1048576 bytes
=20
SQL> select * from v$sga;
=20
NAME                      VALUE
-------------------- ----------
Fixed Size                70736
Variable Size         121030816
Database Buffers     2293760000
Redo Buffers            1048576
=20
SQL> select sum(value) from v$sga;
=20
SUM(VALUE)
----------
2415910128




------=_NextPart_000_0036_01BF84EE.E7D28680
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3401" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Sorry for this latency,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks to all of the following =
admins,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-- Han Pilmeyer, <A=20
href=3D"mailto:han@zk3.dec.com">han@zk3.dec.com</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- Vipin&nbsp;Gokhale</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- Alan Davis (answer greatly=20
appreciated)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG><FONT face=3DArial size=3D2>vmemconfigure:segmented shared =
memory and=20
granularity hints are mutually<BR>exclusive.Turning off granularity=20
hints.<BR></FONT></STRONG></DIV>
<DIV><FONT face=3DArial size=3D2>as the above error&nbsp;messages says, =
Segmented=20
shared memory and granularity hints can not co-exist.So you have to=20
set</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>ssm-threshold=3D0 (in the <STRONG><FONT =
face=3DArial=20
size=3D2>ipc subsystem)</FONT></STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>You can do this with the=20
dxkerneltuner&nbsp;or&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>sysconfig -r&nbsp;ipc =
ssm-treshold=3D0&nbsp; (changes=20
kernel attribute in run-time but lost after boot so best method is to =
change the=20
boot time value with dxkerneltuner and reboot the box)<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I think this allows to cancel the =
segmented shared=20
memory&nbsp; option.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>You must reserve as many as shared =
memory used by=20
oracle SGA.&nbsp; Another important point , memory reserved by gh-chunks =
can not=20
be used by OS so if it is more than needed, it can not be returned to OS =

.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;Steps for this <STRONG>(as far as =
I=20
understood) BUT I COULD NOT IMPLEMENT THIS IN MY MACHINE BECAUSE I COULD =
NOT=20
REBOOT MY BOX !!! (YET)</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>1- Make the oracle SGA (can be seen =
with ipcs -mb )=20
evenly divisible by 8388608 (8 MB in decimal)&nbsp; (it is advised to =
regulate=20
sharedpool area for this)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>2- gh-chunks =3D Your_SGA_size / =
4&nbsp;MB&nbsp;(=3D=20
4194304) (may be +1) (to open granularity hints )</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>3- ssm-treshold=3D0 </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>4- shm-max=3Dat least your_SGA_size =
(this provides=20
SGA to be in *only* 1 shared segment which optimize performance =
)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>5- reboot your box</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>If I am wrong please correct me. =
Anyway, you can=20
find much more than this in the following DOC.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>selcuk.karaca@aski.gov.tr</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am giving the whole doc sent by&nbsp; =
Alan Davis=20
which very good.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>------------------------Starting from=20
here---------------------------------------------------------------------=
----</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Forcing Oracle to use 8 MB-aligned =
shared memory=20
segments.<BR>&nbsp;<BR>This note was written by Elizabeth Sperling and =
Glenn=20
Stasse of the <BR>Washington, D.C. Benchmark Center. It addresses some =
setup=20
features when<BR>running Oracle7 on Digital UNIX/Alpha systems. It is =
applicable=20
to<BR>Digital UNIX Version 3.x systems with the OSF350-055 patch =
installed=20
and<BR>to Digital UNIX version 3.2D systems.=20
<BR>&nbsp;<BR>Introduction:<BR>&nbsp;<BR>An optimization has been =
developed for=20
the use of large, shared memory<BR>segments on Digital Unix V3.x. This=20
optimization involves the use of<BR>shared page table entries(PTEs) to =
map=20
shared memory segments and the<BR>use of an Alpha&nbsp; architectural =
feature=20
called granularity hints. When<BR>this patch is applied and&nbsp; the =
shared=20
memory segments are properly<BR>aligned, each process attaching to the =
shared=20
segments will use the<BR>shared PTEs to map the shared segments, =
reducing memory=20
consumption and<BR>improving performance, particularly when attaching =
and=20
detaching to the<BR>shared segments. <BR>&nbsp;<BR>A by-product of this=20
optimization is that the shared memory segments<BR>need to&nbsp; be =
aligned on=20
8MB boundaries (that is, the lower 23 bits of the<BR>address must =
be&nbsp; zero)=20
in order to function properly. Non-aligned<BR>segments will bypass =
the&nbsp;=20
shared PTE mechanism and revert to the<BR>traditional virtual memory=20
system.<BR>&nbsp;<BR>This note addresses one method found to be =
successful in=20
size-aligning<BR>the shared memory usage of Oracle7 such that the Oracle =
shared=20
memory<BR>usage is falls on an even 8MB boundary. This note does NOT =
address=20
the<BR>need for a shared segment's attach address to be aligned.=20
<BR>&nbsp;<BR>Setting a value for Granularity Hints for shared memory=20
segments:<BR>&nbsp;<BR>The granularity hints fix makes use of the =
granularity=20
hints bits in the<BR>page table entry (PTE) as specified in the Alpha=20
Architecture.<BR>Granularity hints is a Translation Buffer (TB) =
optimization=20
that allows<BR>the TB to map more than a single page. Enabling the =
granularity=20
hints<BR>fix also enables the shared PTE fix. The granularity hints fix=20
is<BR>enabled by setting the "gh-chunks" parameter in OSF=20
/etc/sysconfigtab.<BR>The gh-chunks parameter is the number of 4 =
Megabyte chunks=20
reserved at<BR>boot time for shared memory use. <BR>&nbsp;<BR>In=20
/etc/sysconfigtab set the value for gh-chunks according to the =
size<BR>of=20
your&nbsp; shared memory requirements. The entry should be similar to=20
the<BR>following:=20
<BR>&nbsp;<BR>vm:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
gh-chunks=3D512<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;=20
OR<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
gh-chunks=3D0x200<BR>&nbsp;<BR>This reserves 2 Gigabytes of physical =
memory for=20
shared memory.&nbsp; The<BR>calculation is:=20
<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In =
decimal:&nbsp;=20
4194304 * 512 =3D =
2147483648<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; In=20
Hex:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x400000 * 0x200 =3D=20
0x80000000<BR>&nbsp;<BR>Please Note: Memory that is set aside at boot =
time for=20
shared memory by<BR>specifying a value for gh-chunks will not be used =
for=20
anything other<BR>than shared memory. Unused memory from this region is =
not=20
given back to<BR>the system. <BR>&nbsp;<BR>Finding Current Values for =
the=20
database<BR>&nbsp;<BR>You can determine the systems view of shared =
memory=20
segments with the<BR>command&nbsp; 'ipcs -mb'. On a system using an SGA =
of=20
approximately 2.4GB<BR>this displays:<BR>&nbsp;<BR>Shared=20
Memory:<BR>T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID&nbsp;&nbsp;&nbsp;&nbsp;=20
KEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
MODE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
OWNER&nbsp;&nbsp;&nbsp; GROUP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
SEGSZ<BR>m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 71535248=20
--rw-r-----&nbsp;&nbsp;&nbsp;&nbsp; oracle&nbsp;&nbsp;=20
users&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
784<BR>m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 138644112=20
--rw-r-----&nbsp;&nbsp;&nbsp; oracle&nbsp;&nbsp; users=20
2139095040<BR>m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 205752976=20
--rw-r-----&nbsp;&nbsp;&nbsp; oracle&nbsp;&nbsp; users&nbsp;=20
273563648<BR>&nbsp;<BR>Note the two values for SEGSZ owned by =
Oracle(other than=20
the first).<BR>This is&nbsp; the QUANTITY of shared memory allocated by =
Oracle=20
for the SGA,<BR>etc. The sum of&nbsp; these two numbers (2139095040 + =
273563648=20
=3D 2412658688)<BR>is not evenly&nbsp; divisible by 8388608 (8 MB in =
decimal) so=20
these segments<BR>are not properly&nbsp; aligned. (In fact, the first of =
these=20
two values IS<BR>properly aligned already so all the modifications will =
apply to=20
the<BR>second value, which is the difference between the largest=20
segment<BR>available and the application requirements.)=20
<BR>&nbsp;<BR>Calculating new values<BR>&nbsp;<BR>A simple way to get to =
the=20
value you need is:<BR>&nbsp;<BR>&nbsp;Divide the sum of the shared =
segments by=20
8MB:<BR>&nbsp;&nbsp; 2412658688/8388608 =3D 287<BR>&nbsp;Round up(or =
down) to the=20
next highest value and multiply by 8MB:<BR>&nbsp;&nbsp; 288*8388608 =3D=20
2415919104<BR>&nbsp;Subtract the original value for shared memory from =
the=20
new<BR>value:<BR>&nbsp;&nbsp; 2415919104 - 2412658688 =3D =
3260416<BR>&nbsp;Add=20
THIS value to the parameter shared_pool_size =
in<BR>initXXXX.ora:<BR>&nbsp;&nbsp;=20
80000000 + 3260416 =3D 83260416<BR>&nbsp;<BR>After modifying =
shared_pool_size and=20
bouncing the database, the same<BR>'ipcs -mb' command now shows: Shared =
Memory:=20
<BR>&nbsp;<BR>T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID&nbsp;&nbsp;&nbsp;&nbsp; =

KEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
MODE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
OWNER&nbsp;&nbsp;&nbsp; GROUP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
SEGSZ<BR>m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 71535248=20
--rw-r-----&nbsp;&nbsp;&nbsp;&nbsp; oracle&nbsp;&nbsp;&nbsp;=20
users&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
784<BR>m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 138644112=20
--rw-r-----&nbsp;&nbsp;&nbsp; oracle&nbsp;&nbsp;&nbsp; users=20
2139095040<BR>m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 205752976=20
--rw-r-----&nbsp;&nbsp;&nbsp; oracle&nbsp;&nbsp;&nbsp; users&nbsp;=20
276824064<BR>&nbsp;<BR>Note the growth in the size of the second =
segment. The=20
first segment is<BR>already as big as it can be so the difference will =
be=20
reflected in the<BR>size of&nbsp; the second segment. (This may NOT be =
the case=20
when the SGA size<BR>is less than 2&nbsp; GB.) These sum of these two =
values are=20
properly aligned:<BR>&nbsp;<BR>&nbsp;2139095040 + 276824064 =3D =
2415919104 which=20
is properly aligned<BR>because:<BR>&nbsp;2415919104/(8388608*288) =3D=20
1<BR>&nbsp;<BR>Another way to think about it is the shared memory used =
by Oracle=20
is<BR>composed&nbsp; of 288 8MB segments.<BR>&nbsp;<BR>Notes and=20
Comments<BR>&nbsp;<BR>Note 1:<BR>&nbsp;<BR>This entire exercise is =
meaningless=20
on systems where the patch to use<BR>shared PTEs has not been applied.=20
<BR>&nbsp;<BR>Note 2:<BR>&nbsp;<BR>This methodology should result in =
improved=20
performance although no<BR>testing has&nbsp; been done to characterize=20
this.<BR>&nbsp;<BR>Note 3:<BR>&nbsp;<BR>There are other values in the =
Oracle=20
parameter file that affect the size<BR>of Oracle's shared memory usage. =
You can=20
tweak any of them that are<BR>appropriate for your requirements but in =
the end=20
the ipcs display must<BR>total an even multiple of 8388608. Adding a =
value to=20
shared pool is a<BR>fairly easy way out. <BR>&nbsp;<BR>Note 4:<BR>When =
the SGA=20
is 2GB and above, a good value to use for shm-max =
in<BR>/etc/sysconfigtab is=20
2139095040. Other notes around suggested a value of<BR>2118123520. This =
new=20
value has the lower 23 bits =3D 0 (i.e., =
properly<BR>aligned).<BR>&nbsp;<BR>Note=20
5:<BR>Trying to relate the values Oracle gives you for it's usage to the =

ipcs<BR>display can be a difficult. There is overhead added to the =
request=20
made<BR>by the application. Consider the following: <BR>&nbsp;<BR>When =
the=20
Oracle database starts up it displays:<BR>&nbsp;<BR>ORACLE instance=20
started.<BR>Database mounted.<BR>Database opened.<BR>Total System Global =

Area&nbsp;&nbsp;&nbsp; 2412649680=20
bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;=20
Fixed Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 70736=20
bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Variable=20
Size&nbsp;&nbsp;&nbsp;&nbsp; 117770368=20
bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Database=20
Buffers&nbsp;&nbsp;&nbsp; 2293760000=20
bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; Redo=20
Buffers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1048576 =
bytes<BR>&nbsp;<BR>(You can=20
get the same numbers using the query 'select * from v$sga;' =
and<BR>'select=20
sum(value) from v$sga;'.)<BR>&nbsp;<BR>The sum of Fixed Size, Variable =
Size,=20
Database Buffers, and Redo Buffers<BR>is&nbsp; 2412649680. The sum of =
the ipcs=20
display is 2412658688. The<BR>difference between&nbsp; the two is 9008, =
a value=20
that relates in no obvious<BR>way. Chasing these numbers&nbsp; around =
may not=20
yield quick results! It's<BR>probably faster to look at the numbers in =
the ipcs=20
display, change the<BR>values in initXXX.ora, and bounce the database.=20
<BR>&nbsp;<BR>Note 6:<BR>&nbsp;<BR>For completeness sake here are the =
raw values=20
used while working on this<BR>note.<BR>&nbsp;<BR>Before=20
(shared_pool_size=3D80000000)<BR>----------------------------------------=
----<BR>&nbsp;<BR>ipcs=20
-mb<BR>Shared Memory:<BR>T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
ID&nbsp;&nbsp;&nbsp;&nbsp; KEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
MODE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OWNER&nbsp;&nbsp;&nbsp;=20
GROUP&nbsp;&nbsp;&nbsp;&nbsp; =
SEGSZ<BR>m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0=20
71535248 --rw-r-----&nbsp;&nbsp;&nbsp; oracle&nbsp;&nbsp;&nbsp;=20
users&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
784<BR>m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 138644112=20
--rw-r-----&nbsp;&nbsp;&nbsp; oracle&nbsp;&nbsp;&nbsp;=20
users2139095040<BR>m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 205752976=20
--rw-r-----&nbsp;&nbsp;&nbsp; oracle&nbsp;&nbsp;&nbsp; users=20
273563648<BR>&nbsp;<BR>ORACLE instance started.<BR>Database =
mounted.<BR>Database=20
opened.<BR>Total System Global Area&nbsp;&nbsp;&nbsp; 2412649680=20
bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;=20
Fixed Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 70736=20
bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Variable=20
Size&nbsp;&nbsp;&nbsp;&nbsp; 117770368=20
bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Database=20
Buffers&nbsp;&nbsp;&nbsp; 2293760000=20
bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; Redo=20
Buffers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1048576 =
bytes<BR>&nbsp;<BR><BR>After=20
(shared_pool_size=3D83260448)<BR>----------------------------------------=
----<BR>ipcs=20
-mb<BR>Shared Memory:<BR>T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
ID&nbsp;&nbsp;&nbsp;&nbsp; KEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
MODE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OWNER&nbsp;&nbsp;&nbsp;=20
GROUP&nbsp;&nbsp;&nbsp;&nbsp; =
SEGSZ<BR>m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0=20
71535248 --rw-r-----&nbsp;&nbsp;&nbsp; oracle&nbsp;&nbsp;&nbsp;=20
users&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
784<BR>m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 138644112=20
--rw-r-----&nbsp;&nbsp;&nbsp; oracle&nbsp;&nbsp;&nbsp;=20
users2139095040<BR>m&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 205752976=20
--rw-r-----&nbsp;&nbsp;&nbsp; oracle&nbsp;&nbsp;&nbsp; users=20
276824064<BR>&nbsp;<BR>ORACLE instance started.<BR>Database =
mounted.<BR>Database=20
opened.<BR>Total System Global Area&nbsp;&nbsp;&nbsp; 2415910128=20
bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;=20
Fixed Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 70736=20
bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Variable=20
Size&nbsp;&nbsp;&nbsp;&nbsp; 121030816=20
bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Database=20
Buffers&nbsp;&nbsp;&nbsp; 2293760000=20
bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; Redo=20
Buffers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1048576 =
bytes<BR>&nbsp;<BR>SQL&gt;=20
select * from=20
v$sga;<BR>&nbsp;<BR>NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;=20
VALUE<BR>-------------------- ----------<BR>Fixed=20
Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;=20
70736<BR>Variable Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
121030816<BR>Database Buffers&nbsp;&nbsp;&nbsp;&nbsp; 2293760000<BR>Redo =

Buffers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
=20
1048576<BR>&nbsp;<BR>SQL&gt; select sum(value) from=20
v$sga;<BR>&nbsp;<BR>SUM(VALUE)<BR>----------<BR>2415910128<BR><BR><BR></D=
IV></FONT></BODY></HTML>

------=_NextPart_000_0036_01BF84EE.E7D28680--

                 reply	other threads:[~2000-03-03 17:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox