Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

UNANNOUNCED Scripting Limits? ARE YOU KIDDING ME?????

Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
10-13-2009 11:32
From: Arielyn Docherty
Now we also have things in our Christmas display, like blinking lights and trees. Do those have ANYTHING to do with what is apparently the issue on our sim?? Are those scripts resource hogs?
Depends very much on how they are scripted. If the lights are blinking on and off because you're calling llSetLinkPrimitiveParams to turn them on and off on a timer, then that's using resources every time the event fires, since the sim has to change the properties of all the light prims -- not a vast amount, one would hope, and probably not worth your customers' worrying about when they get the tree home, but certainly worth your thinking about, given you have a lot of them and you're operating under constraints anyway.

In contrast, if you're making the lights blink using either a particle effect or an animated texture, that's not using any script time at all (other than a minimal amount when you turn the systems on and off).
Drongle McMahon
Older than he looks
Join date: 22 Jun 2007
Posts: 494
10-13-2009 11:35
I just had a look with [Advanced|Show Updates] checked!!!
Just have a look at (a) the lucky dip pond!, (b) the pigeons!!, (c) the apples!!!

I would get rid of those apples.

My ping is 200ms, alas, and the changes in velocity are so frequent and so many that I see much rubber-banding movement of the ducks and flying birds* (that's to say the updates are late and so snap the birds back to a previous position. The ducks keep shooting off over the edges of the pool the suddenly snatch back onto the water.) I think there is just too much going on here for someone with my quality of connection. I can see that the birds would be very nice with a much faster connection.

*improved after 15 minutes (once all the textures are loaded, I guess, less badwidth competition), but still there a bit.
Arielyn Docherty
I DO Believe in Santa!
Join date: 3 Jul 2007
Posts: 625
10-13-2009 11:39
From: Drongle McMahon
I just had a look with [Advanced|Show Updates] checked!!!
Just have a look at (a) the lucky dip pond!, (b) the pigeons!!, (c) the apples!!!

I would get rid of those apples.

My ping is 200ms, alas, and the changes in velocity are so frequent and so many that I see much rubber-banding movement of the ducks and flying birds (that's to say the updates are late and so snap the birds back to a previous position. The ducks keep shooting off over the edges of the pool the suddenly snatch back onto the water.) I think there is just too much going on here for someone with my quality of connection. I can see that the birds would be very nice with a much faster connection.


THanks....we turn the falling fruit trees off, but someone comes back and turns them on EVERY time...lol. I will see about having that script reworked.
Arielyn Docherty
I DO Believe in Santa!
Join date: 3 Jul 2007
Posts: 625
10-13-2009 11:41
From: Innula Zenovka
Depends very much on how they are scripted. If the lights are blinking on and off because you're calling llSetLinkPrimitiveParams to turn them on and off on a timer, then that's using resources every time the event fires, since the sim has to change the properties of all the light prims -- not a vast amount, one would hope, and probably not worth your customers' worrying about when they get the tree home, but certainly worth your thinking about, given you have a lot of them and you're operating under constraints anyway.

In contrast, if you're making the lights blink using either a particle effect or an animated texture, that's not using any script time at all (other than a minimal amount when you turn the systems on and off).


The blinking trees are really just a timed texture changer that rotates between three textures in the object's contents.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
10-13-2009 11:47
A "timed texture changer" is not the same thing as an animated texture. An animated texture operates entirely on the client, all the server does is send parameters to the client once. A timed texture changer runs the script and sends a new texture to the client every time it changes.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Phil Deakins
Prim Savers = low prims
Join date: 17 Jan 2007
Posts: 9,537
10-13-2009 12:17
There is one thing to keep in mind. The frame time that scripts use is flexible, and is according to what other time is needed in the frame. So doing things to reduce the Physics time may not see much in the way of total time improvement, because the scripts may take up the released time. Even so, it's good for sim performance to try and reduce Physics and scripts times as much as possible.
_____________________
Prim Savers - almost 1000 items of superbly crafted, top quality, very low prim furniture, and all at amazingly low prices.

http://slurl.com/secondlife/Seymour/213/120/251/
Sling Trebuchet
Deleted User
Join date: 20 Jan 2007
Posts: 4,548
10-13-2009 12:21
From: Arielyn Docherty
So what you're telling me is that the number of scripts is irrelevant--it's simply the number of MOVING birds/objects that is the issue? Does this include simple rotating items that might be physical?


No.
Everything is relevant.
My point was about the interpretation of the View Statistics numbers.

On Mainland, we get very little to help us determine what factors are impacting sim performance. Even those few metrics apply to the entire sim, and not to individual parcels.
The programming of your moving physical animals impose separate types of load
1) Sim physics - that the sim server expends some of the time frame on
2) Script execution - that the sim server expends some of the time frame on
And then you have textures and prim information being uploaded to client viewers

