Operating System - HP-UX
1834503 Members
2214 Online
110068 Solutions
New Discussion

Re: Memory Windows: Strange behavior

 
SOLVED
Go to solution
Robert Maretic
Occasional Contributor

Memory Windows: Strange behavior

Hi

I am testing out memory windows and I get some
strange results.

I start three oracle instances with setmemwindow. The /etc/services.window looks like:

BMP 5
INIT01 6
ROAM01 7

I start the instances the following way from a shell script:

WinID=$(getmemwindow $ORACLE_SID)
setmemwindow -i $WinId svrmgrl <connect internal
shutdown abort
startup pfile=$PFILE
EOF

The above statements are within a while loop
that goes through the rows in the /etc/oratab file.

Everything described above works fine. But when I remove the setmemwindow command in the
above script to test what happens my instances still start in separate memory windows!! How is this possible ????!! I would be very glad if
someone could explain this to me.

Then when I commented out all rows in /etc/services.window all instances used the common global memory window.

I used the memwin_stats command to check which
memory windows where used. The mem window patch I have on my machine is PHCO_20443.

/Robert Maretic
9 REPLIES 9
Sam Nicholls
Trusted Contributor

Re: Memory Windows: Strange behavior

Robert,

The /etc/services.window file already associates the applications with memory windows. The execution of setmemwindow in your script is redundant.

See /usr/share/doc/mem_wndws.txt and the services.window manpage for more info.

-sam
Sam Nicholls
Trusted Contributor

Re: Memory Windows: Strange behavior

Ooops, I was wrong. Please disregard my previous reply. /etc/services.window only maps keys to ids. You still have to use setmemwindow to associate a process with a user-specified memory window.
-sam
Robert Maretic
Occasional Contributor

Re: Memory Windows: Strange behavior

Hi again

But does is not seem strange that the instances are started up in separate memory windows when executing the svrmgrl command
without using setmemwindow? This seems almost like
magic to me.



It is only when I comment out all entries in /etc/services.window that all instances are started in the same memory window.

/Robert
Jack Marshall
Occasional Advisor

Re: Memory Windows: Strange behavior

Are you getting the behaviour you expect. My experience of memory windows led me to believe that Oracle would only allocate memory from the global pool (Q4). Mem wins are allocated out of the private quadrants Q2+Q3.
As an aside getmemwindow will pattern match on the window name (e.g. it will see INIT as being the same as INIT01, which is not ideal).

An unsupported tool 'shminfo' is available from HP which may give you more information about where your memory is being allocated.
Robert Maretic
Occasional Contributor

Re: Memory Windows: Strange behavior

Yes, partially. Because the sum of the SGA:s for the three
instances is larger than 1,75 Gb so when I use memory windows all my instances startup succesfully, but when I
do not use memory windows the last started instance cannot start because of insufficient memory.

I am very curious how and why the instances are started in separate memory windows when I don't use the setmemwindow command in my start script.

For me it seems like something is cached/stored somewhere. Somehow the HPUX recognises which process where started in certain memory windows as
long as there are entries in the /etc/services.window file.

I have even tried to reboot the server to see if the instances still are started separate memory windows without the setmemwindow command. And the result was that as long as there is winid entries in the /etc/services.window file, the instances are started in separate memory windows.
Jack Marshall
Occasional Advisor

Re: Memory Windows: Strange behavior

It looks like oracle uses a shared memory base address to reference memory, unless you change that, it will always start in effectively the same memory window. The considered opinion amongst my collegues is that memory windows neither work correctly or are supported for Oracle 7.x and we're not sure about Oracle 8.x
Sam Nicholls
Trusted Contributor
Solution

Re: Memory Windows: Strange behavior

Robert,

It looks like Oracle 8.0.6 and later automatically supports memory windows. Apparently, svrmgr is smart enough to look for a key in /etc/services.window that matches $ORACLE_SID and automatically do the setmemwindow (or equivalent system call).

Here is some info I found with a reference to 'Large SGA under HPUX 11' under the Oracle Metadata Technical forum.

BTW, from my experience, memory windows works very well. I know HP worked closely with Oracle to qualify running multiple instances in separate mem windows and get Oracle's endorsement of the feature. Oracle would not support it if it didn't work.

-sam


------------------>>> snip <<<-------------------
To configure memory windows for Oracle:

1. Ensure that the /etc/services.window file exists.

2. Add an entry to the services.window file that contains
the $ORACLE_SID for every instance mapped to use a unique
window ID.

Note: See 'Large SGA under HPUX 11' under the Oracle Metadata
Technical forum.

Per the Oracle web site, memory windows is supported for Oracle 8.06,
or later (although there may be a patch for 8.0.5). Oracle 8.0.5 did
not attempt to control the memory window used, hence it could be forced
into a particular window ID by the setmemwindow command.

As of version 8.0.6 and later, Oracle is aware of this feature and takes
control of the memory window. Therefore, if there is no entry in the
/etc/services.window file, it explicitly uses the global window, and
setmemwindow has no effect.

John Hoffmaster
New Member

Re: Memory Windows: Strange behavior

Hi Robert,
One thing I noticed in your message
WinID=$(getmemwindow $ORACLE_SID)
is different from setmemwindow -i $WinId
$WinId is a different variable from $WinID under unix.

One thing I found with memory windows is they last
as long as the unix server is up and I had the DBA 's create a new script that would do a setmemwindow -j (join) for restarting a DBMS server
vs a setmemwindow -c (create)

-John H
Robert Maretic
Occasional Contributor

Re: Memory Windows: Strange behavior

Hi

Thank you all, for all your replies, specially
Sam.

Sam your answer was a real ten pointer.

/Robert