Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

HPUX error 12 - Not enough space

SOLVED
Go to solution
Anthony Hill
Occasional Advisor

HPUX error 12 - Not enough space

Hello,

I have an N-Class HP-UX 11 64-bit server with 3Gb memory. When the Oracle SGA was recently increased from <1Gb to >1Gb I received the following error message in my Oracle logs:

SVRMGR> ORA-07306:sms1sg: shmget error, unable to get a shared memory segment.
HP-UX Error: 12: Not enough space.

The Oracle instance then failed to start. What is an Error 12 or where can I look to find it out for myself.


Thanks in advance,
Anthony.
Blood is thicker than water... and it tastes better too!
14 REPLIES
A. Clay Stephenson
Acclaimed Contributor

Re: HPUX error 12 - Not enough space

Hi:

Check in /usr/include/sys/errno.h; errno 12 is ENOMEM; you need to increase maxdsiz (maxdsiz_64bit for 64-bit apps). You also need to check shmmax.
If it ain't broke, I can fix that.
eran maor
Honored Contributor

Re: HPUX error 12 - Not enough space

Hi

it is clear that the problem is with the memory but you didnt send any more that like your params or your swap config .

i will advise you to change the params :
maxdsiz
you can increase it by * 2 .

also check to see what is the state of your swap , the swap shuold be * 2 the size of the memory .

if you computer is not ! an nfs server change the dbc_max_pct to 10
and the dbc_min_pct to 5 to increase the memory usage in your computer .

if you want to read on this params check this link : http://docs.hp.com//hpux/onlinedocs/os/KCparams.OverviewAll.html
love computers
S.K. Chan
Honored Contributor

Re: HPUX error 12 - Not enough space

From my experience, HP-UX Error 12 usually indicate that you need more swap space. Increase or add additional device swap and see what happens.

hope this helps ..
James R. Ferguson
Acclaimed Contributor

Re: HPUX error 12 - Not enough space

Hi Anthony:

Error-12 points to 'maxdsiz' or swap. Don't forget to look at your swap utilization:

# swapinfo -tam

Regards!

...JRF...
Robin Wakefield
Honored Contributor

Re: HPUX error 12 - Not enough space

Hi Anthony,

Sys 12 error:

During execution of an exec routine, a program asked for more space than the system was able to supply. The error may also occur if the arrangement of text, data, and stack segments requires too many segmentation registers, or if there is not enough swap space during execution of the fork routine.

Rgds, Robin.
Anthony Hill
Occasional Advisor

Re: HPUX error 12 - Not enough space

Where can I find what maxdsiz is set to at the moment?

We currently have 9Gb of swap. shmmax is currently set to 17Gb. If If the memory is 3Gb and swap is 9Gb, should shmmax not be set to 12Gb?


Thanks Again,
Anthony.
Blood is thicker than water... and it tastes better too!
harry d brown jr
Honored Contributor

Re: HPUX error 12 - Not enough space

gointo SAM, select kernel, select configurable params, scroll down till you get to it.

live free or die
harry
Live Free or Die
A. Clay Stephenson
Acclaimed Contributor

Re: HPUX error 12 - Not enough space

Hi Anthony:

Yoy can simply do a sysdef command. You can also go to SAM->Kernel Configuration->Configurable Parameters to see a fgew more that sysdef does not display plus some online help.

As for setting SHMMAX, it should be far less than even your 12GB; there has to be something leftover for programs, OS, data, and other such trivial things. Remember, if you have 12GB as shared memory (or even 9GB) you would be swapping like a madman. Reduce it to something like 2GB.
If it ain't broke, I can fix that.
Anthony Hill
Occasional Advisor

Re: HPUX error 12 - Not enough space

These are the current settings:
maxdsiz = 67108864
maxdsiz_64bit = 1073741824
shmmax = 17179869184

Should maxdsiz_64bit be increased or maxdsiz?


