Oracle starts at $87/year or $0.020/hour

Intro: a decade of evolving oracle costs

In 2011 I wrote a blog post about Oracle database license costs. Back then I took a look at the open source Spacewalk project using an Oracle Database. I was surprised it was not ridiculously expensive to set up, because a small Oracle Standard database doesn’t cost what a big Oracle Enteprise deployment costs.

In 2021 Oracle is even cheaper to get started with. There is a completely free tier at Oracle Cloud, essentially offering a hosted / managed version of Oracle Express. Oracle Standard now starts at $87/year.

This is not too impressive because everything else got cheaper too. About half of the monthly cost of the minimum Oracle Standard deployment on AWS is the license, which may be a bargain if Oracle is the right choice for your database. But the bigger the database the higher premium you pay for Oracle, especially if you switch to Oracle Enterprise, which can be 5x-10x more expensive.

The Spacewalk project made the effort to switch to postgres, before discontinuing itself completely in 2020.

Oracle Express free cloud hosting

You can get two managed databases, each with 1 CPU and 20GB storage, from Oracle Cloud, for free. With that you can also get two VMs with 0.2 CPU and 1 GB memory to work with those databases.

This is a more generous than the always free tier from AWS. From AWS you can permanently get 25GB of DynamoDB and 1 million Lambda requests per month. For databases and VMs the free offering for AWS is half of Oracle’s and it’s only for the first year: for RDS you get 1 CPU and 20GB of storage, for EC2 you also get 1 CPU.

Cheapest Oracle Standard license: $87/year

Amazon RDS has a license-included option for Oracle, the smallest db.t3.micro in a single availability zone is now $0.038/hour, or $193/year with a reserved instance. Besides the license this includes the virtual machine but still excludes storage and IO.

PostgreSQL on RDS by comparison is $0.018/hour, or $106/year with a reserved instance. If we substract that amount then we could say the cheapest oracle license on AWS is $0.020/hour or $87/year, perhaps half of what it cost a decade ago.

Realistic Oracle Standard license: pay 4x

You can’t do that much with a db.t3.micro instance running Oracle. For two reserved multi-AZ-replicating db.t3.2xlarge reserved instances with 8 CPU cores each, Oracle costs $12.4k/year while PostgreSQL comes to $3.3k/year. We could say a realistic Oracle Standard license cost for a realistic-size basic database setup is $9.1k/year, and Oracle Standard costs about 4 times more than PostgreSQL per core.

Typical Oracle Enterprise costs: pay 7x

For Oracle Enterprise, which remains quite expensive, on AWS you still have to bring your own license and roll your own deployment, though AWS provides a quick start for Oracle now. For any significant setup like that, maintenance effort is going to be significant.

You can buy a managed oracle enteprise database from Oracle Cloud. The smallest setup is a quarter of an X8 rack. It costs about $15/quarter-of-a-rack/hour, plus $1000/cpu/month, or about $106k/month for 96 cores with 44TB if the setup is fully utilized 24/7. AWS Aurora with postgres will be more like $16k/month, in other words Oracle Enterprise costs about 7 times more than PostgreSQL per core.

Comparing apple trees to orange juice

But that doesn’t mean Oracle is expensive for your needs. Aurora t3 cores are not the same as Exadata X8 cores. If Oracle can do something you need that PostgreSQL cannot, or if Oracle is much faster for your workload than PostgreSQL, it can still come out cheaper.

Even for a workload that supports both engines and even if the hardware is similar, tuning the database engine might make all the difference. Do you have someone tuning your database? I haven’t tuned a database for a decade, but it seems it can still easily increase performance by a factor of 10. If you spend $15k/month on a database, you should probably pay an expert $30k to make it fast.

Postgres growth

Even if these Oracle costs are not ridiculous, Postgres is still making inroads. Amazon (the shop, not AWS) switching off their Oracle was a major milestone back in 2019. Amazon reported 60% cost savings, which we may take with a grain of salt since they want to convince us to buy AWS services, but I doubt that things got more expensive for them.

Still, 60% savings is less than 86%, which would match that 7x number above. Probably AWS was not paying Oracle list prices, probably Oracle was a pretty good solution for some of their workloads, and probably AWS its costs managing its own infrastructure are lower than paying for Oracle Cloud.

On the other hand the internet is also full of examples of companies saving 90% or more, especially if they started off with applications that were not really a great fit for Oracle Database or if they were in a costly licensing audit fight with oracle.

Spacewalk itself started supporting PostgreSQL as a backend in 2011 which seems to be the default for a long while.

But spacewalk is discontinued and not many people care, because people manage their infra packages differently now. So with that context, was it worthwhile to make Spacewalk Oracle-independent? Did that investment effort back in 2011 pay itself back over the next decade? Given the number of Spacewalk installations, probably. How about the opportunity cost: could the project have invested that same effort in innovation instead?


2011 original post

I learned that spacewalk requires oracle the other day. To an open source weenie that sounds bad, but how much of a problem is it in practice?

Oracle XE is free, allowing up to 4GB of data, which seems like it would last you about 2 years of running spacewalk with a few thousand packages and a few hundred machines.

Oracle One costs $180 per user with a 5 user minimum, installable on one machine with two sockets (so up to 12 core for an AMD opteron). Including one year of support that adds up to about $1000.

But that’s a perpetual license. A 1-year oracle license is $36 per user, so adding in support, for one year or oracle on one machine you pay just shy of $200.

The next upgrade after oracle one is oracle standard, which costs $350 per user perpetual, or $70 per user per year.

So to get started with oracle you can use Oracle XE. When you run out of space you buy a decent database server machine and a $200 oracle license, allowing for 4 middleware nodes and one administrator. You have to pay that $200 once a year. Or you can run Oracle One in the cloud with Amazon RDS from $0.16 per hour.

When you need a resilient set up you will need oracle standard so you can cluster with Oracle RAC. You’ll need a license for each server (which can now have 4 sockets so up to 24 core), so your cost increases to 2 * 5 * 70 = $700/year.

You can also deploy oracle standard on Amazon RDS, where you’ll pay from $0.11 per hour per VM in addition to your license. Though it seems like at the moment, amazon RDS replication doesn’t work for oracle, so there’s probably no point in using that. Instead, you’ll have to switch to creating your own EBS-backed AMIs and installing oracle into them (or, perhaps, use an oracle-provided AMI).

I can find nothing that states there’s a limit to Oracle RAC scale with oracle standard. So you could potentially build big, BIG clusters this way.

$350/server/year is not exactly free of course, but this actually gets you really good clustering. That bit of capex gets you the ease of deployment and use of Oracle RAC. For some use cases, it’s probably easily the cheapest option if you take into account the opex of doing anything else. For example if Oracle Locator, the subset of Oracle Spatial that’s available in the standard edition, is good enough for you, this seems easier than figuring out your own clustered PostGIS setup. Postgres or mysql replication would’ve been just fine for spacewalk though.

Oracle Enterprise has additional features that aren’t really relevant for most scale-out (webby) stuff: using more than 4 sockets, some of the advanced administration/audit/backup tools, advanced security features, oracle spatial, compression, table partitioning, and some other bits. Enterprise still costs about a gazillion dollars.

We have to erase this idea that “oracle is ridiculously expensive” out of our brains. It just isn’t true anymore: there’s some very reasonable oracle database offerings for reasonable prices. Instead, the idea should now be “oracle enterprise is ridiculously expensive”. For things like spacewalk, where you don’t need the advanced stuff, it seems oracle is now almost always a very reasonable backend that probably can have a competitive TCO.