Operating System - HP-UX
1834645 Members
2609 Online
110069 Solutions
New Discussion

Re: What side effect if I use "chatr +q3 enable a.out"?

 
SOLVED
Go to solution
Takeshi Sugai
Advisor

What side effect if I use "chatr +q3 enable a.out"?

Does anyone know that what side effect if I use "chatr +q3 enable a.out" for 32 bit API on HP-UX 11.0(64 bits)?

I believe that it is no side effect.

I would like to know what kind of side effect might be happening.
Or what kind of influence to the kernel.

Any tips would be apprecaited.
9 REPLIES 9
Stefan Farrelly
Honored Contributor

Re: What side effect if I use "chatr +q3 enable a.out"?


chatr +q3 enable ? This command doesnt work; illegal option +q3
Im from Palmerston North, New Zealand, but somehow ended up in London...
Alan Riggs
Honored Contributor

Re: What side effect if I use "chatr +q3 enable a.out"?

Are you referring to the workaround used to enable systems to exceed the 1.75GB shared memory limit? If so, it is quadrant 2 that you enable for shared memory, not quadrant 3.

Anyway, what you want to do is use SHMEM_MAGIC instead of EXEC_MAGIC. There are 2 ways to do that: link your program with SHMEM_MAGIC in the first place, or do a chatr on the executable. The chatr you want is:

chatr -M a.out
Takeshi Sugai
Advisor

Re: What side effect if I use "chatr +q3 enable a.out"?

Hi, Stefan, Alex,

I am asking what side effect if I increase the data size using chatr command on 32 bit API on HP-UX 11.0 with ACE with 99/11. Please take a look at the following page:
http://docs.hp.com:80/dynaweb/hpux11/hpuxen1a/b2430/@Generic__BookView?DwebQuery=maxdsiz

Accroding the page, the manual said:

Starting with HP-UX 11.0
ACE 9911, the maximum private data space is 2 GB and 3 GB
respectively.

To enable this feature, execute:

chatr +q3p enable a.out

q3p stands for "quadrant 3 private". To disable this feature, execute:

chatr +q3p disable a.out

My qestion is whether any big impact is or not on the kernel if I use chatr.
Thanks any help...
Stefan Farrelly
Honored Contributor

Re: What side effect if I use "chatr +q3 enable a.out"?

Hi Takeshi,

your dead right, using chatr +q3p enable your allowing the binary you run it on to allocate another 1 Gb of data space. Ive tested it on one of our servers/binaries, works fine. I dont see any problem with you doing this as long as you follow the provisos listed;
1. Do youhave enough swapspace to cater for this extra 1Gb ? ie. if your current swap is only 2GB then you will need another 1Gb of swapspace in order to allow your binary to expand by up to another 1Gb in memory.
2. Is maxdsiz set high enough in the current kernel ? same thing, if you intend for your binary to expand up to the 4Gb limit now then maxdsiz needs to be at least 3Gb.
3. Your program can now use another 1Gb of Ram, do you have enough free Ram for this to happen ? If your current free memory is say only 250Mb then allowing your binary to use another 1Gb will affect the performance of your server as the remaining 256Mb is used and then 750Mb of other programs will be swapped out to allow your program to expand. This could have a significant performance impact on your server.

I note with chatr there is also a fourth quadrant available which you can enable with chatr +q4p enable. Does this increase the private data space by an additional 1Gb??
I shall investigate.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Stefan Farrelly
Honored Contributor

Re: What side effect if I use "chatr +q3 enable a.out"?

Hi Takeshi,

Ive found some more info. Firstly the 4th quadrant allows an additional 0.75Gb of private data space to be allocated, but Im not sure its usable. This topic is very complicated.

To enable +q3p to work properly on your system you need a lot of patches;

PHKL_20226
The other 7 patches necessary to enable this feature are PHKL_20222, PHKL_20223, PHKL_20224, PHKL_20225, PHKL_20227, PHKL_20228 and PHKL_20229. Each patch may be installed independently of the others - if enabling the 3 Gb private address space feature is not desired. If fewer than all 8 patches are installed, the 3 Gb private address space feature will not be enabled. The code in this patch that is part of this feature will not have any impact on the system until all 8 patches are installed.

Im from Palmerston North, New Zealand, but somehow ended up in London...
Takeshi Sugai
Advisor

Re: What side effect if I use "chatr +q3 enable a.out"?

Hi, Stefan.

1. I have enough swapspace, say 11 GB.
2. Our maxdsiz is now 2GB, I think that it is OK that "chatr +q3p enable a.out " increase 2GB on data area.
3. I have enough free Ram for this, say 3GNB.

From your test case point of view, I understand that the 4th quadrant allows an additional 0.75Gb of private data space. But our case is not necessary to increase more 0,75 GB on 4th quadrant,
Again 2 GB ( 2th quadrant + 3th quadrants) is enough.
If I use "chatr +q4p enable a.out", our process might to be stoped, because it cannot utilize share memory(4th quadrants).

Big question to Stefan is that is it true that I need PHKL_20226 patch in order to use "chatr +q3p enable a.out"?

I believe that only ACE 99/11 is enough to do that.

Thank you for any help...


Stefan Farrelly
Honored Contributor
Solution

Re: What side effect if I use "chatr +q3 enable a.out"?

Hi Takeshi,

4th quadrant is for shared libraries anyway so user programs cant use it.

Now, the later OS install CD's all come with the ACE bundle built into them (if it has the ACE logo on the CD). Ive got some newly installed 11 servers here from a CD with the ACE logo on it and im missing a few of the 8 patches listed above as necessary for enabling the 3rd quadrant. I pulled straight from HP that list of 8 patches needed so I think you need to ensure all are installed. Do a swlist -l fileset | grep PH >/tmp/tt and then grep for each patch from /tmp/tt to ensure you have them all.

Heres the link to the HP webpage listing them; (go down to 20225)

http://europe-support2.external.hp.com/cki/bin/doc.pl/sid=c0056c760dcad795a8/screen=ckiDisplayDocument?docId=200000049419732
Im from Palmerston North, New Zealand, but somehow ended up in London...
Mike Stroyan
Honored Contributor

Re: What side effect if I use "chatr +q3 enable a.out"?

Using chatr +q3 will prevent a process from accessing shared memory that was created in the third quadrant. If you have an application that needs to attach shared memory created by other processes, then you need to make all of the processes chatr +q3 to make them always allocate shared memory in the fourth quadrant. There is also a flag that you can set in mmap or shmget calls to make them use the fourth quadrant. Unfortunately, those flags did not get into the 11.0 header files yet. :-(
sys/ipc.h:/* #define IPC_GLOBAL 0020000 */
sys/mman.h:#define MAP_GLOBAL 0x800 /* map segment globally(4th quardrant */

This caused a problem with using 3D graphics libraries and +q3p prior to the June 2000 3D graphics update.
=======================================================================
Takeshi Sugai
Advisor

Re: What side effect if I use "chatr +q3 enable a.out"?

Hi, Stefan,
Our machine includes PHKL_20226,PHKL_20222, PHKL_20223, PHKL_20224, PHKL_20225, PHKL_20227, PHKL_20228 and PHKL_20229.
I think that new HP-UX 11.0 include the above patch.

Mike,
I do not have our application that needs to attach shared memory created by other processes. So it does not cause.

Does anyone consider any side effect?
Any tips would be appreciated.