1832548 Members
5291 Online
110043 Solutions
New Discussion

Re: shmmax calculation

 
SOLVED
Go to solution
Ridzuan Zakaria
Frequent Advisor

shmmax calculation

Hello,

How big is my shmmax if the value is 0x4000000?

How do I convert it to Mbytes?

Thanks.
quest for perfections
10 REPLIES 10
James R. Ferguson
Acclaimed Contributor
Solution

Re: shmmax calculation

Hi:

One way is with 'bc':

echo "ibase=16;4000000;obase=10"|bc

This will convert base-16 input to base-10 output.

BTW, a megabyte = (1024*1024) bytes.

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: shmmax calculation

Hi (again):

BTW, 0x4000000 is the maximum shared memory segment size (in bytes) for a 32-bit kernel.

Regards!

...JRF...
James Murtagh
Honored Contributor

Re: shmmax calculation

Hi,

Another way is with adb:

# echo 0x4000000=D | adb

This will give the answer in bytes. You will see it is 67108864, or ~64MB.

Regards,

James.
Con O'Kelly
Honored Contributor

Re: shmmax calculation

Hi

I also use the Windows calculator!!
Select View -> Scientific.
Select Hex, type in the hex number, then select decimal.
So for your shmmax this gives 67108864 bytes (64MB).
As JRF said this is the maximum shared memory segment size, so if you're installing Oracle you'll need to increase it!

Cheers
Con
Steven E. Protter
Exalted Contributor

Re: shmmax calculation

If you are changing this value, know this little rule.

Your system will ignore any shmmax setting greater than 25% of available memory.

Memory is defined as physical memory PLUS swap.

swapinfo -tam

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
CG UNIX SysAdmin
New Member

Re: shmmax calculation

I'm curious where you came up with the "little rule" that "...Your system will ignore any shmmax setting greater than 25% of available memory...."?

According to the HP documentation availble to me,
http://docs.hp.com/hpux/onlinedocs/939/KCParms/KCparam.ShMmax.html

"shmmax...The value used cannot exceed maximum available swap space..."

and there is no mention that I can find about the system ignoring anything, however "...Any shmget() system call that requests a segment larger than this limit returns an error (see HP-UX Reference entry shmget(2))."

Is there some updated documentation we can refer to?

Thanks.

Carl Muellner
cpm@capgroup.com
Alzhy
Honored Contributor

Re: shmmax calculation

This equates to 67108864 bytes (~ 64 Megs.) As the other have stated -- there are a million ways to convert this.

A word about SHHMAX -- if you're running 32-bit Oracle or apps, set this to 4GB (or 0x100000000). For 64-bit Oracle - ask your DBA -- will there ever be a SGA size greater than 4GB? If there is then set it to whatever likely the biggest SGA or SHM reqs there could be. Ideally, Oracle SGA or apps SHM reqs. must FIT in one SHM segment for a server to perform optimally....

HTH.
Hakuna Matata.
Alzhy
Honored Contributor

Re: shmmax calculation

This equates to 67108864 bytes (~ 64 Megs.) As the others have stated -- there are a million ways to convert this.

A word about SHHMAX -- if you're running 32-bit Oracle or apps, set this to 4GB (or 0x100000000). For 64-bit Oracle - ask your DBA -- will there ever be a SGA size greater than 4GB? If there is then set it to whatever likely the biggest SGA or SHM reqs there could be. Ideally, Oracle SGA or apps SHM reqs. must FIT in one SHM segment for a server to perform optimally....

HTH.
Hakuna Matata.
patrick_119
Advisor

Re: shmmax calculation

was just going thru the document from oracle for Ora Apps 11i {11.5.9] on HP UX 11i. They say that the param SHMMAX should be equal to available physical memory, large enough to hold the entire SGA in one shared memory segment. a lower value will result in spreading the SGA over several segments which will cause performance degradation.
RAC_1
Honored Contributor

Re: shmmax calculation

As all gurus have put, by now you must have learned how to convery hex value to decimal.

Another command for that

printf "%d\n" 0x4000000


Now to the oracle part. If your server is running only that, and you need not woorl abt anything else, I would try to max memory setting for shmmax. I will also try setting shmmax to that of oracle sga.

Not e you have limitationm of 1.7 gb for 32 bit oracle.
There is no substitute to HARDWORK