[SUMMARY] Shared Memory Segments

From: Mike Box <mbox_at_cleopas.cc.vt.edu>
Date: Tue, 31 Dec 96 11:50:41 EST

On December 23, I presented the following problem/questions for your
consideration. The responses are appended. Thanks to all who responded.

Mike Box Phone: (540)231-9506
Sr. Systems Engineer Internet: Mike.Box_at_vt.edu
VA Tech

------------------------------------------------------------------------
I solicit your help with this DU/Oracle shared memory problem.

Banner (SCT) suggested that 100meg would be a size to start with for
shared pool size.

When I changed shared pool size to 100meg I got the following error
message:

ora-7329 - too many Shared Memory Segments -

The cause is --

The internal data structure that holds segments information is full.

Action is -

Reconfigure the UNIX kernel to have larger segments

I changed it to 80meg and Oracle came up.


Here are my kernel ipc values:
   shm-max = 4194304
   shm-min = 1
   shm-mni = 128
   shm-seg = 32

Environment:
   Digital Unix 3.2d-2

Which is the appropriate kernel variable to change?

How do I determine the correct value for this variable?

-------------------------------------------------------------------------
From: soma_c_at_decus.fr (Claude SOMA - CNTS)

I think you can have 32 segments (shm-seg) of 4 Mb each (shm-max)
so 128 Mb (but for some reason at 100 Mb it's break)

You must set shm-max greater say 16Mb ?

Be careful I saw some problem with oracle+big shared memory
there is a patch available (See release note)

-------------------------------------------------------------------------
From: Joseph Thvedt <jthvedt_at_brookings.net>

100 MB is a VERY large shared pool size. You're not including your
db_block_buffers in that total, are you? As a rule of thumb,
db_block_buffers should be the bulk of your Oracle memory usage. You
should monitor your shared pool hit rate. I'd be happy to e-mail you
some scripts to do that. I'm at home now, so I don't have them handy.
Let me know if you'd like them. I'm guessing you could get a very good
hit rate with a much smaller shared pool. The trick is to use up most of
your memory, but avoid paging & swapping if you can.

In any case, you're probably best off bumping up your shm-max. As I
understand it, shm-max x shm-seg = the maximum Oracle can use for its
stuff. I'd do it with /etc/sysconfigtab rather than generate a new
kernel. It's a lot easier -- you just edit & reboot.

-------------------------------------------------------------------------
From: "Vipin Gokhale, DEC SBU, Oracle Corporation" <VGOKHALE_at_us.oracle.com>

 shm-max. Increase it to 128MB (which is more that what you need). Whatever
you set it to in future, set it to a value which is a multiple of 8MB.

-------------------------------------------------------------------------
From: "Randy M. Hayman" <haymanr_at_icefog.sois.alaska.edu>

The first thing I'd do is change shm-max to the optimal size (2GB -8MB), then
leave the other parameters alone (for now). This makes a single contiguous
shared memory segment for Oracle to use - a much more efficient way for memory
to be utilized. We have this parameter set on hosts ranging from 112MB of RAM
up to our main box which has 6GB of RAM. We are running the same software
that you are (our main instance, though, is set up for 1GB of SGA).

Here's an excerpt from our /etc/sysconfigtab:

ipc:
        shm-max = 0x7f800000
        shm-seg = 64
        shm-mni = 128

#shm-max = 8192 * 1024 = 8388608 -- maximum shared memory segment size
# (maxval = 2GB) [4194304]
# = 16777216 960312 rmhayman ( 16MB)
# = 134217728 960702 rmhayman (128MB)
# = 0x7f800000 960709 rmhayman (2GB - 8MB) Digital
# Recommended Optimal Size
# Reference: Page 5-18, Digital
# UNIX v4.0 Release Notes
#
#shm-seg = 32 -- maximum number of attached shared
# memory segments/ process [32]
# = 64 960312 rmhayman
#
#shm-mni = 100 -- number of shared memory identifiers
# [100]
# = 128 960312 rmhayman
#


As you can see, leaving a 4MB size (max) and 32 segments, leaves you with
only 128MB max usage less some overhead to manage it.

Assuming your use of shared pool means the variable portion of the SGA, you
need to account for the fixed portion, the redo block portion, and the
db block buffer portion. I'll bet this all adds up to more than 128MB.

Make the change to shm-max and let your shared memory be contiguous.
Received on Tue Dec 31 1996 - 18:23:17 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:47 NZDT