Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Reserved Memory Insight

SOLVED
Go to solution
Jack Trachtman
Super Advisor

Reserved Memory Insight

(VMS V7.3-2)

We use Reserved Memory to set aside memory
for Oracle. Occassionally, we have been
testing Oracle which included restarting it.
Usually, after only a few restarts, we get
to a point where Oracle will not start,
complaining that it can't get its
Reserved Memory. When we reboot, Oracle
is fine.

Can anyone explain what's happening here?
Can Reserved Memory get "fragmented"?

Thanks all
14 REPLIES
Jan van den Ende
Honored Contributor

Re: Reserved Memory Insight

Jack,

without further info, my first action would be to check whether Oracle releases the reserved memory upon shutdown.

I bet more than even chances that it does NOT, and reserves another chunk of memory upon restart each time. And so on, until reservable memory gets exhausted.
Of course reboot clears that :-(

Please, check this out first.

Proost.

Have one on me.

jpe

Don't rust yours pelled jacker to fine doll missed aches.
Marc Van den Broeck
Trusted Contributor
Solution

Re: Reserved Memory Insight

Jack,

i also use reserved memory for Oracle instances. I have 3 instances and each of it gets his own 'named' reserved memory chunk. After shutting down Oracle you have to wait some time before you restart the instance. Use show mem to see when your reserved memory has been released by Vms. If you start to soon you get the error you specify. You can also see in your alert.log file that the amount of memory you allocate is not too large (to avoid wasting memory). What version of Oracle do you have? My experience is based on Oracle7 and Oracle8 instances. I dont know (yet) how Oracle9 behaves. (Seen your Vms version i guess you are using Oracle9)

Rgds
Marc
Marc Van den Broeck
Trusted Contributor

Re: Reserved Memory Insight

Jack,

some more info.
I dont think it can get fragmented, because it is one 'named' chunk of memory. It is not allocated in pieces, it is everything or nothing. The larger this reserved memory block is, the more time Vms needs to free it. I wait 2 minutes between shutdown and startup for a block of memory of 30000 pages. (sga of about 240M i think). Of course the time will also depend on the power of your Alpha. (I have a cluster of two COMPAQ AlphaServer DS20E 666 MHz).
There are no routines (lib$, sys$ or ...) you can use to ask Vms whether reserved memory has been freed. (unless they have been made available in Vms 7.3)

Rgds
Marc
Jack Trachtman
Super Advisor

Re: Reserved Memory Insight

Marc's input is interesting. When we've
had this problem, we've issued a SHOW
MEM/RES and that has always shown that
the reserved memory is totally free. But
since our res mem size is (presently) 6GB,
maybe we do have to wait 5 minutes for the
memory to become available. Is this
reasonable, or should VMS be able to
deallocate memory in only a few seconds?

Ian Miller.
Honored Contributor

Re: Reserved Memory Insight

It appears that the reserved memory can become internally fragmented and that the order that you startup the oracle instances is important (big ones first is best).

Is there a significant swapper activity after oracle is shutdown or other system activity?
____________________
Purely Personal Opinion
Marc Van den Broeck
Trusted Contributor

Re: Reserved Memory Insight

Jack,

I wait 2 mins because 1 min was not long enough. So i dont know how long you should wait for 6Gb.
How many Oracle instances do you have and how large is each sga (or better block of memory you reserve).

Ian,
reserved memory is allocated at startup.
If I allocate two named chunks of reserved memory then how can it get fragmented when I shut/start Oracle? Isn't it allocated all the time but only used or free?
Ian Miller.
Honored Contributor

Re: Reserved Memory Insight

I think I saw a situation with one named reserved area and multiple oracle instances - vague memory so may be wrong
____________________
Purely Personal Opinion
Marc Van den Broeck
Trusted Contributor

Re: Reserved Memory Insight

Ian,
to refresh your memory ;-)
You can only load one Oracle instance in a named reserved memory block because Oracle uses the name the 'grab' the block.
e.g.
database name (sid in fact) MYDB
If you then create a reserved memory block with the name ORA_MYDB_SGA Oracle will use it, nothing else to do. (You must make it large enough to make the sga fit and not too large to waste memory)

Rgds
Marc
Marc Van den Broeck
Trusted Contributor

Re: Reserved Memory Insight

Hi Jack,

I wonder if you found a good solution yet. It might be of interest for people involved with large databases.
Thx

Rgds
Marc
Willem Grooters
Honored Contributor

Re: Reserved Memory Insight

It will depend on a number of parameters:
* process-local or global?
* Is memory allocated from reserved adress space or from the general heap?
* Are pages sawapped out, need to be read in to check if data needs to be written first?

Check the virtual-memory- and disk activity.
Willem Grooters
OpenVMS Developer & System Manager
Marc Van den Broeck
Trusted Contributor

Re: Reserved Memory Insight

Willem,

as far as I know reserved memory is mapped in physical memory and never swapped out. Or am I wrong?

Rgds
Marc
Willem Grooters
Honored Contributor

Re: Reserved Memory Insight

Reserving memory is always, AFAIK, a matter of virtual address space, and, unless explictly stated otherwise, referring to paged pool. It does not have to mean that memory is already allocated on reservation. That can be done at need.
But this is application dependent, and I don't know how Oracle has implemented this (I know how I did it ;-))
Willem Grooters
OpenVMS Developer & System Manager
Hein van den Heuvel
Honored Contributor

Re: Reserved Memory Insight

Willem,

When OpenVMS / Oracle folks talk about 'Reserved Memory' they are talkign PHYSICAL MEMORY. Nothing to do with pool.

Just hit Google with +openvms +"reserved memory"

You will notably find the following article by Karen and Nitin:

http://research.compaq.com/wrl/DECarchives/DTJ/DTJS03/DTJS03PF.PDF


Hein.
Jack Trachtman
Super Advisor

Re: Reserved Memory Insight

Thanks to all who've replied.

Some quick notes:

I don't presently have a test system
so I can't try some of the suggestions.

I will read the DEC Journal paper referenced
and the VMS VLM manual to get more background.

Actually, I was hoping that someone from
VMS internals would jump in...