[Orca-users] Re: MAXPID

Blair Zajac blair at orcaware.com
Wed Aug 7 10:19:04 PDT 2002


jontankersleyateds wrote:
> 
> Orcallator has set MAXPID to the default of 30000.  Will there be any
> problems on a system that has MAXPID set to 100000?  Do we need to
> update this?

Yes.  If MAXPID does not match exactly the system's real MAXPID, then
the process creation rate will be miscalculated when the last PID
cycles around to numbers near 0.

Take a look at the code in orcallator.se:

      // Measure the 5 second process creation rate.
      mpid5_current  = kvm$mpid;
      mpid5_now      = gethrtime();
      mpid5_interval = (mpid5_now - mpid5_then) * 0.000000001;
      mpid5_then     = mpid5_now;
      if (mpid5_current >= mpid5_previous) {
        mpid5_diff = mpid5_current - mpid5_previous;
      }
      else {
        mpid5_diff = mpid5_current + DEFAULT_MAXPID - mpid5_previous;
      }
      rate = mpid5_diff/mpid5_interval;
      if (rate > mpid5_rate) {
        mpid5_rate = rate;
      }
      mpid5_previous = mpid5_current;

      // Now take these results to measure the long interval rate.
      // Because the mpid may flip over DEFAULT_MAXPID more than once
      // in the long interval time span, use the difference between
      // the previous and current mpid over a 5 second interval to
      // calculate the long interval difference.
      mpid_current += mpid5_diff;
      mpid_now      = mpid5_now;

Some other questions:

Which OS is this on?

Did you set the MAXPID on this system by hand, and if so, how?

Do you know of a way to get the maximum PID from the system itself
without hardwiring the value in orcallator.se?

Best,
Blair

-- 
Blair Zajac <blair at orcaware.com>
Web and OS performance plots - http://www.orcaware.com/orca/



More information about the Orca-users mailing list