Operating System - HP-UX
1834512 Members
2668 Online
110068 Solutions
New Discussion

shmmax what should i set ?

 
SOLVED
Go to solution
boomer_2
Super Advisor

shmmax what should i set ?

Hi guys,
I have 24 databases running on my rx4640 server with hpux 11i v2 IA-64 with 2 cpu's
the current shmmax set is 100000000.
One SGA size is set to 378 MB.
My system is swapping...
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16000 2579 13421 16% 0 - 1 /dev/vg00/lvol2
dev 16000 2570 13430 16% 0 - 1 /dev/vg00/lvol12
reserve - 15219 -15219
memory 8180 2025 6155 25%
total 40180 22393 17787 56% - 0 -

What should i set shmmax to ?
Since im not able to run my glanceplus pack too bcoz of this..kindly let me know asap...
9 REPLIES 9
Sundar_7
Honored Contributor

Re: shmmax what should i set ?

Boomer,

shmmax sets the max size of a single shared memory segment in the system.

Setting shmmax to a higher value perse will not cause paging. 24 database is indeed a big number for any system.

If it were me, I would work with the DBA to tune the SGA size of each of the database instance.

Also check your dbc_min_pct and dbc_max_pct. If they were at the default, they hog about 50% of the physical memory for buffering.

Sundar.
Learn What to do ,How to do and more importantly When to do ?
Rita C Workman
Honored Contributor

Re: shmmax what should i set ?

How much memory is on the box.....you don't mention that.

..used to hear to just set up x% above what you need, but then it seems to me the last time I went to a Stephen Cuillo discussion he said open it up. So I did...
I like to hold just a little back, but I opened up this parm to take advantage of the memory inside.

But you should really look at all your parms and not just this one.....could be you need to tweek a couple.

Just a thought,
Rgrds,
Rita
Court Campbell
Honored Contributor

Re: shmmax what should i set ?

Some one will always disagree with me, but you should set shmmax about .5 to 1 gig larger than the largest sga you have. this allows each sga to fit in a single shared memory segment. But this will not fix our swapping issue. You likely need more ram or you need to change your dbc_max_pct and dbc_min_pct to lower values.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
A. Clay Stephenson
Acclaimed Contributor

Re: shmmax what should i set ?

The right size, of course. There is no possible way to answer your question given the amount of data that you are supplying. A shmmax setting of 10^8 is normally considered very small. You should note that shmmax simply limits the size of any 1 segment and a process can attach many segments. In your case, with a setting of 100MB, a process would have to divide its 378MB SGA into 4 segments. It would help to know what you are trying to accomplish. If the answer is significantly better performance then you are looking in the wrong place. While sizing a single shm segment to accomodate the entire largest SGA is a good idea (so for you the answer would be ~ shmmax = 400MiB), in your case, because you are swapping, more smaller shm segments might actually be better.


I think the real answer to the question that you should be asking is to add more memory and/or reduce the load.
If it ain't broke, I can fix that.
boomer_2
Super Advisor

Re: shmmax what should i set ?

# kctune|grep db
dbc_max_pct 4 4 Immed
dbc_min_pct 2 2 Immed

Do i need to buy more RAM or more CPU...?
My dba says that our number of databses r going to increase in future....and each databse id using 378 MB...
Court Campbell
Honored Contributor
Solution

Re: shmmax what should i set ?

I'd definitely start with more ram.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Hein van den Heuvel
Honored Contributor

Re: shmmax what should i set ?

>> What should i set shmmax to ?
:
>> each databse id using 378 MB...

512MB

You have to realize that each instance will grab those 378, no matter what size you set shmmax to, so you might as well make it as easy as possible, allowing for 1 chunk.

Is this the same system as in:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1113070

So there is 8GB physical memory?
So every bank is a DB instance?

24*378 = 9GB... without connections.
So those systems need more physical memory.
They are likeley to need more CPU horses real soon

It seems 'odd' that 378 MG SGA is 'the right size' for every DB on the box, but it is possible.

You want to work closely with your DBA to trim each SGA component down.

For example it is customary to bump the REDOLOG BUFFER from a few hundred KB in the multiple MB zone 'just in case'. But here you want to squeeze it down to say 512KB or 256KB to conserve memmory as it is unlikely to influence the final performance. Tweak down the JAVA pool and so on.

If need be, get an independent consult to help in the space between DBA and Sys Admin.

Regards,
Hein van den Heuvel ( at gmail dot com)
Hvdh Performance Consulting
Court Campbell
Honored Contributor

Re: shmmax what should i set ?

Boomer, memory is cheap. Fill that bad boy up with all the memory it can hold. 128Gb sounds great.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
A. Clay Stephenson
Acclaimed Contributor

Re: shmmax what should i set ?

Once again, you are not even asking the right questions. When you say you can't run Glance then you definitely are shooting in the dark. For example, it's even possible (though I doubt it) that your present machine and tuning is perfectly suited to its task. Your real problem may be ton's of dead processes that once allocated shared memory. You may have applications with huge memory leaks or very inefficient code.

You really need some help in deciding the correct hardware and tunings. The answer might not even be HP-UX; it might be a herd of Linux servers; the answer could be HP-UX. I don't mean to insult you but if you aren't able to ask the right questions then how will you know the meanings of the answers? Your first task should be to sit down with your DBA's and management and determine what your future growth looks like. You then get some reliable metrics of your present configuration and then it should be possible to begin to analyze your situation. You also need to decide what your company would consider a reasonable level of performance.

An independent consultant might be a rather good idea.
If it ain't broke, I can fix that.