Mesh/Mesh Server Weight
READ THIS FIRST
This is a preliminary design of an unimplemented cost algorithm. EVERYTHING is subject to change, and certainly will change, during the course of implementation.
Motivation
Different pieces of content affect server load in a variety of ways. An object that may appear simple to display and have a simple physics representation may cause significantly more load on a simulator than other pieces of content that appear more complex. Having all prims charged the same amount regardless of how much load they put on the simulator doesn't give content creators the proper feedback for optimizing their designs.
Concept
Server load from an object can be approximated by the number of messages that are generated from the object. The more object updates that a piece of content generates, the more data handling and processing the server has to do in order to keep all avatars in the area up to date with the object's current status. When prims are linked together into a single object, there are some per-object messages that need to be handled, and some per-prim messages. Additionally, some pieces of content are far more likely to generate more messages - such as scripted or physical objects
Equation
- Take a base cost per object
- Add a cost per prim in object * number of prims
- Multiply by an "active" multiplier if object is dynamic (physical or scripted)
Computing Cost
dynamic_multiplier = 2.0
static_multiplier = 1.0
per_prim_cost = 0.5
base_cost = 1.0
if there are any scripts or the object is physical, active_cost = dynamic_multiplier. Otherwise active_cost = static_multiplier.
Cost scaler is currently 1.0
Server weight(per prim) = cost_scalar * (active_cost * (per_prim_cost + base_cost / num_prims)