Simulator Physics Statistics

From Second Life Wiki
Revision as of 13:45, 4 August 2011 by Rand Linden (talk | contribs) (Text replace - 'Category:Performance' to 'Category:Performance and stability')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

General

First, if you are wondering "What is a physics engine?" check out Physics engine.

With Havok4 and the 1.20 Viewer some of the details about the physics engine are being exposed through the viewer Statistics panel (Ctrl-shift-1, or Statistics Bar in the View menu). These stats are in the Simulator section in two different places.

Physics Details

Physics details open.jpg

Directly below the Physics FPS statistic is a collapsed Physics Details section, which can be expanded by clicking on it. This section includes details about the physics system's Runtime Collision Control System and memory usage.

Pinned Objects

New to Havok 4 is a system called the Runtime Collision Control System (RCCS) which acts as a safety net to catch performance issues before they become crashes. One thing the RCCS does is freeze objects in place that would otherwise be dynamic or 'physical'. This is a last resort, objects will have their Level Of Detail (LOD) adjusted first (see below). If there are a lot of objects pinned then the physics system is, or was recently, experiencing some severe load.

Low LOD Objects

In addition to pinning objects, the RCCS can also adjust the physical Level Of Detail for shapes. This reduces the physical representation of the shape down to a box of approximately the same size as the original shape. The physical representation that is adjusted here is not the visible shape; the visible shape will not change. The RCCS will do this before pinning objects, however it still takes quite a bit of physics load to trigger this action.

Memory Allocated

Havok has its own dedicated memory and memory allocation system. For the most part this number will probably not change very much, if it gets too large it probably indicates there are a lot (really, a whole lot) of active collisions in the region. Some fluctuation in this number however is normal and expected. Editors note: The screen shot is from a completely empty developer region and may not be indicative of typical use.

Physics Details (ms)

Physics details time open.JPG

Inside the Time (ms) section of the simulator stats, below the Sim Time (Physics) section is a Physics Details (ms) subsection (click to expand) which breaks down where the physics engine is spending its time.

Physics Step

This is the majority of the physics work. This step involves moving objects and determining what collides with what. Most of the physics time will probably be spent here.

Update Shapes

Because updating the physical representation (again, not the viewed shape) of an object can be expensive we delay physical shape changes until the end of a frame and perform a few in bulk. As such they are their own potential time sink and get their own stat. Lots of objects changing their shape, including objects with child prims that move relative to their parent prim, will cause more time to be spent here. Given the nature of this subsystem this stat is expected to fluctuate and spike rather than maintain a constant level. However it shouldn't cause severe spikes.

Other

There are various other aspects related to the physics engine such as garbage collection of both memory and shapes. Anything not covered by the Physics Step or Update Shapes but falling inside the more general Sim Time (Physics) will fall in here. This subsystem will also show a more spiky behavior, rather than a constant level.