Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Configuring PID recycle pool on AIX

Posted on 2010-08-18
Medium Priority
Last Modified: 2013-11-17
We have a number of client sites running a custom application against our database, each with 500+ users. The database has associated with it a number of dedicated daemon processes, one of which is responsible for "cleaning up" any processes that exit unexpectedly, occasionally leaving record locks and shared memory which could compromise database integrity. The client's application typically launches many short-lived processes. As a result it is possible for a process to exit and before the daemon has a chance to detect and clean it up, the OS has re-assigned the PID to another process. Needless to say this can cause all manner of problems to the daemon and at its worst, force the daemon to exit and require a database shutdown.

We cannot reduce the sleep time of the daemon any further. The client has gone to 7-digit PIDs anticipating that this will increase the size of the PID pool available to it and hence reduce the chance of the problem arising, but this does not appear to have an basis since the problem still recurs from time to time.

Is there some way to configure the kernel to either:
1) increase the pool size? (there is a pool of PIDs isn't there?)
2) specify some delay period before the PID is re-used?
3) some other way to prevent the situation arising?

Many thanks in advance!

Question by:UnifySupport
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 68

Assisted Solution

woolmilkporc earned 2000 total points
ID: 33473084
I guess your database is Universe?
If so, going to 7-digit PIDs is a mandatory approach. Are you sure that this configuration is actually in effect?
In AIX the PID assignment is somewhat unpredictable, to avoid creating a covert channel (allowing for conclusion on the OS by analyzing the sequence of PIDs used).
AIX PIDs are a combination of the PSLOT number (which can be reused immediately) and a Generation Count (max. 4096 afaik) which should prevent PIDs from being reused too rapidly. AIX PIDs are always even (except for 1, "init").
There is no "pool" of PIDs. You can't influence the creating or reusing of PIDs in AIX.
Did you talk to your database provider? I think there is nothing you can do on the AIX side.

Author Comment

ID: 33473569
It's actually a Unify database, I am a support engineer for Unify Corporation and the client has implemented 7-digit PIDs. However, I do not know whether they have max'd the generation count. I remember in a recent googling odyssey seeing PLSOT mentioned - there was also a second configuration variable involved but its name escapes me at the moment and I forgot to bookmark the site :(

Can you please tell me how I can determine what the generation count would be? I'm also guessing that 4096 (which does seem to ring a bell as the maximum value which can be ascribed) is not the default setting - yes?

LVL 68

Accepted Solution

woolmilkporc earned 2000 total points
ID: 33473830
4096 for Generation Count seems unchangeable. At least I have no idea at all where this could be done. If it were a tunable value it should appear with  "schedo -a" ("schedo -F -a" in AIX 6) or should be referenced by an environment variable. Both is not the case, as far as I can see.
This is the appropriate reference - 
You cam check whether it's actually 4096 -
- Take some unique, well-known process, like "cron"
- Issue "ps -ef | grep cron" and note the PID
- Issue "pstat -a | grep cron" and note the PSLOT (1st column)
- Perform an integer divide "PID / 4096" e.g. with ksh "echo $((PID/4096))"
- You will get PSLOT, q.e.d.
There is no other value besides the calculated PSLOT and the fixed Generation Count 0-4096 step 2, afaik.

Author Closing Comment

ID: 35404276
Thank you, and please forgive the delay in completing this!

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap ( Version 1.2 2.      Jpcap( Version 0.6 Prerequisite: 1.      GCC …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question