By Franck Pachot

.
When it comes to choose a cloud instance to run Oracle Database, you want to be able to run your workload on the minimum CPU cores. This is why in a previous post I measured how many logical reads per seconds can be achieved with a SLOB workload, on AWS which is often the first considered, and will probably do it on Azure in the future. I did the same on the Oracle Cloud which is the only one where Oracle make it easy to run an license the Oracle Database.

CaptureGCPlogoPNGToday, I’ve seen that the Google Cloud offers a 1 year trial (1 year instead of 3 months) with 300$ free credits where you are sure that your credit card will not be debited before you accept it. Of course I wanted to play with it and tested the IaaS instance types with same method: SLOB.

Licencing No-Go

I said ‘play with it’ because you cannot consider Google Cloud as a platform for Oracle Database. Not because of the Google Cloud: it is on the top 3 cloud vendors with AWS and Azure. But just because Oracle doesn’t want to:

  • It is not an ‘authorized cloud’ where Oracle accepts the virtual cores as a metric
  • It is not running with an hypervisor where Oracle accepts the virtual cores as a metric
  • It is not the Oracle Cloud where Oracle accepts to count the virtual cores, and even apply the core factor

So, the sad truth is that if you want to run an Oracle Database on the Google Cloud, you may have to pay Oracle Licences to cover the whole physical infrastructure of Google data center… This is clearly a No-Go for processor metrics licenses. You may think about NUP+ licensing where the metric is not the processors, but the number of users. This was possible for Standard Edition for 11g (and for 12.1.0.1 but this is out of support now). But with 12.1.0.2 they changed the Standard Edition rules and, even when the metric is the number of users, you have to count the number of servers. This is again a No-Go for a public cloud environment.

So let’s play in the hope that one day the rules will change. For the moment, they think that this strategy will push the current Oracle Database users to the Oracle Cloud. They may realize one day that it increases the counterflow of users going to Open Source databases to run away from those arbitrary licensing rules.

Machine types

There are 3 types of processors available for Europe (datacenter in Brussels) Sandy Bridge, Ivy Bridge and Haswell. The regions are detailed in regions-zones documentation and there is more detail in machine_types.

Ivy Brige

Here I choose europe-west1-c and created an VM running RHEL7 on 4 vCPU Ivy Brige:

CaptureGCP00Ivy

Note that the price is the same for all kind of processors within the same region.

SLOB

Here is cached SLOB (UPDATE_PCT=0 RUN_TIME=300 SCALE=80M WORK_UNIT=64)

Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               1.0              30.3      0.00      4.74
              DB CPU(s):               1.0              29.4      0.00      4.59
      Redo size (bytes):          14,254.9         433,831.2
  Logical read (blocks):         674,052.6      20,513,983.3

This is 674 kLIOPS per vCPU.

Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               2.0              25.0      0.00      7.24
              DB CPU(s):               2.0              24.6      0.00      7.11
  Logical read (blocks):       1,377,553.4      17,267,173.0

This is 689 kLIOPS per vCPU. We are running on two cores

Now, let’s see if those 4 VCPUs are threads or cores.

Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               3.0               1.6      0.00     12.10
              DB CPU(s):               2.9               1.6      0.00     11.93
  Logical read (blocks):       1,493,775.4         815,084.0
Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               4.0              54.6      0.00     13.80
              DB CPU(s):               4.0              54.0      0.00     13.64
  Logical read (blocks):       1,780,041.3      24,329,604.1

This is 498 kLIOPS per vCPU with 3 threads and 445 kLIOPS per vCPU with 4 threads. We are obviously running on 2 hyper-threaded cores, where hyper-threading here gives only 30% additional LIOPS.

When going further, the performance will decrease:

Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               5.0              48.5      0.00     15.81
              DB CPU(s):               3.0              29.0      0.00      9.46
  Logical read (blocks):       1,460,029.2      14,233,024.3

It is interesting to see that when running 5 sessions on 4 vCPU then actually 3 threads only are used on average.

Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               6.0              72.1      0.00     16.24
              DB CPU(s):               3.0              36.5      0.00      8.22
  Logical read (blocks):       1,458,749.6      17,651,628.4
Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               7.0              72.5      0.00     20.42
              DB CPU(s):               3.0              31.5      0.00      8.86
  Logical read (blocks):       1,445,423.3      15,073,622.1
Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               8.0              82.9      0.00     18.93
              DB CPU(s):               3.0              31.4      0.00      7.17
  Logical read (blocks):       1,436,355.2      14,986,038.9

Those 8 runs are visible on the CPU usage graph from the VM dashboard where maximum CPU usage is when running 4 sessions on those 4 threads.

CaptureGCP00Ivy001

Here is the CPU description that we can see from lscpu and /proc/cpuinfo where we can see that we are virtualized with KVM:

InkedCaptureGCP00Ivy002_LI

For tty output I usually prefer to paste the text rather than a screenshot, but I wanted to show the ssh screen that you get on your browser with a simple click. This is very convenient. We are really in easy and fast provisioning here.

Haswell

Just to compare, here is the same running on the Haswell machine type.

CaptureGCP00Haswel

Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               1.0              25.4      0.00      5.53
              DB CPU(s):               1.0              24.4      0.00      5.32
  Logical read (blocks):         598,274.2      15,275,586.5
 
Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               2.0              27.3      0.00      8.46
              DB CPU(s):               2.0              26.8      0.00      8.29
  Logical read (blocks):       1,155,681.9      15,814,666.6
 
Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               3.0              34.7      0.00     12.34
              DB CPU(s):               3.0              34.2      0.00     12.18
  Logical read (blocks):       1,300,659.1      15,052,978.1
 
Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               4.0              54.6      0.00     13.80
              DB CPU(s):               3.9              53.8      0.00     13.61
  Logical read (blocks):       1,541,843.0      21,098,158.6

Sandy Brige

here is the same running on the Sandy Brige machine type.

CaptureGCP00Sandy


Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               1.0              25.2      0.00      2.16
              DB CPU(s):               1.0              25.0      0.00      2.14
  Logical read (blocks):         668,393.8      16,935,651.8
 
Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               2.0              23.1      0.00     11.13
              DB CPU(s):               2.0              22.6      0.00     10.86
  Logical read (blocks):       1,204,487.9      13,938,751.4
 
Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               3.0              37.5      0.00     13.65
              DB CPU(s):               3.0              36.9      0.00     13.43
  Logical read (blocks):       1,383,602.0      17,334,975.8
 
Load Profile                    Per Second   Per Transaction  Per Exec  Per Call
~~~~~~~~~~~~~~~            ---------------   --------------- --------- ---------
             DB Time(s):               4.0              50.0      0.00     16.23
              DB CPU(s):               3.9              49.3      0.00     15.98
  Logical read (blocks):       1,656,216.2      20,782,477.0

So what?

Whether you like it or not, you cannot run Oracle Database on the Google Cloud because Oracle licensing rules are set to make life difficult for running Oracle Database outside of the Oracle Cloud. For performance, it is still the Oracle IaaS that shows the best performance for this test. But of course, there are lot of other points to consider. You don’t run only the database, but application should be located in the same data center.

The Google Cloud Platform looks good and I’ll probably use my Google Cloud trial to test Spanner, and maybe the new PostgreSQL service. I love Oracle Database technology. But the customers going to a public cloud will tend migrate to database systems which can run on any virtualized environments without certification, support and licensing risks.