With 72% on 7 cores - effective CPU use is still 5 cores. There are couple of follow up questions:
With 14 CPUVPs and 28 logical processors (SMT-4 x 7 cores) one may not reach 100% core utilization, simply because 2 busy threads cannot make full use of the core (due to memory stalls, hence later power processors go up to 8 threads per core).
3 active threads per core will use more CPU, typical OLTP workload (where preference is throughput over response time) could show improvement up to 8 threads per core.
For this particular scenario I would recommend trying configuration with 21 CPUVPs and see if (average) 300 seconds number increases during periods of high Informix activity, and if the Informix "performance" (throughput) increases. It's possible that workload may benefit from more parallelism and will be able to use more CPU.
The alternative (if, indeed only 5 cores worth of the processing power is enough) can be proven by having 20 CPUVPs ( 5 x SMT-4 ) and limiting them to threads on the 5 cores by using "execrset" or "attachrset". For this particular situation I would not recommend this, since the configuration definitely can use 5 cores and having 100% use of resources would be clear indication that more CPU is needed. But, it's possible to check (24 CPUVPs + using AIX *rset to bind Informix to specific 6 cores out of 7) if configuration with 6 cores would use more CPU and perform better.
Basically 5 core (effective) use can mean two things - workload is OK with 5 cores worth of CPU, or, alternatively, you cannot reach higher CPU utilization because you only run 2 cores per thread. But (on IBM POWER) the simple method of (user + system)/(collection time) gives very accurate estimate of the actual number of core capacity used - the CPU time accounting on AIX is very precise.
I do have to mention IBM/POWER specific thing. Always check output from "lssrad -av" to confirm that resources (CPU, memory) allocated to LPAR have reasonable degree of affinity. If not - giving additional (CPU) resources to Informix may result in higher processor utilization and lower performance, and using (full) resources from fewer cores may actually show better performance.
------------------------------
Vladimir Kolobrodov
------------------------------
Original Message:
Sent: Thu May 18, 2023 07:28 AM
From: Art Kagel
Subject: question about CPUs
John:
There is a small problem with Vladimir's calculation. If the oninits were not 100% busy, they could have been 72% busy on all seven cores which would still have calculated out a five cores used by that calculation.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
Original Message:
Sent: 5/18/2023 5:05:00 AM
From: John Smith
Subject: RE: question about CPUs
Thanks Vladimir,
so, i have a machine with 7 Cores,
SMT4,
14 CPU VPCLASS (i think it s recommended to put 2 VP per Core with SMT4)
and (onstat -z ; sleep 60 ; onstat -p) difference is 5, is it using 5 trom the 7 Cores or 5 CPU VPCLASS ?
thanks
------------------------------
John Smith
Original Message:
Sent: Wed May 17, 2023 12:47 PM
From: Vladimir Kolobrodov
Subject: question about CPUs
Interesting question, because of "cores".
Cores are different from "logical processors" visible to the operating system (AIX).
With SMT-N, generally, Informix will have access to N x Cores logical processors, and, at peak load, will utilize 100% of X processors where "X" is the number of Informix CPUVPs. If there are more logical processors than configured CPUVPs.
Basically, if the LPAR has 1 core in SMT-8, Informix is configured with 8 CPUVPs, and all of processors are 100% busy - Informix is using (approximately) 1 core (AIX overhead is not significant, unless there is substantial amount of I/O and/or network traffic)
However, if there are significantly more logical processors than Informix CPUVPs, then core utilization will depend on AIX parameter "vpm_throughput_mode". If set to "0" - scheduling preference for active processes (CPUVPs) will be on the primary core threads, so with, say, 8 extremely busy VPs will actually use very close to 8 cores (if those are available). With different setting of "vpm_throughput_mode" - AIX may schedule busy VPs to the threads on the same core before going to another one. Performance, clearly, will be quite different.
Yet another level of complexity is the fact that LPAR can have logical processors that can only use fraction of the core computing resources. But (shared LPAR) sometimes can "borrow" processing capacity from other LPARs that share same core(s)
Nevertheless, because AIX is the only O/S (I know of) with very precise CPU time accounting, there is a very simple way to figure out how many cores worth of processing power Informix actually used during specific time interval:
onstat -z ; sleep 60 ; onstat -p
Add usercpu + syscpu and divide by 60 - that will give effective number of cores utilized by Informix during this minute. The usercpu + syscpu are the same as in onstat -g glo (which even gives total) - so it can be used instead of "onstat -p"
------------------------------
Vladimir Kolobrodov
Original Message:
Sent: Wed May 17, 2023 11:21 AM
From: John Smith
Subject: question about CPUs
Hello
How could we know exactly how many Cores Informix is using on a Power IBM Server (AIX) ?
Not the Sys view but the informix view ( -g glo helps ?)
thanks in advance
------------------------------
John Smith
------------------------------