Interest list and object caching update

In June 2012, Linden Lab announced the Shining Project, aimed at implementing a range of improvements over time designed to improve Second Life’s overall improvements. Part of this work was defined as “Object Caching and Interest Lists”, which the blog post described as “Intending to provide faster drawing of objects that are most likely to be redrawn later in a resident’s session or in the next session.”

Andrew Linden has been developing this project over the last several months, as reported in an ongoing basis in this blog. So far his work has primarily been focused on one side of the equation – the interest list code itself, which has been primarily server-side work.

However, with the most recent updates, Andrew has started looking at the “object caching” side of the equation, with changes made to how the server defines “cacheable objects” held by the viewer. With the next set of upcoming updates, this work is set to expand – and, for the first time within the project – see changes made to the viewer as well.

Current Issues

Before examining the forthcoming updates Andrew has been working on, a quick update on issues people have noticed in relation to interest lists changes.

"Missing" prims - not caused by the interest list work, but possibly exacerbated by it
“Missing” prims – not caused by the interest list work, but possibly exacerbated by it

“Missing” Prims: There has been a marked increase in prims in linksets failing to render, requiring a right-click (as one solution) to make them visible. As already reported in my week 15 project updates, this is not an interest list problem per se, although Andrew views the increase in occurrences of the problem as possibly being related to his changes in how the server defines “cacheable objects”. His investigations are continuing.

Objects out-of-view failing to produce sounds: If an object is initially out of your field-of-view, it is not sent to the viewer until such time as it does enter your field of view, and so sounds from it are not played. Andrew has not had time to look into this, but notes that it is “on his radar”

Finally, and while not a technical issue per se, Andrew reports that some users are still unhappy with the way the server sends updates from objects – particularly those close to your camera  – when they pass out of your field-of-view. While not entirely sure how this can be addressed, Andrew is considering what he calls a “keyhole idea”, wherein instead of just sending updates for objects in the camera’s current field of view  – the camera frustrum  – the server might send updates for all objects within a sphere of a set radius around the camera, as well is its frustrum. However, the problem with this idea is how big a radius should the sphere be? As Andrew notes, “Whatever it is set to probably wouldn’t work for everyone,” so he is still considering options.

Forthcoming Updates

Speaking at the Simulator User Group Meeting on Tuesday April 9th, Andrew revealed that the next Release Candidate submission of his interest list work is now ready. This comprises three elements:

  • Optimisations to reduce CPU cost of sending interest list-related data
  • Improved streaming through re-balancing the bandwidth used by the various UDP message categories
  • New “hints” the server will accept from the viewer to help it build the interest list for the viewer.

This work is aimed in part at making more intelligent use of the information on a region the viewer may already have locally cached from a previous visit, and it relies on both the initial information the viewer sends to the server on connecting to it, and what Andrew Linden calls “cache probes” sent by the server to the viewer. The approach, as explained by Andrew, basically works like this:

  • On connecting to a region for the first time (or after cache has been cleared), the viewer can “tell” the server it doesn’t have any information on the region, resulting in the server sending the viewer all the data it needs
  • If the viewer already has data relating to the region, the server send out a series of “cache probes” (lists of object identifiers – known as their local_id – and their versions), which the viewer then checks against its list of cached identifiers (local_id) and their versions
    • If the cached version number of an object’s local_id matches that sent by the server, the viewer doesn’t send any reply to the server, and the object is rendered directly from cache
    • If the cached version number does not match that sent by the server for a given local_id, it indicates the object has changed since the last time it was cached by the viewer, and a “cache miss” message is sent to the server in reply, which prompts the server to send the updated data, which the viewer then uses when rendering.

    Continue reading “Interest list and object caching update”

SL projects update week 15 (1): Server and viewer; materials and land impact

Upate April 10th: The BlueSteel / LeTigre package did not deploy as planned due to problems getting the updates completed in time. The Magnum package therefore deployed to all three RC channels.

