Amazon's EC2

Amazon’s EC2 service is amazing. For cs348b, we had started our final renderings Friday afternoon. We had done some back of the envelope calculations to determine it should take around 48 hours if we split up the render across 4 machines. That would leave us about a day extra for finishing up the project.

Although our estimations were far off, a much larger problem was an aliasing issue that had gone unnoticed in our earlier, poorer quality renders. We discovered this about 24 hours into the render when our first few tiles started streaming in. We were hoping it wouldn’t be too big of an issue and decided to fix the bug and start off a new job (at half quality). We were hoping that our first big render would still be decent, and the second would be a backup.

Bad rendering of Eagle Nebula

As it turns out, the images were not too our liking. Even worse, we had accidentally rendered part of the image with different settings so they did not align perfectly. We could have said the original image did not line up either, but that was a cop out excuse. With time running short, we had to make some quick executive decisions.

I had learned about EC2 last summer but never really used it. The night we kicked off the renders, I talked to my friend, Ray, about setting it up. He had known someone who used it and said it took about 10 hours and wouldn’t be worth my time.

But, by Sunday afternoon, I had spent the majority of the weekend worrying about the final render. I decided, “what the heck.. it’s worth a shot.” I wasn’t sure how fast it would be, or how much of a time suck it would be. I just dove right in, and surprisingly, the setup only took me 40 minutes. Just like that, we now had 8 cores, each that ran about twice the speed of any one we had.

And that was how we turned around a 48 hour render time, down to just 10 hours. In the end, we had some last minute speed bumps and had to get another 8 cores to finish the job. It was pretty scary kicking off your final render at 3am the morning of. But by 7am, most of the tiles had finished and we were in good shape. For our writeup (and the tutorial linked later), we simply said 10 hours mainly because we had forgotten the actual times. I can almost assure you that it would be closer to 5 hours though.

Final rendering of the nebula

What can I say, EC2 is amazing. The power is not just in the raw CPU, memory, or IO speed. Its mostly the fact that you get many cores to run on. Running 16 instances of pbrt at 100% CPU is truly a thing of beauty.

I wrote a brief tutorial on setting up pbrt to work with EC2. You can find it here

1 Comment

Hooray, I can register to comment on your blog now!

I think I was originally going to say that your blog sounds like it has a coherent purpose! Unlike mine.

Also, nice use of Apture =)

Leave a comment

Recent Entries

  • Which

    I haven't posted in a while. It's not that I've been busy or anything. I'm in the waning years of my education and thankfully, I...

  • Good Use

    I think my biggest gripe about my education has been how quickly I lose it all. Every now and then, I like to read research...

  • Facebook Sucks, Again

    Do you remember the last time [Facebook sucked](http://www.mrawde.com/blog/2009/03/facebook-sucks.html)? Facebook tends to suck every now and then, with the spikes coming whenever they change something. Well,...

  • Best Of

    It's getting near the end of the year which means its about the time people start going crazy with lists: * Christmas Lists * Best...

  • New York City

    I spent last weekend in New York City. It was my second time in New York but the first time I really got to see...

Close