It's all a balancing job. The WIKI page indicates some guideline figures.
The Physics load on your sim is apparently about twice the guideline. This isn't necessarily a huge problem depending on what else in the sim is consuming resources.

If you had your own region, you could trade higher physics time for less time spent on other tasks - just reduce the amount of 'normal' scripted objects --- and make visitors sit on an object to check the script load imposed by their attachments :)

However, if your large collection of physical moving objects share a mainland sim with neighbours who have a lot of heavy 'normal' scripts running, then the sim is going to suffer.
_____________________
Maggie: We give our residents a lot of tools, to build, create, and manage their lands and objects. That flexibility also requires people to exercise judgment about when things should be used.
http://www.ace-exchange.com/home/story/BDVR/589
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
10-13-2009 12:34
From: Argent Stonecutter
...A timed texture changer runs the script and sends a new texture to the client every time it changes.

Or at least sends the uuid of the new texture, which the client can download if it doesn't find it in cache.
_____________________
Sick of sims locking up every time somebody TPs in? Vote for SVC-3895!!!
- Go here: https://jira.secondlife.com/browse/SVC-3895
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Briana Dawson
Attach to Mouth
Join date: 23 Sep 2003
Posts: 5,855
10-13-2009 12:40
From: Arielyn Docherty
THanks....we turn the falling fruit trees off, but someone comes back and turns them on EVERY time...lol. I will see about having that script reworked.


Edit them. Go to the TOOLS menu and at the bottom select "Set Scripts to Not Running in Selection". That will turn off the tree's and no one will be able to turn them on except you or someone with mod rights on your items.
_____________________
WooT
------------------------------

http://www.secondcitizen.net/Forum/
Sling Trebuchet
Deleted User
Join date: 20 Jan 2007
Posts: 4,548
10-13-2009 13:03
From: Phil Deakins
There is one thing to keep in mind. The frame time that scripts use is flexible, and is according to what other time is needed in the frame. So doing things to reduce the Physics time may not see much in the way of total time improvement, because the scripts may take up the released time. Even so, it's good for sim performance to try and reduce Physics and scripts times as much as possible.


Yup.

At the end of the (expanded) Time section of View / Statistics Bar, there a "Spare Time" entry.
That's the part of the sim frame in which the sim has nothing demanding time.
Once that gets to 0, things are going to be traded off in order to keep the sim environment running.
It seems that the first thing to be traded off will be the user scripts. Execution will slow down. Click on a door and it sits there glowering at you in an uncooperative manner.


Right beside me in Leuran, thare are a number of empty Linden ocean sims.
900 prims used out of 15,000 - just seaweeds.
Spare Time is 21 to 22ms - just 1ms short of the Total Frame Time
The 1ms must be mostly me just hanging there :)
I could bring along an Ark or two or three of your animals no problem.





This raises an observation:

The wiki page talks of a value of 22ms being a sort of warning level for sim load.
From: http://wiki.secondlife.com/wiki/Statistics_Bar_Guide


# Total Frame Time - The sum of all time values listed below it, this measures how much time it takes the simulator to run everything that the simulator is trying to do each frame.

* < 22 ms - The simulator is healthy, everything is running as fast as it can, and more scripts can be added without reducing the performance of individual scripts.
* approx. 22 ms - The simulator is healthy, but there are probably a lot of scripts and agents on the simulator, meaning that script execution is being slowed down in order to maintain the simulator frame rate.
* > 22 ms - The simulator is experiencing severe load, either due to physics or a large number of agents, such that even by slowing down script execution it is impossible to compensate. The simulator frame rate has been reduced as a result.


Given that empty unloaded sims are showing just *over* 22ms valus for thei, the dire warnings re 22+ can only apply where the Spare Time is 0
_____________________
Maggie: We give our residents a lot of tools, to build, create, and manage their lands and objects. That flexibility also requires people to exercise judgment about when things should be used.
http://www.ace-exchange.com/home/story/BDVR/589
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
10-13-2009 13:25
From: Arielyn Docherty
The blinking trees are really just a timed texture changer that rotates between three textures in the object's contents.
Like Argent said, a timed texture changer -- calling llSetLinkTexture every time the timer event fires -- isn't the same thing as an animated texture.