Server Deployments Week 15

Second Life Server (Main) Channel

There was no planned deployment to the Main channel on Tuesday April 9th. The next scheduled deployment will be in week 16 (week commencing Monday April 15th). This was because there were bugs found in both of the RC releases from week 14 which the Lab wanted to resolve rather than having them propagate across the grid.

Release Candidate Channels

All three Release Candidate channels remain on the same releases as week 14, the only updates to be deployed on Wednesday April 10th being:

  • BlueSteel and LeTigre (currently running the new server-side AO capabilities) – should receive  a design change to improve compatibility between the new animation override system and other scripted objects that animate avatars (such as poseballs). This may be in response to a JIRA – BUG-2164 – being raised in relation to conflicts between the new AO capabilities and poseball systems
  • Magnum (currently running Monty Linden’s HTTP updates) – should receive a fix to correct a crash mode.

As always, there is a forum discussion thread for the week’s deployments.

SL Viewer Updates

CHUI – Communications Hub User Interface – Flickering Issue

The CHUI merge with the SL release viewer has brought with it an increase in the ATI/AMD issue of clickable links in the viewer’s UI flickering when anti-aliasing is enabled (BUG-1560, relating specifically to cards running the 12.10 (or later) Catalyst). This tends to happen with links in the chat window, but may also affect the selection box surrounding items in the inventory floater.

Those encountering the problem should consider raising a bug report.

Materials Processing – Land Impact

The most notable update to the SL viewer has been the release of a project viewer for materials processing. The viewer is available on the SL wiki Alternate Viewer page, and the code is available on Bitbucket. However, due to the work still going into the project, both come with caveats:

  • It is still very fragile
  • It is still subject to change in various ways
  • It should not be used on content you care about – particularly if said content is MODIFY / NO COPY
  • It is not recommended that TPVs integrate the code into their release viewer at the moment due to the fact the code will be changing (and there is not SSB merge as yet).

The release of the viewer has also brought with it something of a concern.

Qie Niangao has been carrying out further tests with the Materials Processing project viewer, and has come up with evidence that aspects of the material system can result in objects experiencing sudden (and potentially large) Land Impact value changes. Specifically use of the Alpha Masking and Emissive Mask options when working with alphas can have unexpected results – which is not to say that the result are not unexpected behaviour from LL’s perspective.

Qie describes his discovery in MATBUG-13, is which he offers the following exercise:

  1. Create a sphere. Hollow it 95%. Add a simple rotation script.
  2. Set the Alpha Mode to Alpha masking. Note that the land impact is now 43. “More info” shows the extra weight attributed to Physics.
Using the Alpha Masking and Emissive Mask Alpha Mode options with tortured prims (in this case a hollow sphere) into the "new" LI accounting system
Using the Alpha Masking and Emissive Mask Alpha Mode options with tortured prims (in this case a hollow sphere) can lead to a inflation of LI for an object

Qie goes on to note that cutting or squashing such an object can have an even more dramatic impact (path cutting the sphere in half, for example, can push LI to 1348, while squashing it almost flat can lead to an LI of 154).

Commenting on the JIRA, Maestro Linden notes:

This is expected behavior. When a material is added to an object, it is enrolled in new prim accounting. A 50cm, 95% hollow sphere has 43.5 physics cost when using a ‘prim’ physics representation. This high cost is caused by the high complexity physics shape. See https://wiki.secondlife.com/wiki/Physics_Optimization for a guide about how to reduce physics cost.

It is interesting to note, however that the same prim using Alpha Blending retains the same physic cost, but only generates a LI of 1. As Alpha Blending is essentially the way alpha layers are currently handled by the system at the moment, Qie’s theory – which I agree with – is that the existing system as been somehow “grandfathered-in” to the LI accounting system.

Continue reading “SL projects update week 15 (1): Server and viewer; materials and land impact”