Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Question on Script Performance

Cyrus Odets
Registered User
Join date: 5 Oct 2005
Posts: 51
07-29-2006 15:14
Greetings all,

I'm hoping there's a script performance/sim performance guru out there that can give me a little advice :)

In SL I work in 'rented land' from a privately owned sim, on a large plot of land. Over the past months I've never had any 'script performance' problems or noticed any sort of significant script 'lag' (For lack of a better term).

However, since around the time of the last SL updates (The past week...maybe 2) I've been having alot of problems scripting anything where the prims of a larger object need to be 'synched' up or anything based on 'time'. For example, child prims that used to move in 'unison' now come apart ever so slightly when they move. Also for example, an object that 'moves' every half second or so no longer moves every half second. For 10 seconds it might move correctly, then for the next 30 seconds it might be all crazy-eratic....slowing to as much as one movement every 3 seconds and even appearing to come to a dead stop completely...then out-of-the-blue...starting up again. I've been scripting for quite a while now and am well aware that sim performance will vary a bit.....but I've never seen it have such a 'noticeable' impact on my scripts.

My question is this...

Do you think this is due to recent Linden activities with the grid and SL in general?

Or do you think that the performance of the sim that I live in has decreased?

I've noticed new neighbors in my sim....and I have NO idea what effect their own gizmos and gadgets are having on the sim.

Which is more likely? How would you determine this?

I can talk to my landowners (Who are really great and friendly folks) and if they discovered someone was running some sort of 'hog' device on their sim....they'd stop it right away. However, I don't want to take advantage of their good-nature and 'complain' about something that has nothing to do with a neighbor...and is instead the fault of recent linden updates?

I'm not exactly sure how to read all the information...but I've been watching the CTRL+SHIFT+1 window and looking at the script performance entry. I'll see it go from 20,000 ips....to 18000 ips...then drop down to 6000 ips for a few seconds...then back up to 20000 ips. I'm not sure if that information would help you to give me advice or not.

Thanks ahead of time for your advice :)

--
Cy
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
07-29-2006 22:49
From: Cyrus Odets

My question is this...

Do you think this is due to recent Linden activities with the grid and SL in general?

Or do you think that the performance of the sim that I live in has decreased?

I've noticed new neighbors in my sim....and I have NO idea what effect their own gizmos and gadgets are having on the sim.

Which is more likely? How would you determine this?



I think something has changed in your sim. Could be a dramatic increase in the number of scripts or excessive use of physical objects.

It sounds like you're experiencing time dilation problems. When the server gets over-worked, it is unable to keep up with everything that needs to be done.

Time dilation ranges in value from 0 to 1. When it is 1, it means that everything is fine. A lower number indicates that the server is having trouble keeping up. Symptoms of low time dilation are things like eratic movement of both objects and avatars.

If you see that your sim is consistently having time dilation numbers less than 0.9, then there's a significant problem. In that case, I'd suggest using Live Help to ask a Linden to come look at it.
_____________________
Prim Composer for 3dsMax
-- complete offline builder for prims and sculpties in 3ds Max
http://liferain.com/downloads/primcomposer/

Hierarchical Prim Archive (HPA)
-- HPA is is a fully-documented, platform-independent specification for storing and transferring builds between Second Life-compatible platforms and tools.
https://liferain.com/projects/hpa
Cyrus Odets
Registered User
Join date: 5 Oct 2005
Posts: 51
07-30-2006 13:05
Thankyou so much for the advice! I was hoping someone would lend a hand as its a sticky situation because the folks who I rent from are fabulous people and they are always quick to respond to renter prolems. However I don't think they know very much about scripts, performance, etc.

One further question with regards to time dilation. Are the results in the CTRL+SHIFT+1 window and/or the results returned from using a script to output the time dilation...are they accurate (at least to the best of your knowledge?).

Thanks!
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
07-30-2006 15:40
From: Cyrus Odets

One further question with regards to time dilation. Are the results in the CTRL+SHIFT+1 window and/or the results returned from using a script to output the time dilation...are they accurate (at least to the best of your knowledge?).


It's a good overall metric, but it won't tell you specifically what is wrong. It tends to bounce around a lot in a loaded sim. So, it might be 0.85, then 0.35, then back to 0.78. But if it's consistently low, it definitely means there's a problem in the sim.

The time statistics are most useful for determining what the problem is. This tells you how many milliseconds it takes to process scripts, physics, etc. in one frame. Sims try to process 45 frames per second, so if the Total Frame Time goes above 22ms (1 second/45), then performance will suffer. You can look at the individual time statistics to see where it's spending most of it's time.

But even that won't tell you exactly what's wrong. Scripts are the problem if Script time is the largest component of Total Frame Time, but you still don't know which scripts are the trouble makers.

