Since ppsurf requires transfer of the pixel depth buffer (hence taking longer than ppspy) we will show the comparison in execution time between ppsurf and surf command.
When analyzing execution time of these two commands, one should differentiate two distinct time consuming processes: rendering (drawing a matrix data representation to an image buffer) and communication (data transfer between the nodes). For sufficiently large matrices (see analysis below) the communication overhead is the same or smaller for ppsurf than surf command. Rendering time is ALWAYS shorter for ppsurf since it's done in parallel by all the nodes while only the main display node performs rendering for surf command.
Assuming image size of 1024x1024 (a reasonable upper bound on image size on most display devices today), the amount of data (in bits) that is transferred between a single node and the main display node during ppspurf command follows the following equation:
Number of Bits = ((8 + 32) * 1024 * 1024) * N = 40MBits * N
where 8 bits are needed for pixel color, and 32 for pixel depth,
and N is the number of nodes in the cluster.
Note that the number of bits is independent of the matrix
size. Also, in the calculation above we assume that the entire
image buffer is transferred, i.e. no bounding box calculation is
performed (see Rendering portion of this report).
For surf command number of bits transferred is the function of the matrix size, but not the number of nodes:
Number of Bits = 64 * nrows * ncols
where 64 is the number of bits required for double representation.
For a machine with 6 nodes and matrix size of 2048x2048 total number of bits transferred to the main node is approximately equal. The rendering time, however, is greatly reduced for ppsurf command as it's done in parallel. The following plot shows the time (in seconds) that it takes to execute ppsurf and surf commands of the same distributed matrix for three different matrix sizes(1024x1024, 2048x2048, 4096x4096) on the cluster with 8 nodes:
Clearly, ppsurf command is superior in execution time for matrix sizes as small as 2048x2048.
As the matrix size increases the dominant factor in the execution time of ppsurf is no longer the image size. We ran experiment for three different sizes of "peaks" matrix: 1024x1024, 2048x2048, 4096x4096 and three different image sizes: 256x256, 512x512 and 1024x1024 and arrived to the conclusion that for matrices larger than 4096x4096 most of the computation time is spent in rendering rather than communication and data transfer. The following plot shows the results of this experiment: