1752782 Members
5812 Online
108789 Solutions
New Discussion юеВ

Tuning shmmax setting

 
Yeo Khian Wei
Occasional Advisor

Tuning shmmax setting

Hi
Currently I have the following problem:
/usr/lib/dld.sl: Call to mmap() failed -TEXT /prodexe/ora/8.0.6/lib/librw60.sl
/usr/lib/dld.sl: Not enough space

However this error does not crop up everytime a report is being run.

I understand that I will need to tune the shmmax setting and rebuild the kernel to rectify the error. However I'm not sure as to what settings I should set the shmmax to be. Currently the settings is as follows:

HP UX 11.0
Memory 8Gb
Shmmax 0X80000000
Database Oracle 8.1.7.3
SGA size 1637219348 Bytes

The problem starts to arise when I'm testing the RMAN on the same server. However the RMAN resides in another database. Could this testing have any effect? Thanks!
12 REPLIES 12
John Payne_2
Honored Contributor

Re: Tuning shmmax setting

Oracle always recommends that shmmax be set to the maximum available memory. Every time the DBA's say this to me, my reply is: "Yeah, right!" I usually leave it set to what you have and tell the DBA's to let me know if they ever plan to create a DB with an SGA over 2GB. (This hasn't happened yet...)

0x80000000 (hex) = 2147483648 (Decimal). This would cover the database you indicate has an SGA of 1.6 GB. Does the other DB have a gigantic SGA? (Over 2GB?) We keep all Rman stuff on a totally separate machine...

Hope it helps

John
Spoon!!!!
malay boy
Trusted Contributor

Re: Tuning shmmax setting

According to Oracle 8i Installation Guide the shmmax should be 1G.
Here are the setting from my server:shmmax=0X40000000.
In SAM (Kernel COnfiguration->Configurable Parameter) , you can see the actual value for shmmax.


Your setting are 2G which are more than enough.

One question,haow you get below error?.
/usr/lib/dld.sl: Call to mmap() failed -TEXT /prodexe/ora/8.0.6/lib/librw60.sl
/usr/lib/dld.sl: Not enough space


Is it when starting up listener ?.

regards
mB
There are three person in my team-Me ,myself and I.
Steven E. Protter
Exalted Contributor

Re: Tuning shmmax setting

Oracle is not very good at tuning HP-UX boxes. I've got kmtune data from actual Oracle owned HP-UX boxes to prove that, though our service agreement with Oracle compels me not to just post that up.

To pick a reasonable shmmax figure, take the following steps.

Add physical memory to swap for total memory.

Set shmmax to about one quarter of the total memory. If you have 8 G of real ram and 8 G if swap, shmmax should not be higher than 4 Gigabytes.

Due to HP-UX's architecture(A Clay or Bill Hassel can explain better) you're never going to get more than one quarter of total memory to shmmax anyway.

I'm attaching a performance data collection script that will show you where the actual problems if any are with your kernel parameters.

Also, take a look at the ipcs command. Then shut off oracle and make sure all those memory segments get cleared and aren't locked or corrupt. ipcrm -s or ipcrm -m removes shared memory areas.

If two oracle instances have the same shared memory keys, they will clobber each other, but I don't think that can be manually set in Oracle.

If this thread is still open when I get to work Tuesday, I'll link in a great peformance document. I've just been through Oracle tuning with HP's best Oracle tuning expert.

SEP
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
Animesh Chakraborty
Honored Contributor

Re: Tuning shmmax setting

Hi,
I want to share following information with you.

The shmmax 'Single shared memory segment' is limited to 1 GB (0x40000000)
on a 32-bit HP-UX 11.0 system. When running under the 64-bit operating
system, shmmax is limited to 1 TB (0x10000000000).

The maximum shared memory accessible (all segments/quadrants) is limited
to 2.75 GB on 32-bit, and 4 TB on 64-bit HP-UX systems. SAM's (System
Administration Manager) online help incorrectly states that the shmmax
maximum value is 1.75 GB (0x70000000).

To check hpux bit
#/usr/bin/getconf KERNEL_BITS
Did you take a backup?
Bill Hassell
Honored Contributor

Re: Tuning shmmax setting

shmmax is just a fence. You can set it to the largest value possible and it won't usually help your Oracle problem. As has been mentioned many times here in the forums, shared memory for 32bit prograns is severely constrained. The basic limit is about 950megs, but with SHARE_MAGIC executables, the total can be up to 1750megs, but almost never reachable. Oracle requests additional SGA memory in 1Gb chunks, but there is one default shared memory map shared by memory mapped files, shared libraries as well as shared memory.

Thus, memory fragmentation can occur and there may be no available chunk of memory larger than a few hundred megs. Your DBAs need to read the white papers on memory management and process management found in /usr/share/doc. You'll also need the shared memory map utility called shminfo found at: ftp://contrib:9unsupp8@hprc.external.hp.com/sysadmin/programs/shminfo/

(note that IExploder has problems with ftp sites--turn off Folder View in Advanced Internet options)

The problems occur because the 32bit processes are competing for a very small chunk of RAM (your 8Gb of RAM is meaningless to 32bit programs). The solution is to isolate each Oracle instance from the other users of shared memory through the use of memory windows, or avoid the problem completely with 64bit Oracle.


Bill Hassell, sysadmin
Michael Tully
Honored Contributor

Re: Tuning shmmax setting


Further to John's reply, if your using HPUX 11i you can increase the value of shmmax online without a reboot.
The kmtune man pages shows you how. The parameter could easily be doubled without causing problems.

# kmtune -s shmmax=4294967296
# kmtune -u (updates the kernel)

Regards
Michael
"When I have trouble spelling, it's called fat finger syndrome"

Anyone for a Mutiny ?
T G Manikandan
Honored Contributor

Re: Tuning shmmax setting

shmmax is the upper limit and does not really allocate any resource until there is a need.
The need to put them on some limit is that some process should not run away from eating all memory.
THe memory resource is allocated uptil that upper limit mark.
So there is no problem settings up a high value for shmmmax.
I am not sure like how much would really provide good results but I would recommend not only tune your shmmax settings but also

maxssiz(for 32 bit oracle)
maxdsiz
maxtsiz

for 64 bit oracle
maxdsiz_64
maxtsiz_64
maxssiz_64
to some extent.

Because the the not enough spsace would arise because of

1.Less available memory to the process
2.Low shmmax value
3.Low values of maxtsiz,maxssiz,maxdsiz.

Revert
Steven E. Protter
Exalted Contributor

Re: Tuning shmmax setting

Performance Tuning doc

http://www1.itrc.hp.com/service/cki/search.do?category=c0&docType=Security&docType=Patch&docType=EngineerNotes&docType=BugReports&docType=Hardware&docType=ReferenceMaterials&docType=ThirdParty&searchString=UPERFKBAN00000726&mode=id&admit=-682735245+1053636168960+28353475&searchCrit=allwords&printable=true

Hope it helps, I think its a great doc and the author is pretty cool too.

SEP
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
Yeo Khian Wei
Occasional Advisor

Re: Tuning shmmax setting

Hi

Thanks for all the info. My other DB has only 30MB of SGA, after this problem crop up we downsize the SGA to 24MB. Still the problem persists. Yesterday when 1 of the consultant was trying to launch RMAN, it gave the same error.
Now this has led me to think whether is there a bug associating with RMAN and HP UX systems. I believe that my Shmmax setting is adequately enough to cover both SGAs. Is there any issue pertaining RMAN and HP UX machines?