Operating System - HP-UX
1753798 Members
7248 Online
108805 Solutions
New Discussion юеВ

Re: About PST_MAX_PROCS limitation on HP

 
SOLVED
Go to solution
Ravi K N
Occasional Advisor

About PST_MAX_PROCS limitation on HP

Platform - HP-UX IA64 11.31

We have an application that collects CPU information by pstat_getdynamic system call.

We use the member 'psd_mp_cpu_time' of system defined structure 'pst_dynamic'. There is a system defined limitation on 'psd_mp_cpu_time' for max number of CPUs.

It is defined as below in /usr/include/sys/pstat/global_pstat_body.h

#define PST_MAX_PROCS 32

_T_LONG_T psd_mp_cpu_time[PST_MAX_PROCS][PST_MAX_CPUSTATES];

From the above we can get the data of atmost 32 CPUs by looping through the structure psd_mp_cpu_time[i][j] where 'i' is ranging from 0 to 31.

For example on systems where there are 70/80 CPUs, the application is dumping core when we loop through to retrieve information from psd_mp_cpu_time past 31.

How to handle the application on systems where the number of CPUs are more than 32?

Is there any way to get the information?

Is there any limitation on HP systems that number CPUs should not be more than 32?

We are working on an urgent case, please help ASAP.

Thanks

8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: About PST_MAX_PROCS limitation on HP

Shalom,

32 CPU's should be enough for most applications.

How to handle the application on systems where the number of CPUs are more than 32?

Leave the other CPU's for vpars or other OS processes.

Is there any way to get the information?

N/A from me.

Is there any limitation on HP systems that number CPUs should not be more than 32?

This is an application limitation, not an OS limitation. Many more CPU's are possible on superdome systems.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor

Re: About PST_MAX_PROCS limitation on HP

>From the above we can get the data of at most 32 CPUs

It looks like it.

>How to handle the application on systems where the number of CPUs are more than 32?

Have you looked at example #2 where it also calls pstat_getprocessor? That may do it.
http://docs.hp.com/en/B2355-60130/pstat.2.html#d0e604810
Ravi K N
Occasional Advisor

Re: About PST_MAX_PROCS limitation on HP

Steve,

Sorry if my question confused you. My application doesn't need more CPUs.

My application works on a HP server that has 80 CPUs. It collects the CPU statistics of all the CPUs.

For collecting the tick information of all the available CPUs it uses system call pstat_getdynamic and the
system defined array psd_mp_cpu_time. The array psd_mp_cpu_time is limited in index by PST_MAX_PROCS which
is defined as '32' in the system header file /usr/include/sys/pstat/global_pstat_body.h

When there is a chance to add more CPUs to the server how can the system header limit the max number of processors
('PST_MAX_PROCS') to 32?

Thanks
Dennis Handly
Acclaimed Contributor

Re: About PST_MAX_PROCS limitation on HP

>Sorry if my question confused you.

How, it was quite clear, pstat_getdynamic(2) isn't designed/documented well. :-)

>how can the system header limit the max number of processors (PST_MAX_PROCS) to 32?

The header is a description how the pstat(2) software works, it has nothing to do with the hardware configuration.

It seems pstat_getdynamic(2) is poorly designed and/or documented. It seems like if you have more than 32, you must go to plan B, pstat_getprocessor(2).
Ravi K N
Occasional Advisor

Re: About PST_MAX_PROCS limitation on HP

Thanks Dennis. My last update was in reference to Steve's answer.

I just realised from the header file global_pstat_body.h that we should not be using 'pst_dynamic' structures as the size of the arrays used in that are hard-wired. Instead we should use 'pst_processor'.

There are comments in the header file mentioning that.

Thanks for your help.
Dennis Handly
Acclaimed Contributor

Re: About PST_MAX_PROCS limitation on HP

>My last update was in reference to Steve's answer.

(Yes, I saw that.)

>I just realised from the header file global_pstat_body.h that we should not be using pst_dynamic structures. Instead we should use pst_processor. There are comments in the header file

I'm glad it is mentioned some place but as an architect keeps telling me, users are not suppose to look at the headers, only the documentation. It doesn't help if it's not in the man page.

>Thanks for your help.

If our answers were helpful, please read the following about assigning points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33
Dennis Handly
Acclaimed Contributor
Solution

Re: About PST_MAX_PROCS limitation on HP

Here is a whitepaper about pstat(2):
http://docs.hp.com/en/1216/pstat_whitepaper.pdf
Ravi K N
Occasional Advisor

Re: About PST_MAX_PROCS limitation on HP

If the number of processors are more than 32, then we should we pstat_getprocessor instead of pstat_getdynamic