• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: SVC-1393
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Scouse Linden
Reporter: Ashrilyn Hayashida
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

Mono Beta - llRemoteLoadScriptPin can cause brief sim performance drop

Created: 31/Jan/08 08:22 PM   Updated: 28/May/08 10:00 AM
Return to search
Component/s: Performance, Scripts
Affects Version/s: Mono Beta
Fix Version/s: None

File Attachments: 1. Text File growth_mono_childprim.txt (24 kB)
2. Text File growth_mono_listener.txt (18 kB)

Environment:
Second Life 1.18.6 (77968) Jan 29 2008 20:06:25 (Second Life Release)

You are at 255454.1, 255202.0, 21.5 in Sandbox Wanderton MONO located at sim3000.aditi.lindenlab.com (8.2.33.226:12035)
Mono 1.18.6.77968

CPU: AMD (Unknown model) (1808 MHz)
Memory: 2048 MB
OS Version: Microsoft Windows XP Service Pack 2 (Build 2600)
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: GeForce 7900 GS/PCI/SSE2/3DNOW!
OpenGL Version: 2.1.1
LLMozLib Version: 1.1.0 (Mozilla GRE:1.8.0.12_0000000000)
Packets Lost: 42/66502 (0.1%)
Viewer Digest: 3bb91f71-43e8-7bd9-be82-8ffb1b7bdf10
Issue Links:
Relates
 

Linden Lab Issue ID: DEV-12984
Linden Lab Internal Branch: mono-based-on-release-87286


 Description  « Hide
