CPU Performance

Oracle CPU Test

This page contains the results running a standard Oracle script on different CPUs. The purpose of these tests is to measure performance improvements within a specific family of CPUs, for example different generations of Intel x86-64 processors. They are NOT intended be used in comparisons between different types of CPU. So please don't use these test results to compare Solaris SPARC with Intel processors, for example.

In the past I have circulated these results privately. However, in recent months we have discovered that these results can be invaluable as a sanity check that the basic configuration of a system is correct. I have therefore decided to publish them in the hope that they are useful to others and also that new results will be contributed.

Results are in the following pages:

Intel Core
Intel x86-64
Intel Itanium
IBM Power
Sun SPARC

The test is intended to be non-intrusive. It uses PL/SQL in order to exercise Oracle, but no objects are created the database. It can be run in either a database or an ASM instance.

Note that this is purely a speed test. It does not give any indication of the scalability of the processor. Scalability tests are by nature more intrusive and thererfore more difficult to run in production environments

The test uses the following SQL*Plus script

SET SERVEROUTPUT ON
SET TIMING ON
 
DECLARE
  n NUMBER := 0;
BEGIN
  FOR f IN 1..10000000
  LOOP
    n := MOD (n,999999) + SQRT (f);
  END LOOP;
  DBMS_OUTPUT.PUT_LINE ('Res = '||TO_CHAR (n,'999999.99'));
END;
/

The result should be:

Res = 873729.72

We have found that both the operating system and the Oracle version can affect the tests, so both are recorded

If you are interested in contributing additional test results, please run the above script at least five times and record the results, together with the following information about the environment:

Note that I record more detailed data about each test, but do not distribute this as it includes customer names and details

The following table contains an example of the information recorded

Test Number41
SiteABC PLC
Hostnameserver24
Machine TypeSun T5240
Processor TypeUltraSPARC-T2+
Processor Speed1582 MHz
# Processors2 x 8 Cores x 8 Threads
Operating SystemSolaris 5.10
Architecture64-bit
Oracle Version11.2.0.1
Memory64Gb
Year (of manufacture)2009

Test results in seconds (minimum of five results)

76.97
77.03
76.83
76.88
76.82

Perl CPU Test

Oracle VM Server 2.2 does not include an Oracle database by default. It is therefore not possible to run the CPU test in Domain 0. This can be useful if you wish to compare CPU performance for the physical server against CPU performance for the virtual machines. Oracle VM Server does include a Perl distribution, so I have translated the Oracle CPU test into a Perl version. The Perl version runs much faster as it does not use the Oracle NUMBER data type. At present the Perl version is returning a different final total to the Oracle version. This is almost certainly due to rounding errors, but I have not yet had time to figure out the root cause. When this problem is resolved, I will start to publish times for the Perl version.

The current version of the Perl CPU test is as follows:

#!/usr/bin/perl

use strict;
use Time::HiRes qw[gettimeofday tv_interval];

my $startTime = [gettimeofday];
my $n = 0;
for (my $f = 1;$f <= 10000000;$f++)
{
  $n = ($n % 999999) + sqrt ($f);
}
printf ("Res = %10.2f\n",$n);
my $endTime = [gettimeofday];
my $elapsed = tv_interval ($startTime,$endTime);
printf ("Elapsed = %0.6f\n",$elapsed);