That's where you need a Linden.
_____________________
Prim Composer for 3dsMax
-- complete offline builder for prims and sculpties in 3ds Max
http://liferain.com/downloads/primcomposer/

Hierarchical Prim Archive (HPA)
-- HPA is is a fully-documented, platform-independent specification for storing and transferring builds between Second Life-compatible platforms and tools.
https://liferain.com/projects/hpa
Cyrus Odets
Registered User
Join date: 5 Oct 2005
Posts: 51
08-01-2006 20:07
Thanks!

I think I follow most of that so far.

In my CTRL+SHIFT+1 window I don't see a "Script Time" heading though. I see...

Time Dilation, Sim FPS, Phyics FPS, Agent Updates/Sec, Active Objects & Scripts, and Script Perf. There is a "Time (ms)" heading at the bottom but no data is listed beside it.

On the other hand...let me throw this at you.

I wrote a quick script to collect some data on Time Dilation. This script tests the Time Dilation each second and collects some statistics on it. Its been running for a few days now and below is a display of the data it collected.

Its just something quick and dirty I put together so that I can figure out what is going on. Nothing fancy...or incredibly scientific.

Also....It has a 'verbose' option to tell me in ownersay what the time dilation value is anytime it drops below .9.

So to qualify the numbers below...I should tell you that I almost never get time dilations below .9...but still high...like at .85 or some such. Its almost always either hovering at high numbers above .9...or hovering and staying at low numbers....at .3 to .5.

So...the 'averages' you see below are 'extremes'. Its always either high or low..and it tends to 'hover' at the high or low number for extended periods instead of just...say...dropping to .3 for a few seconds then popping back up again. It will run with high numbers for a 'while'....then when it drops low...it will stay low for quite some time.

Anyway...I'm not sure if this will tell you anything at all or not...but I thought perhaps I'd post the info here in case you are able to gain more useful information from it than I do...as it seems like you know alot more about performance stuff than I do when it comes to how a sim is running.

Thanks again!

[19:59] Time Dilation Monitor: TIME DILATION
[19:59] Time Dilation Monitor: Monitor started: 2006-07-30T21:40:37.206749Z UTC
[19:59] Time Dilation Monitor: Displaying monitor data through 2006-08-02T02:59:58.833680Z UTC
[19:59] Time Dilation Monitor: Monitor active = 187302 seconds
[19:59] Time Dilation Monitor: Seconds below 0.9 Time Dilation = 9078 seconds
[19:59] Time Dilation Monitor: Seconds at or above 0.9 Time Dilation = 178224 seconds
[19:59] Time Dilation Monitor:
[19:59] Time Dilation Monitor: Percentage that region Time Dilation is at or below 0.9:
[19:59] Time Dilation Monitor: 0.048467 %
[19:59] Time Dilation Monitor:
[19:59] Time Dilation Monitor: Average Time Dilation: 0.971668
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
08-01-2006 20:18
From: Cyrus Odets
Thanks!

I think I follow most of that so far.

In my CTRL+SHIFT+1 window I don't see a "Script Time" heading though. I see...

Time Dilation, Sim FPS, Phyics FPS, Agent Updates/Sec, Active Objects & Scripts, and Script Perf. There is a "Time (ms)" heading at the bottom but no data is listed beside it.


if you click on the "Time (ms)" it will expand to show the time statistics.
_____________________
Prim Composer for 3dsMax
-- complete offline builder for prims and sculpties in 3ds Max
http://liferain.com/downloads/primcomposer/

Hierarchical Prim Archive (HPA)
-- HPA is is a fully-documented, platform-independent specification for storing and transferring builds between Second Life-compatible platforms and tools.
https://liferain.com/projects/hpa
grumble Loudon
A Little bit a lion
Join date: 30 Nov 2005
Posts: 612
08-02-2006 01:12
LL has admited that there is a memory leak afecting some sims.

The result is that the "Image time" increases.

The sim drops "Script perf" in order to compensate.

I've had script problems with any script that relys on messages ariving in any kind of order.

I've also had problems with
1. llGetOwner()
2. llSensor()
3. Data server event not fireing when it should or with the wrong key.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
08-02-2006 01:21
If it hovers at a low like that for a period, there's something out there hammering your sim.

There are several options.

If it's tied to new avies arriving it's probably images time as they load the sim. If the sim is really image heavy this can take a long, long time, particularly if several arrive together IME.

If your physics time spikes up and stays up - crashing vehicles, heavy colliders etc. then you've got something there.

It shouldn't be your script time that does this, the changes a while ago for throttling fps and limiting script time are meant to stop that. They're not 100% perfect at this, but it's rare that it's much more than 2/3 frames (so potentially < 1/15 of a second) that the script time runs high enough for a sim to TD for scripts.

I don't think I've ever seen one of the other metrics high without images/physics being high, but I guess I don't check on the rare occasions I am in a club, where I guess AV time could be high too.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog