Architecture

Parallelism

mental ray has been designed to take full advantage of parallel hardware and achieve maximal performance benefit through concurrent execution of rendering tasks. On multiprocessor machines that provide the necessary facilities, it automatically exploits thread parallelism where multiple threads of computation access shared memory. No user intervention is required to take advantage of this type of parallelism.

mental ray is also capable of exploiting thread and process level parallelism where multiple threads or processes cooperate in the rendering of a single image but do not share memory. This is done using a distributed shared database that provides demand-driven transparent sharing of database items on multiple systems [1]. This allows parallel execution across a network of computers for distributed rendering.

mental ray also supports hyperthreading on capable processors if enabled. Hyperthreading, introduced on Intel Pentium 4 CPUs, is a technique that runs a second thread, including a separate process counter, on a single CPU chip to exploit otherwise idle execution units on the chip. Since this increases memory access frequency and reduces locality of reference, hyperthreading achieves a performance increase of only about 15-25%. Early machines with hyperthreading support are not very reliable, so most vendors disable hyperthreading in their hardware, BIOS, or operating system even though the CPU supports it. mental ray will not pull a license for a hyperthreading companion thread.

Distributed Rendering

A mental ray renderer that is started on a host to read or translate the scene, or is executed in application software it is integrated in, may be used as a master to utilize remote machines as slave renderers to contribute to the rendering of the current image and reduce the overall rendering time. mental ray needs to be available as a service on the remote machines to support distributed rendering.

The master is responsible for connecting to all other machines, assigning the rendering of a specific tile of the image to a slave, transporting the requested scene data to the remote host, and collecting the final results back on the master to write the complete image.

The slave is always tied to a specific master, message communication and resource usage is typically managed by the master. The machine of a slave may be used by another user at the same time; systems do not become unavailable for other jobs if used as slaves. However, running a mental ray slave on a host may degrade the performance of independent interactive application programs such as modelers on that host significantly. If a slave aborts rendering, the entire network participating in the render (the master and all slaves) will be notified and abort as well. mental ray periodically checks the health of all hosts on the master/slave network.

The list of remote machines for distributed rendering can be provided to the master in several ways.

Progressive Rendering 3.7

By default, mental ray computes images by splitting them into rectangular pieces called tiles which are rendered as parallel as possible to their final quality. This is well suited for distributed rendering of larger scenes at highest quality. It has the disadvantage that final images are available only after all tiles have been finished. The progressive rendering mode, in contrast, computes and delivers images at full resolution with incrementally progressing quality. This supports implementations of interactive rendering applications with mental ray for computationally expensive effects like ray tracing and indirect illumination. Best performance can be achieved for medium size models that completely fit into the memory of the machine. Since the first few rendered frames will already provide a visual impression of the final result users are able to work on their model simultaneously while rendering. Certain advanced rendering features are not supported to gain speed, see Known Limitations. This rendering mode can be enabled on the command line or with scene options.

[1] The parallel rendering technology which is required for the support of distributed shared databases has been originally developed by mental images as part of the ESPRIT Project 6173 Design by Simulation and Rendering on Parallel Architectures (DESIRE). See Herken94.

Copyright © 1986-2009 by mental images GmbH