Vinay Kumar Aluri, August 03, 2016 - 9:46 am UTC
AWR for DB constrained by CPU or not??
Narendra, October 05, 2023 - 10:34 pm UTC
Hello Connor/Chris,
Apologies in advance if I am not providing enough information for you to comment on but I have been (literally) reeling from shock when an Oracle Engineer today claimed that our database workload is constrained by CPU and we need to add more CPU to get better performance for application batch job that is taking 6 times longer on oracle 19c database running on 14 cores (but shared by other databases too) as compared to previous 12.1.0.2 database running on 8 cores. (looks like can't paste screenshots here)
I am confused about 2 things
1. Why would database be deemed as CPU-bound when host is reporting over 32% idle time? I have monitored host CPU usage while the job runs and it always remains around 80% but less than 85%
2. Under what circumstances, operating system will report high system load (24) but average CPU utilization (67%)?
Below are the stats from node 1, where almost all of the batch job executes. The OS is 64-bit Linux 7.9.
Elapsed Time => 179.92 minutes
DB Time => 466.73 minutes
Foreground Wait Classes
DB CPU => 20383.81 seconds
The "OS Statistics By Instance" section from 2-node RAC 19c database global report is showing below numbers:
Instance => 1
No. of CPUs => 14
No. of cores => 14
Load Begin => 24.86
Load End => 20.89
%Busy CPU => 67.19
%User CPU => 38.09
%Sys CPU => 22.74
%WIO CPU => 0.13
Idle CPU => 32.81
October 19, 2023 - 12:44 pm UTC
Hard to say exactly why the engineer believes the system is CPU bound. If you doubt their analysis then ask them for an explanation of precisely why they think this. Put the questions you've sent us to them.
1. It could be that the batch process itself is CPU bound, not the database as a whole. That said, unless the process uses (or can be easily changed to use) parallel processing, adding more CPUs is unlikely to help.
2. What other work is the system doing? e.g. is there lots of I/O that could account for this extra work?