1820040 Members
3271 Online
109608 Solutions
New Discussion юеВ

Re: SHMMAX

 
SOLVED
Go to solution
Eduardo_63
Advisor

SHMMAX

Hi fiends,
I've the parameters in HP-UX 11i:
SHMMX=0x4000000
SHMSEG=32
SHMMNI=512

These determine the maximum of the memory to use ?
How calculate the max memory available ?

Thanks,
3 REPLIES 3
Mel Burslan
Honored Contributor

Re: SHMMAX

your question is very obscure. What do you mean by memory available to use ? These parameters are only related to shared memory segments not to the memory but again this may be all you ar einterested in. Please provide more details.
________________________________
UNIX because I majored in cryptology...
Eduardo_63
Advisor

Re: SHMMAX

WE have an program that use 2GB of memory.
Bill Hassell
Honored Contributor
Solution

Re: SHMMAX

SHMMX=0x4000000 means the largest shared memory segment will be limited to 67 megs. You must increase this value in the kernel.

SHMSEG=32 menas that a single program can open up to 32 different shared memory segments.


SHMMNI=512 means you can have up to 512 separate shared memory segments created (system wide).

Since you have a program that wants 2Gb, the first question is: is this a single shared memory segment? If so, your program will always fail if it is a 32bit program. The largest shared memory address space is just over 900megs, or with special compiler options, possibly 1700megs. But a 32bit program must share the same address space with all other programs and includes other shared memory segments, memory mapped files and other IPC (Inter-Process Communication) entries. After a while, this map will become fragmented so your program will have to be re-written to ask for smaller segments.

There is no simple way to avoid these limitations with 32bit programs. If you recompile ytour program as a 64bit program, all these limitations go away. Of course, related programs that share this area must also be recompiled as 64bit programs.


Bill Hassell, sysadmin