It's not, in itself, particularly profligate of sim resources and, in the normal course of events, not something I'd lose much sleep over -- "OMG, mustn't buy that Christmas Tree 'cos it uses a timed texture changer and that's LAGGY!!!" -- but since you've got a lot of them out and since you're looking to economise on script resources, redoing them to use animated textures would be a way of making some -- possibly small, but every little helps -- savings.

What else to check ... visitor counters that use llSensorRepeat and poseballs that all listen on channel 1 are the work of the devil!
Monique Binstok
Registered User
Join date: 5 May 2008
Posts: 87
10-13-2009 13:35
I've been reading this thread with interest as I have many of Arielyn and Mickey's beautiful birds flying around on my island. When I go into Region / Estate debug tools not surprisingly most of the top offenders (other then my own Avatar) in both the "Top Scripts" and "Top Colliders" categories are birds or some kind of moving critter.

I noticed that two of the top colliders where a couple of Mickey's humming birds that I had rezed together at the same location. When I removed one of the humming birds the other was no longer on the colliders list. I also noticed that on objects I had created or had permissions on that if made phantom they also were removed from the colliders list.

As a low traffic Island owner how concerned need I be with the Total frame time showing in the statistics bar? I'm showing around 22.3 ms with debug showing 418 scripts taking a total of 3.2 ms. I realize that even as a private estate owner that I share server space so at what point should I start making adjustments for the sake of the others on my server?
Treasure Ballinger
Virtual Ability
Join date: 31 Dec 2007
Posts: 2,745
10-13-2009 13:40
From: Monique Binstok
I've been reading this thread with interest as I have many of Arielyn and Mickey's beautiful birds flying around on my island. When I go into Region / Estate debug tools not surprisingly most of the top offenders (other then my own Avatar) in both the "Top Scripts" and "Top Colliders" categories are birds or some kind of moving critter.

I noticed that two of the top colliders where a couple of Mickey's humming birds that I had rezed together at the same location. When I removed one of the humming birds the other was no longer on the colliders list. I also noticed that on objects I had created or had permissions on that if made phantom they also were removed from the colliders list.

As a low traffic Island owner how concerned need I be with the Total frame time showing in the statistics bar? I'm showing around 22.3 ms with debug showing 418 scripts taking a total of 3.2 ms. I realize that even as a private estate owner that I share server space so at what point should I start making adjustments for the sake of the others on my server?



That 'seems' high to me but my understanding is pretty limited. I also have some of Arielyn and Mickey's birds on my public land, and, my residents have stuff too from them on their parcels. I run approximately slightly less than 1,000 scripts on the debug menu regularly, and a total frame time of anywhere from 6.0 to say, 9.0. If I have an event on the sim with a lot of avatars, bling, etc, it will shoot up to maybe 15 or so. I thought I was a little on the low side, which is a good thing I guess.
Treasure Ballinger
Virtual Ability
Join date: 31 Dec 2007
Posts: 2,745
10-13-2009 13:46
From: Treasure Ballinger
That 'seems' high to me but my understanding is pretty limited. I also have some of Arielyn and Mickey's birds on my public land, and, my residents have stuff too from them on their parcels. I run approximately slightly less than 1,000 scripts on the debug menu regularly, and a total frame time of anywhere from 6.0 to say, 9.0. If I have an event on the sim with a lot of avatars, bling, etc, it will shoot up to maybe 15 or so. I thought I was a little on the low side, which is a good thing I guess.


Totally misread your post so response is incorrect, NVM, so sorry, mea culpa just ignore. :o
Darkness Anubis
Registered User
Join date: 14 Jun 2004
Posts: 1,628
10-13-2009 13:55
When I had a private island I was completely anal about all types of lag and was constantly watching the time on everything. Some things I learned along the way

When the total SCRIPT time gets around 11 you need to look at pruning back scripts or at least not adding anymore. That number straight from a linden I talked to back then. 16 being the cap you never want to cross. The concept is script time should never be more than HALF the total time.

Physics should be hard capped at 5. That said the lower you can go below that cap the better for the sim.

