The other night, as I was submitting some shots to my Backburner queue, I realized that I have never formalized a method for estimating render times for jobs that are in progress on my farm. Backburner does give some job info such as average task time and an estimate for how much remaining time before the job finishes. That’s not quite enough info to give me confidence in when I can expect things to finish up and regarding the “Remaining Time” estimate, I’m not sure I trust it without seeing my own numbers first. Obviously not every frame in a shot will take the same time to render due to whatever is in frame at that moment and or which node renders it, none the less I would like to calculate at least rough overall estimates of my own. I threw together a quick spreadsheet in Google Drive (Docs) to do this and thought I would share the formulas etc in case others find it helpful or want to see how it compares to their own render estimation method.
So first, what info are we trying to calculate? For me I am most interested in Estimated Total Job Running Time and Estimate Remaining Time. In the process of calculating those two values we will also get Estimate Average Time Per Frame for the farm as a whole which is a pretty good number to use as a benchmark of the performance of a shot.
Now, what info will we need to get our results? We will need at least these 4 values:
Time A = Job Start Date / Time (Note: time of the first frame assigned, not the job submission time)
Time B = Date / Time of Most Recent Consecutive Frame Rendered
Frame = Frame Number of Most Recent Consecutive Frame Rendered
Total Frames = Total Frames for the Job
Now for our basic math
1. First we need to know how long it’s been since our job started so that’s simple:
Time B – Time A = Elapsed Time
2. Second we need to know the average time per frame for the farm as a whole at this point in time:
Elapsed Time / Frame = Time Per Frame
3. Third we solve for Estimated Total Render Time for the Job:
Time Per Frame * Total Frames = Total Render Time
4. Fourth we need to estimate the remaining time before the job finishes:
(Total Frames – Current Frame) x Time Per Frame = Remaining Time
5. Lastly we want to estimate what time the job will finish rendering:
Time B + Remaining Time = Est. Finish Time
Building our Spreadsheet
Next let’s reconstruct the logic behind our basic math above into cell equations suitable for most spreadsheet programs like Excel, Google Drive and Open Office etc. This involves using some Date / Time cell formatting to assist in our calculations and a little special handling of the hours values Date / Time math returns.
The equation in step 1 for example would actually look like this:
(Time B -Time A)*24
*Note: All time values we enter will need to be Date / Time formatted like so.
DD:MM:YYYY HH:MM:SS
This allows us to take advantage of the spreadsheet’s own Date / Time math function which makes our life much easier when doing any math with Date / Time values. The *24 is needed due to the fact the Date / Time function returns it’s value as a fraction of a 24 hour day. So for example if it returns .5 that is equal to noon or 12 hours, 2 would be 48 hour and so on. Also when entering time use a 24 hour clock, no AM/PM.
The Cells
Above I have entered all of our requisite information in Row 2 then our math formulas, and thereby our results, are entered into Row 5. Row 7 is simply the formulas written out as you would enter them in the corresponding color cells, though to act as a math formula you would need to put an = sign in front of them. Regarding formatting I set any Date / Time fields to be just that and all other numbers are set to round to the nearest hundredth.
The Results
Now that we have a spreadsheet, lets work with it and see what it can tell us. So as you can see from the information I fed in the first frame of this job was assigned on Jan 16th 5:48 PM (Time A) and we checked on it the next morning at 7:13 AM (Time B). Our job is 1600 frames total and by the most recent consecutive frame completed by this time was Frame 1078. For results we see the job has been running 13.42 hours out of a total estimated render time of 19.92 hours. At this rate we should expect our job to finish around 1:43 pm that afternoon. Which I can happily say it in fact finished up around 1:30. Now I don’t show it in the spreadsheet but if you wanted to benchmark your farm you could do this:
=(A5*60)/D2
Which in this case would return .75 or you can read it as the render farm as a whole is spending .75 minutes per frame. Or do ((A5*60)/D2)*60 to read it as 45 seconds per frame. I find this a much clearer number than simply an average task time which is what Backburner gives you. Now if we have a ton of similar shots we already can estimate their render times off this job’s performance. So say the next 2 shots are 500 frames each, we can estimate we will need 12.5 hours to get through them as ((500×2)*.75)/60 = 12.5
Wasn’t That Fun?
Can’t believe I just wrote a blog post with a focus on spreadsheet formulas, how lame am I? I promise something more interesting next time, maybe even controversial! My “Workstation Shopping: Buy Name Brand or Build it” post will be up soon, bet that will be more juicy than Excel!
Tagged: Math, Render Farm, rendering, Scene Management
