Midaemon 11.x Prealloc Flag
On some HPUX systems there scenarios where after setting “bufsets” and “skipbuf” flag scopeux keeps losing connection to midaemon and midaemon process fail.
If “/opt/perf/bin/utility -xs” is executed, there are going to be configuration messages indicating that the cpu are being added or removed dinamically
If tusc is executed for midaemon it will show that is looping in pstat calls fro PSTAT_PROCESSOR and PSTAT_DYNAMIC.
In such scenario we need to use the following flag:
specifies the highest CPU ID the midaemon should pre-allocate bufsets for. By default, bufsets are only allocated for active CPUs, at startup time, and then dynamically as CPUs become active. If the value provided as argument is greater than the highest possible CPU ID, bufsets will be allocated for all CPUs, present or not, active or not. This was the default for previous versions of the midaemon. Note that, when running the midaemon single-threaded, trace buffers are pre-allocated regardless of this option.
By default we are allocating buffers to the active CPUs when midaemon started, and we track the traces from those CPUs to calculate different metrics. And when a CPU is made active at later point we dynamically detect it once it starts generating traces. But on these systems where this problem is happening, we are getting traces from disabled CPUs and we are trying to make them active and the code is looping in it.
And the other clients which are expecting timely update, by that they time won’t receive update and the client process(scopeux,glance,perfd) exit by saying midaemon is not responding.
So as a workaround, we are pre-allocating CPU buffers for all number of CPUs (GBL_NUM_CPU count) and avoiding the midaemon reallocation dynamically.
To make use of this flag:
Run "icapstatus" or "/opt/OV/bin/ovcodautil -support | grep CPU" (GBL_NUM_CPU metric)
Start midaemon with "-prealloc" flag... for example: # midaemon -prealloc 8 -smdvss 512M