Re: Oracle CPU Time Used, vs CPU Time Available (CPU Capacity)

  • From: Peter Fong <peter.fong@xxxxxxxxx>
  • To: Chris Taylor <christopherdtaylor1994@xxxxxxxxx>
  • Date: Thu, 14 Sep 2017 16:49:04 +1000

I would personally not use that method for calculating spare CPU capacity.
CPU's Time metrics over an given sample period may give the appearance of
spare capacity, but at any point in time over than period all CPU's could
be fully utilised and have processes waiting to run.

Take for example.
- Over a 60 second period.
- You have 1 CPU,
- 2 transactions arrive at the same time
- They each use 15 seconds of CPU.
Because the transaction arrive at the same time and you can only service
one at a time, response time will be over 30 seconds for at least one of
the transactions .  Over a 60 second period your CPU will only show as 50%
utilised as only 30 seconds of of 60 seconds of available CPU it utilised.

I think you are better off looking at arrival rates of transactions,
service time and cpu cores.  ASH data should be useful for this as you can
see the session state and whether or not a process is in "ON CPU" (
runnable state) or "WAITING" ( for something else like an IO ).  If the
slot counts for a given slot time shows the number of active sessions "ON
CPU" ( CPU + Wait for CPU) is greater than the number of CPU's then it
would indicate a problem where processes are queued up waiting for CPU to
service them.

As a generally rule of thumb ( like all rules of thumb it is there to be
broken ) an OLTP system should probably run at no more than 70% utilisation
to increase the chance that a given process can be serviced by the CPU
immediately rather than being queued.

Regards

Peter



On Thu, Sep 14, 2017 at 5:42 AM, Chris Taylor <
christopherdtaylor1994@xxxxxxxxx> wrote:

Many of us (if not all) are familiar with Oracle counting CPU Time used in
various metrics right?

So how can we calculate the time "available"?   Is there some way to say:

Given # of Cores @ xClockSpeed, how much time is available to the system?

If we could calculate that, we could say "this process used xCPUMinutes of
yCPUCapacity".

Just curious if anyone knew a way to do that?

Chris


Other related posts: