Home » Infrastructure » Linux » Number of Semaphore Arrays (Redhat Linux)
Number of Semaphore Arrays [message #298216] Tue, 05 February 2008 06:29
asangapradeep
Messages: 128
Registered: October 2005
Location: UK
Senior Member
Hi,

Can you please tell how the processes parameter relate to number of semaphore arrays being created. I know number of semaphores used would be equal (processes parameter + some more) but what i don't understand is how the number of semaphore arrays are calculated in Redhat Enterprise Linux.

Current system SEM limiting values are

Quote:

kernel.sem = 250 32000 100 128



Following is what i did.

Quote:

SQL> alter system set processes=999 scope=spfile;


and then restarted the instance and checked number of semaphore arrays being used.

Quote:

[oracle@oracle ~]$ ipcs -su

------ Semaphore Status --------
used arrays = 5
allocated semaphores = 1250

[oracle@oracle ~]$ ipcs -s

------ Semaphore Arrays --------
key semid owner perms nsems
0x2420b17c 4292608 oracle 640 250
0x2420b17d 4325377 oracle 640 250
0x2420b17e 4358146 oracle 640 250
0x2420b17f 4390915 oracle 640 250
0x2420b180 4423684 oracle 640 250



Then increased processes parameter by 1

Quote:
SQL> alter system set processes=1000 scope=spfile;


checked number of arrrays

Quote:

[oracle@oracle ~]$ ipcs -su

------ Semaphore Status --------
used arrays = 9
allocated semaphores = 1125

[oracle@oracle ~]$ ipcs -s

------ Semaphore Arrays --------
key semid owner perms nsems
0x2420b17c 4554752 oracle 640 125
0x2420b17d 4587521 oracle 640 125
0x2420b17e 4620290 oracle 640 125
0x2420b17f 4653059 oracle 640 125
0x2420b180 4685828 oracle 640 125
0x2420b181 4718597 oracle 640 125
0x2420b182 4751366 oracle 640 125
0x2420b183 4784135 oracle 640 125
0x2420b184 4816904 oracle 640 125




As you can see number of arrays is increased to 9 and number of semaphores taken from a set is reduced to 125 from the previous 5 and 250 respectively.

From kernal parameters you can see a set can have 250 semaphores and 5 X 250 would have easily satisfied the 1000 processes requirement.

It seems semaphore arrays are alwasy created in odd numbers. what I don't know is how this calculation for number of semaphore arrays and number of semaphore for set is made.

Any explanation, link having an explanation is appriciated.

Thank you.
Previous Topic: Compatibility Issues
Next Topic: OCI Error: ORA-01031: insufficient privileges
Goto Forum:
  


Current Time: Fri Mar 29 03:57:37 CDT 2024