Operating System - HP-UX
1752734 Members
5496 Online
108789 Solutions
New Discussion юеВ

Re: SHMMAX and Oracle SGA

 
SOLVED
Go to solution
Tim Killinger
Regular Advisor

SHMMAX and Oracle SGA

Hello,

We're new to UX as we're porting an oracle based app to rp5450s. As the sysadmn, I'm trying to understand how to allocate memory for Oracle SGA; I want to make it as large as possible for data caching/io performance. Here are a couple of questions - please comment if it sounds like I'm missing a point. (We have 8gig ram, 12gig database, 3 processor rp5450 and va7100.)

- Is there a way to "dedicate" any of shared memory for SGA?

- Is there a way to show how much shared memory is actually being used by Oracle SGA?

- Suggested ballpark kernel paramater settings for above config?

- Any other comments that will help make me smarter about this general issue?
13 REPLIES 13
eran maor
Honored Contributor

Re: SHMMAX and Oracle SGA

Hi

the easy command to find out about shared memory is shminfo but you need to dowenload this file .

please take a look at this answer :
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1382107d277ad611abdb0090277a778c,00.html

bill hassel has much more exper. on this issue .

also about kernel params , i will take a lot at dbc_max_pct that it will be 5 becuase you have 8 giga memory and i will not recomment that you will need more the 400 m.b for buffer chase.

also look for maxsiz and maxdsiz and maxssiz ( the param for 64 bit !! )

increase the maxdsiz as size of your memory and also increase the maxssiz .

i will also recommend that you will look at oracle site for guide lines .
love computers
T G Manikandan
Honored Contributor
Solution

Re: SHMMAX and Oracle SGA

To find the amount of SGA that the Oracle uses I found out a script which is attached.

make sure that your buffer cache parameter values are not very high
dbc_max_pct bring it down to 5% for the amount of memory you have.
Anthony deRito
Respected Contributor

Re: SHMMAX and Oracle SGA

Keep an eye on the bigger picture... the first thing you need to determine is how much memory your system has. In other words, before you tune your SGA, begin by making sure your OS is able to keep up before it begins to show signs of paging out to swap.... some paging out is normal but you don't wan't to allocate so much memory to your SGA that the virtual memory subsystem begins to page out parts of the SGA from physical memory out to swap. There's more going on with the system than just Oracle processing so it is possible that other processes on the host can cause paging or swapping of the SGA.

Use Glance as the system is implemented to tune for optimal performance. It may take several passes to optimize performance. By the way, this great HP doc explains Glance specs that may help you (if you use Glance).

http://docs.hp.com/hpux/pdf/B3691-90061.pdf

Good luck.

Dave Chamberlin
Trusted Contributor

Re: SHMMAX and Oracle SGA

If you are using 32bit Oracle then the SGA cannot exceed 1.75GB for a single instance. The optimizing of your resources largely depends on the nature of the database. Is it primarily a tranaction database (OLTP) or a data warehouse, etc? If you have a lot of large pl/sql packages you would want to make the shared pool large enough to pin those packages. If you are processing a lot of data, you would want as many block buffers as you can get in the remaining space (take your database block size times the number of block buffers to figure how much RAM this will be). The shared pool size and the number of block buffers are set in the init.ora parameter file and can be changed easily - though you have to restart the instance to take effect. For my database (mostly OLTP), I have set the system buffer cache to be about 300MB using dbc_max_pct. Setting this kernel parameter to the default 50% value is a waste of RAM and will not improve performance. See discussions in this forum on dbc_max_pct. Tuning is an iterative process. Do some more research, start at your best guess and then see where your bottleneck is.
Jim Butler
Valued Contributor

Re: SHMMAX and Oracle SGA

Here is an oracle kernel I use - works well -
Note that dbcmaxpct Times MB RAM should not exceed 128 Mb - so the note above about that should be heeded -

But you can use this as a spare parts kernel.

good luck

dbc_max_pct 35
default_disk_ir 1
max_thread_proc 256
maxdsiz 0x200000000
maxfiles 512
maxssiz 040000000
maxswapchunks 815
maxtsiz 0X0D000000
maxuprc (MAXUSERS*5)
maxusers 64
ncallout 2064
nflocks 1000
nkthread 2048
npty 96
nstrpty 60
semmni 600
semmns 1000
semmnu 256
semume 96
shmmax 0X200000000
shmmni 850
shmseg 400
Man The Bilge Pumps!
Steven E. Protter
Exalted Contributor

Re: SHMMAX and Oracle SGA

Oracle has a utility called Installprep.sh

You need to have added the oracle user, the dba group and have the oracle user be a member of the group.

The utility will check the kernel and give you minimums among other issues.

If you are already running oracle, go to metalink and download the rda utility. That will collect data which you can look at, or upload to metalink.oracle.com

BTW, vastly increase the minimums for shared memory areas, message queues and such, especially if you use other databases such as adabas, which uses the same resources.

Hope this helps.

Steve
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: SHMMAX and Oracle SGA

almost as important as the kernel are patches.

Get the December patch set, install it.

Go to metalink.oracle.com if you have access and get the current patch list for HP-UX

Install them all.

If you are new to HP-UX you might not know you need to put java in seperately for oracle.

go to http://www.hp.com/go/java

There is another patch list on top of everything else that MUST be installed prior to java.

Do it in the wrong order and suffer.

When you are done with patches, then do the kernel. One of the java patches stepped on a nice kernel and has our database very unhappy now.

Summary: learn from my mistakes.

If you lack metalink access, email me at work Thursday and I'll hook you up.

Steve
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: SHMMAX and Oracle SGA

The first question is: Oracle 64bit or 32bit? Very big issues will exist when Oracle runs in 32bit mode. While it is true that the maximum amount of shared memory (for 32bit programs) is 1.75Gb, Oracle must fight with all other processes for even small portions (few hundred megs) of shared memory. There is only one map for the 32bit shared memory and must be shared with memory mapped files, shared libraries and shared memory segments from other programs. Thus, 32bit Oracle will be severely limited in the amount shared memory that it can reliably request. One possible workaround is to use memory windows where each Oracle instance has it's own dedicated shared memory. You'll probably need some pacthes to activate memory windows if the memory window white paper is not found in /usr/share/doc.

For 64bit Oracle, there are no practical limitations (terabytes) for shared memory.


Bill Hassell, sysadmin
Tim Killinger
Regular Advisor

Re: SHMMAX and Oracle SGA

We're using 64 bit UX.

We're moving the application from 64bit OpenVMS, which has a feature whereby you can "reserve" memory, isolating it from the operating system and the potential for paging it.

What I'm wondering if there is such a similar feature in UX so I can generously dedicate a portion of my 8 gig to Oracle to cache as much data as possible.

Thanks to everyone's response so far! I'll close this thread and assign points soon!