Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  question about CPUs

    Posted Wed May 17, 2023 11:21 AM

    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
    ------------------------------


  • 2.  RE: question about CPUs
    Best Answer

    Posted Wed May 17, 2023 11:45 AM

    Yes, the onstat -g glo report will tell you the PIDs of all of the oninit processes. You can use other OS tools to see what cores they are running on. I the ONCONFIG file, if you VPCLASS parameter contains the "aff" options that will tell you if the oninits are affined to specific cores. On other systems than AIX I would run top, add the processor number to the displayed columns, then filter for "oninit" to see what cores the oninit processes are running on, but "top" isn't supported on AIX I believe, and topas is not as good and I don't think that you can get the processor number from topas. I'm sure there are AIX tools to get that, but I cannot remember what they are. It's been a while since I was live on an AIX system for long.

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 3.  RE: question about CPUs

    Posted Wed May 17, 2023 11:56 AM

    Thanks Art, 
    no, affinity is not used
    i prefer to continue with g glo, so the part of output to use is the "total" part, it is expressed on seconds
    let s say, 200000 seconds, but i don"t know to what compare this value to know the percentrage of CPUs used on the system



    ------------------------------
    John Smith
    ------------------------------



  • 4.  RE: question about CPUs

    Posted Wed May 17, 2023 12:11 PM

    John:

    You cannot equate the total cpu times on the onstat -g glo output to a percentage of CPU in part due to muti-threading withing the CPU VPs and in larger part to the oninits themselves migrating from one core to another. In addition, some of the "cores" are just SMT threads on the same physical core as other SMT threads. That just confuses the whole calculation. If you want to know how busy your cores are due to Informix, then you can run topas and watch the "top-like" display on the left side. Again, not completely accurate due to the SMT threading, but better than anything else.

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 5.  RE: question about CPUs

    Posted Wed May 17, 2023 12:48 PM

    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
    ------------------------------



  • 6.  RE: question about CPUs

    Posted Thu May 18, 2023 05:05 AM

    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
    ------------------------------



  • 7.  RE: question about CPUs

    Posted Thu May 18, 2023 07:29 AM
    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.








  • 8.  RE: question about CPUs

    Posted Thu May 18, 2023 11:06 AM


    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
    ------------------------------



  • 9.  RE: question about CPUs

    Posted Thu May 18, 2023 10:03 AM

    Hi, John,

    if (user + system) in 1 minute accumulated about 300 seconds, then - yes, you are using about 5-core worth of the processing power.



    ------------------------------
    Vladimir Kolobrodov
    ------------------------------