Difference between revisions of "Mesh/Mesh Server Weight"

From Second Life Wiki
Jump to navigation Jump to search
Line 24: Line 24:


== Examples ==
== Examples ==
{| border="1" cellpadding="3" cellspacing="0"
{| border="1" cellpadding="3" cellspacing="0"
! align="right"| Prims
! align="right"| Prims
Line 32: Line 33:
! Non-Mesh
! Non-Mesh
Cost
Cost
|-
|-  
|align="right"|1
|align="right"|1
|align="center"|No
|align="center"|No
Line 42: Line 43:
|align="right"|1
|align="right"|1
|align="right"|1
|align="right"|1
|-
 
||||||||
|-
|-
|align="right"|10
|align="right"|10
Line 54: Line 54:
|align="right"|10
|align="right"|10
|align="right"|10
|align="right"|10
|-
 
||||||||
|-
|-
|align="right"|30
|align="right"|30

Revision as of 16:50, 2 February 2012

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

The server must track all pieces, or prims, in the region at all times. As such every individual piece, or prim, has a certain cost to the server regardless of its physical or visual complexity. There are, however, some factors that make an object more or less expensive for the server to track: in particular truly passive objects that are not scripted or physical are much easier to track than scripted or physical objects.

Concept

There are two basic goals for this cost:

  • The maximum server load from objects should not increase from mesh content.
  • Allow more passive content than before.

Equation

  1. Take the number of prims in the object.
  2. If the object contains no scripts and is not physical: divide by static_bonus
  • per_prim_cost = 1.0
  • static_bonus = 2.0
  • cost_scalar = 1.0

The static_bonus only applies if the object is not physical and contains no scripts.

Server weight per prim: cost_scalar * (per_prim_cost / static_bonus)

Examples

Prims Scripted Or

Physical

Server

Cost

Non-Mesh

Cost

1 No 1 1
1 Yes 1 1
10 No 5 10
10 Yes 10 10
30 No 15 30
30 Yes 30 30

How To Optimize

  • Consolidate mesh shapes such that the individual uploaded meshes are as complete as possible.
    • A more complete mesh will generally have a streaming cost of several PE and not be server bound.
  • Separate static content from dynamic content when possible.