Operating System - HP-UX
1753518 Members
5374 Online
108795 Solutions
New Discussion юеВ

Re: Shared Memory 32&64bit

 
Jim Mallett
Honored Contributor

Shared Memory 32&64bit

I know there is a limitation on shared memory for 32 bit applications. I have a server running multiple Oracle databases, some of which are 32bit and some 64bit.

I normally use ipcs -bmop to monitor my shared memory. Is there any way to find out how much shared memory is being used only by 32bit applications? I'm correct in thinking the limit is just under 1G for 32bit shared memory?

Do programs actually grab a certain area of shared memory based on their architecture or is it basically first come first served?

I'm about to start reading the mem_mgmt.txt file, I was just hoping somebody can add to what that has to offer.

Hope everyone is doing well....
Thanks..
Jim Mallett

Hindsight is 20/20
2 REPLIES 2
RAC_1
Honored Contributor

Re: Shared Memory 32&64bit

mem_mgmt has everything that you need to know. For 32 bit apps max. absolute limit is 2GB and that too which are enabled with shared_magic. man chatr for details.

Also there is program shminfo, that gives details about shared memory usage.

Anil
There is no substitute to HARDWORK
Don Morris_1
Honored Contributor

Re: Shared Memory 32&64bit

There's a limit for 32-bit in that you can't have a single segment larger than 1Gb (in practice, it will be somewhat smaller than 1Gb depending on other usage) because segments can't cross quadrant boundaries.

The total space for 32-bit shared memory (without using tricks) is 1.75Gb on PA, 2Gb on IPF (you share this range with memory mapped I/O as well, on PA MMIO has a reserved 256Mb).

Using Memory Windows / shared Q2 will allow a little more for those applications in the same window.

I'm not quite sure what you mean by "grabbing a certain area of shared memory based on their architecture". 32-bit applications have operate in particular Memory Windows (mostly in the Global one, which is the default). Usage of the shared address space within the window is first come, first serve - but the process is still attached to that window even if it uses no shared address space. 64-bit processes use a superset of the Global 32-bit Memory Window (so that they can share with 32-bit applications) and have 64-bit only shared areas that all 64-bit applications are attached to unconditionally.

Regarding ipcs, there's no way to filter this, since the interface ipcs uses doesn't provide enough information to do so. About the only way you could do it (off the top of my head, and assuming you want a commandline type way... Glance may have something to do this already) would be to use pstat to walk every process, look at every virtual object within the process, and build a list of each shared virtual object in the system with the virtual address assigned to it [removing duplicates]. Any shared memory object with a virtual address <4Gb is potentially 32-bit or 64-bit [since either could be attached... if you really, really want to distinguish these you should be able to determine the process type while using pstat], otherwise it is 64-bit only.