Anthony
Blood is thicker than water... and it tastes better too!
James R. Ferguson
Acclaimed Contributor

Re: HPUX error 12 - Not enough space

Hi Anthony:

'maxdsiz' is for 32-bit processes. 'maxdsiz64' is for 64-bit processes. See here for min, max and defaults:

http://docs.hp.com/hpux/onlinedocs/os/KCparam.MaxDsiz.html

Regards!

...JRF...
Anthony Hill
Occasional Advisor

Re: HPUX error 12 - Not enough space

Looking at the shmmax setting on 3 of our other machines they are also set to 17179869184.

Is this some kind of default value? If so, what effects could lowering it's value so dramatically have on the system?


Thanks Again,
Anthony.
Blood is thicker than water... and it tastes better too!
Andreas D. Skjervold
Honored Contributor
Solution

Re: HPUX error 12 - Not enough space

Hi

Just want to say something about SHMMAX.

On Oracle systems this value is usually set to amount of physical memory. This value sets the larges allowable shared memory SEGMENT.

If Oracle instance requests a shared memory segment less than SHMMAX, the segment will be less (ie the requested size) if requested larger, you'll just get more segments.

In numbers:

If SHMMAX is set to 1 GB, and your SGA is 500MB, the shared memory segment is 500MB.
If your SGA is infact 2 GB, you will get 2 memory segments 1GB each. This requires more of SHMMNI and possibly som other resources as well (don't have my book at the moment), but your SGA and Oracle still works fine.

Setting SHMMAX to a value even bigger than physical mamory will not give any effect.

The main point is that your SGA sizes makes up the size of shared memory that is used, and should not exceed the amount of physical memory (if the SGA begins to page out, you're in trouble)

And because of the fact that the SGA must not page out, the swap that is set up is infact useless (not if you're running other applications at the same time) and that's a waste of diskspace if you have a multigigabyte memory server.
What can be done is to disable swap (don't have the setting; my notebook again!), but you should have fairly good control over your processes use of memory before doing this.

Sybase, on the other hand, grabs the total amount of shared memory set in SHMMAX! This has got many sysadmins (me!) into trouble when attempting to setup both Oracle and Sybase on the same system. Then you infact have to set the SHMMAX as low as the value Sybase needs, and thus ending up with the Oracle SGA quite fragmented. But it works!

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Scott Keller
Occasional Visitor

Re: HPUX error 12 - Not enough space

I found this same error in a database we have that is still using Oracle 7. A ps -ef|grep ora revealed some leftover processes running from before the shutdown. When I killed them, the startup ran fine.
Bill Hassell
Honored Contributor

Re: HPUX error 12 - Not enough space

You didn't indicate your version of Oracle. If the version is only a 32bit version, shared memory is extremely limited (less than 1Gb without changing the Oracle executables). Another problem with 32bit shared memory is that it is a shared resource with other programs so it can be fragmented, especially if programs are improperly shutdown (such as kill -9).

To see the layout (and fragmentation) of shared memory, you can download shminfo from:

ftp://contrib:9unsupp8@hprc.external.hp.com/sysadmin/programs/shminfo/

Also use: ipcs -bmop
to look at the current segments. If a process was killed improperly, all shared memory segments created by that process will not be returned to the free memory area and cannot be reused (reboot required unless you are very knowledgeable about each segment).

Now 3Gb is a fairly small amount of RAM. Oracle can perform very well when SGA is large (depending on the number of users and activities) but 3Gb total RAM will reverse the advantage of a large SGA. Make sure that you turn off the dynamic buffer cache by setting the kernel parameter bufpages to something between 102400 and 204800 (400 to 800 megs). That will free up some memory for you.

You can add a lot more swap if Oracle is a 64bit version, but page out (swapping) is a severe performance impact, as much as 50:1 to 100:1 slowdown. If you have a 64bit version of Oracle, I would increase RAM to 6Gb.


Bill Hassell, sysadmin