If I use llRemoteLoadScriptPin on several prims (let's say 9), I will see a drop in sim performance for about a second. Time dilation goes down to somewhere from 0.71 to 0.91.
It doesn't seem to matter whether I have llOwnerSay() in or not, and it still happens even if I comment the llSetRemoteScriptAccessPin(0) at the start of the Updateme script.

Make an object with ten prims. In the root prim, place the root script.. in each child prim, place the Updateme script. Then, reset the root script.

// This script goes in only the root prim, any name is fine.
integer iPin = 12345;
default
{
state_entry()

{ llMessageLinked(LINK_ALL_CHILDREN,0,"contactupdater",""); }

link_message(integer sender_num, integer num, string message, key id)
{
if (message == "updateme") {
if (id != llGetKey()) { llOwnerSay("Updating:" + llKey2Name(id)); llRemoteLoadScriptPin(id,"Updateme",iPin,TRUE,123); //llSleep(3.0); // If this is uncommented it seems much, much better. }
}
}
}
// End of script

//This script should go in the root prim, and all child prims you use. Give the script this name: Updateme
integer iPin = 12345;
default
{
state_entry()

{ llOwnerSay("Started"); llSetRemoteScriptAccessPin(0); }

link_message(integer sender_num, integer num, string message, key id)
{
if (message == "contactupdater")

{ llSetRemoteScriptAccessPin(iPin); llMessageLinked(LINK_ROOT,0,"updateme",llGetKey()); llOwnerSay((string)llGetKey() + "," + (string)iPin); }

}

}
// End of script

Then reset the root-prim's script to test it out. Every time I do this, the sim time dilation drops in the statistics bar.

More editing: And now as I'm trying this I am seeing no sim performance drop.. Weird! It was happening every time I tried this out, and now it isn't dropping performance in the statistics bar, from what I can tell.
But I am seeing it with a more complex set of scripts of mine.. I'll attach them.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Ashrilyn Hayashida made changes - 31/Jan/08 08:27 PM
Field Original Value New Value
Link This issue Relates to SVC-1276 [ SVC-1276 ]
Ashrilyn Hayashida made changes - 31/Jan/08 08:34 PM
Description If I use llRemoteLoadScriptPin on several prims (let's say 9), I will see a drop in sim performance for about a second. Time dilation goes down to somewhere from 0.71 to 0.91.
It doesn't seem to matter whether I have llOwnerSay() in or not, and it still happens even if I comment the llSetRemoteScriptAccessPin(0) at the start of the Updateme script.



// This script goes in only the root prim, any name is fine.
integer iPin = 12345;
default
{
    state_entry()
    {
        llMessageLinked(LINK_ALL_CHILDREN,0,"contactupdater","");
    }
    link_message(integer sender_num, integer num, string message, key id)
    {
        if (message == "updateme") {
            if (id != llGetKey()) {
                llOwnerSay("Updating:" + llKey2Name(id));
                llRemoteLoadScriptPin(id,"Updateme",iPin,TRUE,123);
                //llSleep(3.0); // If this is uncommented it seems much, much better.
            }
        }
    }
}
// End of script


//This script should go in the root prim, and all child prims you use. Give the script this name: Updateme
integer iPin = 12345;
default
{
    state_entry()
    {
        llOwnerSay("Started");
        llSetRemoteScriptAccessPin(0);
    }
    link_message(integer sender_num, integer num, string message, key id)
    {
        if (message == "contactupdater")
        {
            llSetRemoteScriptAccessPin(iPin);
            llMessageLinked(LINK_ROOT,0,"updateme",llGetKey());
            llOwnerSay((string)llGetKey() + "," + (string)iPin);
        }
    }
    
}
// End of script

Then reset the root-prim's script to test it out. Every time I do this, the sim time dilation drops.
If I use llRemoteLoadScriptPin on several prims (let's say 9), I will see a drop in sim performance for about a second. Time dilation goes down to somewhere from 0.71 to 0.91.
It doesn't seem to matter whether I have llOwnerSay() in or not, and it still happens even if I comment the llSetRemoteScriptAccessPin(0) at the start of the Updateme script.

Make an object with ten prims. In the root prim, place the root script.. in each child prim, place the Updateme script. Then, reset the root script.

// This script goes in only the root prim, any name is fine.
integer iPin = 12345;
default
{
    state_entry()
    {
        llMessageLinked(LINK_ALL_CHILDREN,0,"contactupdater","");
    }
    link_message(integer sender_num, integer num, string message, key id)
    {
        if (message == "updateme") {
            if (id != llGetKey()) {
                llOwnerSay("Updating:" + llKey2Name(id));
                llRemoteLoadScriptPin(id,"Updateme",iPin,TRUE,123);
                //llSleep(3.0); // If this is uncommented it seems much, much better.
            }
        }
    }
}
// End of script


//This script should go in the root prim, and all child prims you use. Give the script this name: Updateme
integer iPin = 12345;
default
{
    state_entry()
    {
        llOwnerSay("Started");
        llSetRemoteScriptAccessPin(0);
    }
    link_message(integer sender_num, integer num, string message, key id)
    {
        if (message == "contactupdater")
        {
            llSetRemoteScriptAccessPin(iPin);
            llMessageLinked(LINK_ROOT,0,"updateme",llGetKey());
            llOwnerSay((string)llGetKey() + "," + (string)iPin);
        }
    }
    
}
// End of script

Then reset the root-prim's script to test it out. Every time I do this, the sim time dilation drops in the statistics bar.


More editing: And now as I'm trying this I am seeing no sim performance drop.. Weird! It was happening every time I tried this out, and now it isn't dropping performance in the statistics bar, from what I can tell.
But I am seeing it with a more complex set of scripts of mine.. I'll attach them.
Ashrilyn Hayashida added a comment - 31/Jan/08 08:37 PM
Growth script for prims, listener. growth_mono_listener.txt. Put this in the root prim.

Ashrilyn Hayashida made changes - 31/Jan/08 08:37 PM
Attachment growth_mono_listener.txt [ 14515 ]
Ashrilyn Hayashida added a comment - 31/Jan/08 08:37 PM
Growth script for prims. Child-prim script, growth_mono_childprim.txt. Put this in the root prim and all child prims.

Ashrilyn Hayashida made changes - 31/Jan/08 08:37 PM
Attachment growth_mono_childprim.txt [ 14516 ]
Ashrilyn Hayashida added a comment - 31/Jan/08 08:45 PM
So, for the prim growth scripts...
Make several prims, linked together.. I am trying five, currently.
Put the listener script in the root. (The normal name of the script is "Ashrilyn Growth (Listener)")
Put the childprim in all the prims, including the root. The name of the script should be set specifically to this: Ashrilyn Growth (Child prim)
Now enter this in chat: /12 updatescript
It will update the child-prim scripts with the copy from the root prim.

I think I see a drop in time dilation and sim FPS when it updates.


Ashrilyn Hayashida added a comment - 03/Feb/08 03:00 PM
I see there is a 3.0 second delay in llRemoteLoadScriptPin now.

It seems that it's also dependent on how many scripts are using llRemoteLoadScriptPin at the time.

I tried multiple objects with the update scripts from the original post, all at once.. each object with 4 prims (so it would update its 3 sub-prims when the updater script is reset).. I finally tried up to 9 objects, updating 3 sub-prims each. The sim Time Dilation went down to 0.63 at one point, though usually more like 0.9 or 0.8. It is fine after the scripts are done updating, pretty constant 1.00.

Doing a mass recompile of all the "Updateme" scripts.. in the prims that don't have the updater.. seems to have a similar effect. The Time Dilation will jump down and up to 1.0 again, until they're done compiling. Now that they're done recompiling, the time dilation is fine, constant 1.00.

In any case, after recompiling them all to LSL, I don't see a time dilation drop when the updaters update all their sub-prims with llRemoteLoadScriptPin.


Vektor Linden added a comment - 01/Apr/08 04:09 PM - edited
Confirmed present as of Mono beta refresh 6, but it is not 100%.

I never see the time dilation drop under LSL or on agni.

I also ran a remote pin loader that cycled 1000 times, and didnt see it happen.


lindenrobot made changes - 01/Apr/08 04:12 PM
Linden Lab Issue ID DEV-12984
Scouse Linden made changes - 03/Apr/08 04:48 AM
Assignee Scouse Linden [ Scouse Linden ]
Scouse Linden made changes - 03/Apr/08 07:29 AM
Priority Normal [ 4 ] Major [ 3 ]
Scouse Linden added a comment - 12/May/08 03:45 PM
We've made a change to the way we rez scripts which enables better sharing. This should hopefully mitigate the problem you have seen.

Please check this after our next deploy.


Scouse Linden made changes - 12/May/08 03:45 PM
Status Open [ 1 ] Fix Pending [ 10001 ]
Linden Lab Internal Branch mono-based-on-release-87286
Periapse Linden made changes - 14/May/08 02:05 PM
Link This issue is related to by SVC-1276 [ SVC-1276 ]
Periapse Linden made changes - 14/May/08 02:08 PM
Link This issue Relates to SVC-1276 [ SVC-1276 ]
Ashrilyn Hayashida added a comment - 15/May/08 07:37 PM
I'm trying my example scripts from my original post.
I made sure to compile them in mono.

In Sandbox Cordova MONO, I ran 18 updaters all at once (updating their 9 child prims). The time dilation is a pretty steady 1.0. I saw a very brief dip to 0.96 at one point during the remote script loads, but it probably wasn't even related at all.
In Sandbox Goguen MONO, I tried 14 updaters, updating their 9 child prims.. a few times. Time dilation looks fine.
I tried the 14 updaters again in Sandbox Newcomb MONO, and the time dilation looks all right there as well.

I tried 52 simultaneous updaters (each with 9 child prims to be updated) in Sandbox Goguen MONO, and the only time dilation drop was when I duplicated all the objects to test more.
It looks all right with 96 updaters, as well.. assuming they all reset at the same time when I used Tools, Reset Scripts on the root prims. Time dilation is 1. Again, the only drop was when I duplicated some of the objects to test more.
That's certainly a far bigger test than I tested originally, and it went fine. Good work.


Periapse Linden added a comment - 28/May/08 10:00 AM
passed QA

Periapse Linden made changes - 28/May/08 10:00 AM
Resolution Fixed [ 1 ]
Status Fix Pending [ 10001 ] Resolved [ 5 ]
Sue Linden made changes - 13/Nov/08 12:09 PM
Workflow jira-2007-12-22a [ 51651 ] jira-2008-11-14 [ 82165 ]
Sue Linden made changes - 13/Nov/08 04:41 PM
Workflow jira-2008-11-14 [ 82165 ] jira-2008-11-14a [ 90315 ]