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

From: Dominic Brooks <dombrooks_at_hotmail.com>
Date: Thu, 14 Sep 2017 07:01:17 +0000
Message-ID: <DB6P190MB0454D86096A3784D49FC74BEA16F0_at_DB6P190MB0454.EURP190.PROD.OUTLOOK.COM>



I have spent a lot of effort recently explaining that running at a sustained 95% utilisation over a 1-2 hour period does not just mean that you’ve got an extra 5% that you could be squeezing out... 😊

From: Peter Fong<mailto:peter.fong_at_gmail.com> Sent: 14 September 2017 07:50
To: Chris Taylor<mailto:christopherdtaylor1994_at_gmail.com> Cc: ORACLE-L<mailto:oracle-l_at_freelists.org> Subject: Re: Oracle CPU Time Used, vs CPU Time Available (CPU Capacity)

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_at_gmail.com<mailto:christopherdtaylor1994_at_gmail.com>> 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 _at_ 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

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Sep 14 2017 - 09:01:17 CEST

Original text of this message