On 10/5/12, Tim Hutton <
tim.h...@gmail.com> wrote:
> You're measuring the actual frames per second but it is showing you
> the 'computed frames per second' - the rate at which we could compute
> things if there was no rendering going on. Maybe that could be
> clearer.
>
> I find that the estimate of computed frames per second (cfps) is
> pretty good. Try it again with a timesteps_per_render of 6000 or so.
That's a big improvement! Clearly a lot of time is being spent on the rendering.
Since I like benchmarking, here are some tests to show this effect. In
each test, I have run that same pattern "Pearson 1993 type Theta.vti"
for 20 seconds, with the Timesteps per Render (here labeled "TPR") set
to the indicated number. Following the TPR are the Timesteps and
"frames per second" reported by Ready. Then I show the compute_time,
which is the timesteps divided by Ready's reported frames/sec. Finally
the "inefficiency", which is 20 (the actual elapsed time) divided by
the compute time.
TPR Timesteps: "frames/sec" compute_time inefficiency
100 3700 4617 0.801 24.9
200 7200 7127 1.010 19.8
400 14400 7088 2.032 9.84
800 26400 9865 2.676 7.47
1600 46400 9873 4.700 4.26
3200 75200 9981 7.534 2.65
6400 110400 9970 11.07 1.806
12800 142400 9993 14.25 1.404
In the final test, the screen was updated 11 times (142400 / 12800 =
11.125; this is only one update every 2 seconds). Since 14.25 seconds
were taken computing, that leaves 5.75 seconds for everything else,
which implies that every screen update took about 0.5 seconds! (To its
credit, it really is doing an awful lot in that 0.5 seconds: those two
3D surface plots are pretty impressive if you zoom in so they look
like rolling hills.)
By turning off "show displacement mapped surface" and "show multiple
chemicals", I can make Ready's display much quicker (and closer to
what my own R-D program does). I have reclaimed almost all of that
wasted time. For example:
TPR Timesteps: "frames/sec" compute_time inefficiency
3200 195200 9953 19.61 1.020
> [...] it is showing you
> the 'computed frames per second' - the rate at which we could compute
> things if there was no rendering going on. Maybe that could be
> clearer.
I think that since these numbers look like a benchmark, they need to
tell the truth. The grammatical subtlety of the word "computed" in the
phrase "computed frames per second" does not make up for this. It
should report the frames per second that are actually happening in
reality, not in some hypothetical world in which it is computing but
not displaying.
I would suggest that Ready should measure the total complete actual
elapsed time, rather than just measuring the time that passes while
waiting for an OpenCL call to complete (or whatever it's doing that
makes it measure only the compute time). Then the displayed frames per
second would be indicative of what the user is actually getting.
> When you increase the timesteps_per_render to approximately match the
> cfps you should get 1 rendered frame per second, more or less. If you
> *don't* get this behavior then let me know.
That's pretty close. In the figures above the asymptotic frames per
second is about 10000, and if I set Running Speed to 10000 it does in
fact update the screen a little less than once per second (the
discrepancy is because of the time taken for rendering).
> So the cause is that each iteration (just 100 timesteps) is very
> small, which means that 95% of the time is spent rendering. That's
> fine if you want a fast animation of small changes. (If you want
> faster rendering then turn off the displacement_mapped_surface, for
> example.) But to process quickly you would want to render less often,
> so increase the timesteps_per_render.
>
> Hope this helps clarify things. To avoid confusing others we could
> suppress the cfps estimation for short processing blocks (not sure
> how). Or we could change the description?