Keep the number of textures and sizes of textures to a minimum to keep the images time as low as possible and make for easy rezzing for your visitors.

Remember your visitors are going to land wearing God knows what and if your sim doesnt have the spare time to cope with it things WILL grind to a halt. Back the in the early days of the multigadgets of various kinds I used to be able to tell the instant someone landed wearing one. The times would jump 2 ms or more.

The results: We built venice. Some of the pictures are in my sig. CLocktower worked and chimed. Streetlights were particle and went on and off with day and night. We had 3 Sex ball/furniture shops on the sim + 1 regular furniture shop + a clothing shop + a huge texture shope + a house lot. We lived above it on a huge mega prim platform. We had ZERO lag....EVER.

My FPS was in the 80s. My partners fps on his much less powerful machine was well into the 40s. People would come to sit in the parks and change clothes because of the instant rezzing LOL. Lindens would come by to see how we did it.

It can be done. It IS ALOT of work. But those are the Hard numbers I ran on. How much fudge room you allow yourself? Well depends on what you and your neighbors are willing to live with.

Hope this helps some

Dark
_____________________
Treasure Ballinger
Virtual Ability
Join date: 31 Dec 2007
Posts: 2,745
10-13-2009 14:00
From: Darkness Anubis
When I had a private island I was completely anal about all types of lag and was constantly watching the time on everything. Some things I learned along the way

When the total SCRIPT time gets around 11 you need to look at pruning back scripts or at least not adding anymore. That number straight from a linden I talked to back then. 16 being the cap you never want to cross. The concept is script time should never be more than HALF the total time.

Physics should be hard capped at 5. That said the lower you can go below that cap the better for the sim.

Keep the number of textures and sizes of textures to a minimum to keep the images time as low as possible and make for easy rezzing for your visitors.

Remember your visitors are going to land wearing God knows what and if your sim doesnt have the spare time to cope with it things WILL grind to a halt. Back the in the early days of the multigadgets of various kinds I used to be able to tell the instant someone landed wearing one. The times would jump 2 ms or more.

The results: We built venice. Some of the pictures are in my sig. CLocktower worked and chimed. Streetlights were particle and went on and off with day and night. We had 3 Sex ball/furniture shops on the sim + 1 regular furniture shop + a clothing shop + a huge texture shope + a house lot. We lived above it on a huge mega prim platform. We had ZERO lag....EVER.

My FPS was in the 80s. My partners fps on his much less powerful machine was well into the 40s. People would come to sit in the parks and change clothes because of the instant rezzing LOL. Lindens would come by to see how we did it.

It can be done. It IS ALOT of work. But those are the Hard numbers I ran on. How much fudge room you allow yourself? Well depends on what you and your neighbors are willing to live with.

Hope this helps some

Dark


Wow, FPS in the 80s??? What must that be like? I've never experienced it! I've had it up to mid 30's or so and thought that was wonderful.
Ciaran Laval
Mostly Harmless
Join date: 11 Mar 2007
Posts: 7,951
10-13-2009 14:07
I'm not convinced about this spare time stat, it's 0 everywhere I go.
Sling Trebuchet
Deleted User
Join date: 20 Jan 2007
Posts: 4,548
10-13-2009 14:14
From: Ciaran Laval
I'm not convinced about this spare time stat, it's 0 everywhere I go.



Try an empty Linden Ocean sim
_____________________
Maggie: We give our residents a lot of tools, to build, create, and manage their lands and objects. That flexibility also requires people to exercise judgment about when things should be used.
http://www.ace-exchange.com/home/story/BDVR/589
Phil Deakins
Prim Savers = low prims
Join date: 17 Jan 2007
Posts: 9,537
10-13-2009 14:25
The problem is (sometimes) that, although the spirit may be willing, the realities are sometimes weak. A small example that's been mentioned a couple of times is light. Lights should light up their surroundings and I don't think that particles can do that. So I wouldn't swap light for particle simulations.

Until recently, I'd have said that I've never seen any Spare Time in the sim where my store is. But a couple of weeks ago I did spot something like 0.01ms in that box. It lasted for 1 second and I haven't seen it since :)

I get inspired once in a while to see if I can do something about it. One time I changed all the scripts to Mono, but that made things worse, so I changed them back again. I've managed to reduce the number of running scripts by about 1000-1500 or so but I haven't made even a small a dent on the Total Frame Time. The trouble is, I have a very large store, with a great deal of the thousand items or so running scripts. I think I got them down to a minimum considering the way I sell my items (copies of the displayed items - not boxed), and all items on display, rather than examples plus photos. When other people aren't increasing the number of running scripts, I got them down to not much more than 4000, which is very good compared to the number there were when I started attacking the Script Time.

