Tuesday, December 22, 2009

Eye on the Blog: Script Limits

Second Life is a rich and engaging interactive world due to scripts. Every time you open a door, fly a plane, sail a boat, use a vending machine or dance in a night club a Resident authored script is interpreting your interactions to make things happen.

Unfortunately the current scripting system does not include any mechanism to limit the number of scripts that can be added to the world or attachments on avatars. This allows both malicious Residents to cripple simulators by running huge numbers of scripts and well meaning Residents to accidentally run more scripts than a simulator can cope with.

When too many scripts are running in a region the server simulating that region runs out of memory, dramatically increasing the lag experienced in all regions running on the same server. This is especially noticeable in homestead regions as more homesteads run on a single server. In addition, when an avatar with many scripted attachments enters a region the simulator has a lot of work to do setting up the scripts to run in the new process, causing a lag spike that can be noticed by all Residents using that region.

At Linden Lab we are working with Mono developers to reduce the lag spikes experienced when scripts enter a region, adding scripting functions that allow more efficient scripts to be authored and building a system for limiting the resources used by scripts on a per m^2 and per avatar basis.

We're also working very hard to analyse the current memory usage by scripts across the grid to determine the best values for script limits that minimise the lag caused by simulators running out of memory while affecting as few Residents as possible.

We're planning to make script memory usage along with our proposed script limits visible to all Residents for an extended period before enforcing any limits. This will give us time to gather feedback on the proposed limits and identify any situations where we're going to be imposing unreasonable restrictions and give will give you time to compare your usage against the proposed limits, give us feedback and have plenty of time to prepare.

I'm looking forward to working with you all towards a lag free and more efficient Second Life in 2010.

Posted by Babbage Linden in the Second Life Blog.

Read comments under the blog post Here.

0 comments:

Post a Comment

Blog Archive