BYO Oracle RAC on EC2

Over the past year or so I’ve had a number of conversations about running Oracle RAC on Amazon’s EC2 cloud platform. Chet Justice had suggested a long time ago that I try it, but I never quite found the time. Last fall at the Oak Table Symposium in Michigan, Jeremiah Wilton told me he hadn’t yet done it and I spent the last night scheming with Charles Schultz about getting started. But it wasn’t until this week that I finally found the time to try. (To be fair, I’ve been quite busy lately — our first kid was born on February 2nd, a beautiful little girl!)

Cheap Lab Environment

RAC on EC2 would be useful. (1) If you’ve never done much with RAC, then you can have a sandbox to play in – try the installer, try some parallel queries, try anything else. (2) You can setup a cluster with any version, any patch level – and see if your pl/sql or query works. (3) You could give each individual student in a class their own cluster.

And of course, the cost is very reasonable:

2 nodes, 1 SCSI target $3.08 for 6 hours
4 nodes, 2 SCSI targets $4.68 for 6 hours
20 nodes, 5 SCSI targets $14.37 for 6 hours

These numbers are based on small instances. In my observation so far the network connection is the bottleneck — and quite likely the 20 node cluster wouldn’t actually work. It would be about $25/hr to run a 10 node cluster with 4 SCSI targets on EC2 “cluster compute” nodes (w/10G network)… probably a little steep but maybe someday I’ll try running a benchmark for an hour or two just to see how fast it is. :)


I’m convinced that this will work. After a few days of working on it in between diapers, I haven’t quite gotten all the way – but I’m very close. I’ve got shared iSCSI-based block storage for ASM and two private networks which I think will support VIPs and multicast. The only two pre-checks that fail are swap space and an optional flag to NTP. The installer completes. I just need iron the kinks out of the post-install/root script execution.

I was initially trying to install but I wimped out and reverted to after wrestling with it for a while. I only have so much time in between diapers… :)

Everything is scripted. When you’re paying by the hour, you don’t want to waste time building the environment! Also, you don’t want to leave the environment running for days after you’ve set it up. Much better if you can start the RAC environment on-demand when you want it, and shut it down if you’re not using it.

Here’s what I’ve got so far:

jeremy@joshua:~/rac-ec2$ ./run-cluster 3 2
EC2-RAC-BUILDER Copyright 2010 Jeremy Schneider

    This program comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to redistribute it
    under certain conditions.  See included gpl.txt for details.

Creating cluster: ID #3
1 storage node(s)
2 compute node(s)

time      storage             network             compute
-----     --------            --------            --------
18:21:42  starting            starting            starting
18:22:18  ec2 load instance   ec2 load instance   ec2 load instance
18:23:44  boot O.S.
18:23:50  setup iscsi
18:23:55                      boot O.S.
18:24:10  finished
18:24:36                                          wait strg/ntwrk
18:25:27                      configure switch
18:25:37                      reboot O.S.
18:27:22                      finished
18:27:28                                          boot O.S.
18:27:48                                          configure O.S.
18:33:17                                          finished

username root/oracle
password ec2rac
hostname ec2-50-16-23-197.compute-1.amazonaws.com

This part is working pretty well. Right now I’m working on the script to actually install the oracle bits. Like I said – I’m still working out the kinks with the root script… but here’s what it currently looks like:

jeremy@joshua:~/rac-ec2$ ./install-oracle 3 2 >/tmp/ora-inst.out
19:57:19  downloading grid software from Oracle support
19:58:16  extracting grid software (/tmp/oracle/grid)
19:59:10  running cluvfy
20:00:33  installing grid infrastructure
20:28:11  running root scripts
20:30:38  downloading database software from Oracle support
20:36:16  extracting database software (/tmp/oracle/database)
20:38:02  finished!

Try It Yourself

If you’re interested in running RAC on EC2 then I’d love your help with this. You can download these programs and try them out for yourself. And let me know if you finish the install, and what steps you took. I’d really love to have a public toolkit that anyone can download, which will build RAC environments in EC2 on demand.


About Jeremy

Doing stuff with Oracle Database, Performance, Clusters, Linux. about.me/jeremy_schneider


5 thoughts on “BYO Oracle RAC on EC2

  1. Nice work.
    I see you attacked the problem of private/public network interfaces using a virtual switch (as another EC2 instance).

    On the network bottleneck, this has been a problem for a while on EC2, however they do have a higher spec cluster instance which has a 10 gigabit Nic.


    In the end, running Oracle RAC on virtualbox or VMware is still easier.

    Posted by Paul | March 6, 2011, 12:20 am
  2. Very cool way to solve network limitations of EC2. Excited to try it our (when I finish my pet-project with 11g Grid Control deployment on EC2).

    Posted by Alex Gorbachev | March 18, 2011, 9:52 pm
  3. Hi Jeremy. Very nice idea.
    I’m an Oracle DBA and teacher, but completely newbie in all of these cloud things.
    I think it would be very interesting to use EC2 to provide my students an appropriate environment to work with, without the costs of having expensive hardware, be worried with images, hardware upgrades and so on.
    Specialy having a RAC environment in EC2 would be very usable for me.
    Please, let us know how this work is going on.
    I am trying to work on it also, but as I am newbie in cloud, I’m losing much time in figuring out how it works, how to connect to machines, trying to have graphical interface, thinking of how to provide access to my students in EC2 just for the time of the training, etc. So, I think I will need a lot of time to have progress here.

    Posted by Eduardo Claro | March 21, 2011, 12:07 pm
  4. Hi Jeremy,
    Did you get any further with this? I think it’s a cool project. I may give it a try when I get some spare time (which is almost never).


    Posted by Leighton | May 19, 2011, 1:51 pm


  1. Pingback: M-A-O-L » BYO Oracle RAC on EC2 - March 18, 2011


(a) We are currently looking for consulting and/or contracting work in the USA around the oracle database ecosystem.

Contact Jeremy at 312-725-9249 or schneider @ ardentperf.com


oaktable ocmaceracattack
%d bloggers like this: