Configuring PID recycle pool on AIX

Posted on 2010-08-18
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 500 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 500 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:
Suggested Courses

623 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