That was all done a while back. This thread has inspired me again to try and come up with ways of reducing the Script Time. I'll try, but the problem is that I've no way of knowing about other parcels. I own most of the sim but there are a couple of parcels that could be permanently using a fair amount script time. It's difficult when you *have* to run a lot of scripts. I have had a Linden here to check top scripts, but he said there was nothing outstanding, so I guess the Script Time is really down to me.
_____________________
Prim Savers - almost 1000 items of superbly crafted, top quality, very low prim furniture, and all at amazingly low prices.

http://slurl.com/secondlife/Seymour/213/120/251/
Ciaran Laval
Mostly Harmless
Join date: 11 Mar 2007
Posts: 7,951
10-13-2009 14:39
From: Sling Trebuchet
Try an empty Linden Ocean sim


Heh I've found a few now, Sistiana was one, they have a fair bit spare. They also have the most allocated memory I've noticed so far at 31MB.

Now I'll post that I've found nowhere below the magic 22 figure, and go exploring again and probably find a few of them!
Ann Otoole
Registered User
Join date: 22 May 2007
Posts: 867
10-13-2009 14:39
I have 3.7 msec spare time right now with around 4,000 scripts running. When I see spare time stay at zero I know it is time to restart the region. But then I manage the sim and make sure scripts are kept down to a decent level. Otherwise the photo garden would have issues and other stuff would not work optimally. I cannot stand rubber banding while building.

SL regions are small and need to be managed as very small things. They really can't handle much. This is why private estates are vastly superior to LL managed regions because frankly LL can't possibly effectively manage all thise regions with the tiny staff they have. Which is also why I mentioned earlier I don't see how large private estates can be effectively managed since properly managing one region takes daily effort. But once sript pools are rolled out it should help. Unless it breaks most of second life content and winds up being the final broken straw.
Ann Otoole
Registered User
Join date: 22 May 2007
Posts: 867
10-13-2009 14:41
From: Ciaran Laval
Heh I've found a few now, Sistiana was one, they have a fair bit spare. They also have the most allocated memory I've noticed so far at 31MB.

Now I'll post that I've found nowhere below the magic 22 figure, and go exploring again and probably find a few of them!

you won't find less than 22 milliseconds frame time rofl. It is 22 milliseconds and if it is not all used you see the balance in the spare time value.
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
Homesteads?
10-13-2009 14:42
I see three stats mentioned in this thread that are easy to watch for sim alarm bells:

Total Frame time: Should be 22 with non-zero Spare Time.
Sim Time (Physics): Under 5.
Total script time: under 11.

I'd like to hear folks' opinions as to similar limits for Homesteads. IIRC, there are still 4 Homesteads running per core, as opposed to 1 full sim per core. So, would the similar numbers for a Homestead be:

Total Frame time: Same as full sim
Sim Time (Physics): Under 1.2?
Total script time: under 2.7?

:confused:
DanielRavenNest Noe
Registered User
Join date: 26 Oct 2006
Posts: 1,076
10-13-2009 14:44
From: Ciera Spyker


yes, go rent a full sim - the whole sim, not a part of one. and test. In fact everyone should do that at least once. (maybe LL hould have a rent-a-sim by, say, 6 hrs slots for this purpose. hmmm ideas....) The results will floor you and enlighten too.


Might be an item for the SL wiki "limits" page.

I actually did that experiment once to find out how much lag using large textures in ads creates. Turns out 150 max size (1024x1024) images in 150 different ads changing quickly will crash an otherwise quiet full estate. They were on something like a 15 second flip rate. Thus you can figure out proportionately how much fewer or smaller image changes would impact things.
Ciaran Laval
Mostly Harmless
Join date: 11 Mar 2007
Posts: 7,951
10-13-2009 14:47
From: Ann Otoole
I have 3.7 msec spare time right now with around 4,000 scripts running. When I see spare time stay at zero I know it is time to restart the region.


Then you need to restart :p I was there five minutes ago and you had a little spare time but now it's 0, but I went back to see what the total time was. I'm not convinced with these stats being that useful, some of them are up and down like a yoyo.
1 2 3 4 5