Jump to content
MajesV4

Script Time, and the Importance of Avatar Weight.

Recommended Posts

Posted (edited)
1 hour ago, AngieRath said:

With your described measures you can reduce the lag on the sim a little bit. Your own lag will not be influenced positively at all.

Maybe you should take a look at this link. There you will find a detailed description how to reduce your personal lag. Then it doesn't really matter what Avatar A or B/C say or claim.

https://wiki.phoenixviewer.com/lag

Thank you, I have found that Packet Loss is 0, even when I move or teleport. 😁

My Ping Sim is changing between 170 and 210 when I don't move the camera. Then, it can spike as high as 350. When I stop moving it, Ping Sim sinks down fast to the same.

For Client side loss, I already know about draw distance, lower graphics and the other. I must say, it sucks if I have to disable Atmospheric Shaders, because SL looks so ugly then, and I moved here because it is pretty, you know? 😳 But this part: If need be, inhibit the rendering of other avatars: Advanced → Rendering Types → Avatar - or derender them, I interpret it as yes, I should derender bot avatars parked in a house over the street. I don't need to render them.

My main problem can be both Server Side and Client Side. So I have to buy a better graphic card, and/or live in Bellisseria in the preset I use for crowded events: My avatar unscripted + low graphics. No more facial AO and the subtle movements in expressions. That, and disabling Atmospheric Shaders is not funny for me.

Am I right?

 

Edited by Marianne Little
Edited to correct Pocket -> Packet

Share this post


Link to post
Share on other sites
Posted (edited)
14 minutes ago, Marianne Little said:

Thank you I have found that Pocket Loss is 0, even when I move or teleport.

My Ping Sim is changing between 170 and 210 when I don't move the camera. Then, it can spike as high as 350. When I stop moving it, Ping Sim sinks down fast to the same.

For Client side loss, I already know about draw distance, lower graphics and the other. I must say, it sucks if I have to disable Atmospheric Shaders, because SL looks so ugly then, and I moved here because it is pretty, you know? 😳 But this part: If need be, inhibit the rendering of other avatars: Advanced → Rendering Types → Avatar - or derender them, I interpret it as yes, I should derender bot avatars parked in a house over the street. I don't need to render them.

My main problem can be both Server Side and Client Side. So I have to buy a better graphic card, and/or live in Bellisseria in the preset I use for crowded events: My avatar unscripted + low graphics. No more facial AO and the subtle movements in expressions. That, and disabling Atmospheric Shaders is not funny for me.

Am I right?

 

Yeah, you're basically right. 
For example, you can set the maximum complexity to 250 and decimate the number of visible avatars or switch off anisotropic filtering. If you have the firestorm viewer, you can also ask the group what else you can do.

Firestorm Support English

Edited by AngieRath

Share this post


Link to post
Share on other sites
1 minute ago, Love Zhaoying said:

Avatars got pockets now? Innovation!

Haha, I have no technical way of explain it, but 0 Pocket Loss is good, says Firestorm.

  • Haha 1

Share this post


Link to post
Share on other sites
5 minutes ago, Marianne Little said:

Haha, I have no technical way of explain it, but 0 Pocket Loss is good, says Firestorm.

I think they meant “Packet”.

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites
9 minutes ago, Marianne Little said:

Haha, I have no technical way of explain it, but 0 Pocket Loss is good, says Firestorm.

I prefer Pockies.

  • Thanks 1
  • Haha 1

Share this post


Link to post
Share on other sites
2 minutes ago, AngieRath said:

Well, "Packets Lost". But I prefer pocket/pockies too! haha

A “pocket sniffer” sounds kinda kinky.

  • Haha 1

Share this post


Link to post
Share on other sites
26 minutes ago, Marianne Little said:

Haha, I have no technical way of explain it, but 0 Pocket Loss is good, says Firestorm.

 

Yeah, 'packets', of course; as in network packets (TCP/IP,  UDP, and the like). If you missed a packet, it either needs to be resent, or it's simply skipped (usually for UDP only). So, 0% packet loss is, indeed, a good thing. As is 0% pocket loss, btw. 😇

Particularly pertinent to lag is the Time Dilation value, though. At precisely 1.0, it means your sim is runnig at zero lag (a full 45 frames per second). It will likely be (significantly?) less on Bellisseria.

Share this post


Link to post
Share on other sites
2 hours ago, Marianne Little said:

Haha, I have no technical way of explain it, but 0 Pocket Loss is good, says Firestorm.

packet loss but my jeans have pockets

Share this post


Link to post
Share on other sites
Posted (edited)
9 hours ago, ChinRey said:

Thank you Innula, that was a very good description of how scripts are supposed to work and how we all thought it worked.

But did you read Animat's post? Apparently idle scripts do quite a bit of spinning, and with the large number of them we can have in a region, that is rather worrying.

There's another spin to it too. Animats told me about it with a few more details in a chat we had in-world. He has brought it up with LL and from what I understand from what he understood from their reply, they don't even realize that this is not normal behaviour from a computer application. That is even more worrying.

Yes, I've read the various posts, but I don't quite see the issue.   Yes, it's true that the simulator checks, every frame, to see if anything has happened to each script that requires action by the simulator, but the impact on region resources is orders of magnitude less than the impact of having those scripts actually doing anything.

I wasn't there at the time, but according to the (very well regarded and experienced) scripter who described the experiment to me,  she was once involved in some tests that involved filling a whole closed region on Aditi with prims that containing a short script that simply listened on the public chat channel and then performed some simple task -- displayed in hovertext the message it heard if it met some simple criterion, I think.     

The 20K scripts (as it was at the time) were responsible for a minimal amount of simulator activity while they just sat there, but the moment anyone typed anything in public chat there was, as expected, a huge spike in activity, as the simulator tried to decide which prims were close enough to the av to hear the message, then whether they should respond to it and, if they should, to decide what to do and then do it.   It was the scripts being asked to do something that caused the simulator to take the performance hit, not their simply being there.

Moreover, script activity is the simulator's lowest priority -- if the amount of script time required in a frame exceeds the amount required available, then some activity simply gets delayed until the next frame.    Scripts can lag only other scripts, in other words, and then only to an extent that under most circumstances no one is going to notice.

When people complain about lag on a region, they typically describe an effect that can have several different underlying causes -- their local computer's performance, which is going to depend on its CPU, GPU and available RAM, so it's unique to their computer; the speed and quality of their internet connection with the LL servers (again, something completely outside SL that is a problem for them but not for someone else in a different country), the connection between LL''s servers and the simulator on which the region is hosted (affects everyone on the region but nothing to do with  the scripts on the region), and then, on the region,  simulator activity caused by avatar activity (walking and talking), the physics engine (collisions, and physical objects moving around), and general script activity.

Trying to understand what's causing the symptom we know as "lag" (a term I've come to hate) is very difficult indeed.  I've spent ages over the years looking at various consoles in the viewer, alongside both Lindens and residents who know far more about how the simulator works and all the console figures mean, than do I, and most of the time they end up making, at best, educated guesses.     

When it's something obvious, it's generally either loading textures, or a problem with the simulator itself, or a problem with the network connection that's to blame,   When it's a script that's causing the trouble, it's generally a problem with that script -- either it's stuck in a loop, repeatedly causing something to happen that, in turn, impacts the simulator (e.g. a temp rezzer repeatedly forcing the simulator to rez a complex scripted object) or it's been deliberately scripted to attack the simulator.   

I was a region and estate manager before I became a scripter, so I guess I'm primarily interested in how the region and simulator are performing as a whole, and identifying problems when they occur, rather than in how individual scripts perform.   But I think I'm safe in saying that, under normal circumstances -- which don't include combat regions or vehicle racing, where different considerations apply -- scripts aren't generally the problem.    

Even scripted breedables, in my experience, cause trouble not because they're scripted but because they're left out with physical motion turned on.   If you turn that off, it makes a huge difference.

Edited by Innula Zenovka
  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites
9 minutes ago, Innula Zenovka said:

Moreover, script activity is the simulator's lowest priority -- if the amount of script time required in a frame exceeds the amount required,

Do you mean “exceeds the amount available”? 

I wonder how performance would be different if you talked to all those scripts with llRegionSay()?

Nice explanation of how “scripts don’t really impact (frame) lag”. I wish more people understood and agreed.

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, kiramanell said:

It will likely be (significantly?) less on Bellisseria.

Why? The home construction and textures? Avatars?

  • Like 1

Share this post


Link to post
Share on other sites
2 minutes ago, Love Zhaoying said:

Why? The home construction and textures? Avatars?

 

I don't have a home there yet to check (*pout*); but if it's anything like mainland, the amount of avi's will no doubt bog down sim performance, yes.

Share this post


Link to post
Share on other sites
1 hour ago, Innula Zenovka said:

Yes, I've read the various posts, but I don't quite see the issue.   Yes, it's true that the simulator checks, every frame, to see if anything has happened to each script that requires action by the simulator, but the impact on region resources is orders of magnitude less than the impact of having those scripts actually doing anything.

It's still too much when we take into account that there may well be thousands of scripts running in a region and let's be absolutely clear: This is not how well behaved software works.

The task priority argument is a valid one but only to a certain extent. There is good reason to believe that low priority server tasks do to some degree negatively affect higher priority ones (there's an old thread about it in the scripter's forum but I can't find it right now) and even if that's not the case, the spinning certainly affects the execution of scripts we want to run.

Share this post


Link to post
Share on other sites
Posted (edited)
5 hours ago, Marianne Little said:

Haha, I have no technical way of explain it, but 0 Pocket Loss is good, says Firestorm.

Packet loss is easy to understand. Data on the internet is sent not in big bundles but in small packets - or packages if you like. When a packet is lost on the way ... well you know how it is when it happens with snail mail or when the airline looses your luggage. It takes a bit of time and it's a bit of bother to sort it out and of course, the packet has to be resent. It's more or less the same on the internet.

 

1 hour ago, kiramanell said:

I don't have a home there yet to check (*pout*); but if it's anything like mainland, the amount of avi's will no doubt bog down sim performance, yes.

If there are a lot of avatars, yes, but it seems that won't an issue now that the novelity value is beginning to fade. I checked right now and I couldn't find any regions there with more than four avatars and that's nothing. A few of the new houseboat regions they've added had still had fairly high avatar counts one of them as high as 8 - but that's still not enough to cause any serious problems on its own. I didn't see any time dilation figures below 0.995 (except right after I tp'ed in of course).

This however may be a little bit worrying:

1620764052_Skjermbilde(2237).jpg.cf0f2fe63dd2cdeec9a37e7f819e4841.jpg

Nothing unusual about these figures at first sight but keep in mind that this is a brand new region where the residents only have had time to start filling up their places. It was also the region with 8 avatars though and that may explain it. Even so, even though there's no reason to sound any alarm bells, it's certainly something to keep an eye on.

Edited by ChinRey
  • Thanks 1

Share this post


Link to post
Share on other sites
8 minutes ago, ChinRey said:

Packet loss is easy to understand. Data on the internet is sent not in big bundles but in small packets - or packages if you like. When a packet is lost on the way ... well you know how it is when it happens with snail mail or when the airline looses your luggage. It takes a bit of time and it's a bit of bother to sort it out and of course, the packet has to be resent. It's more or less the same on the internet.

 

If there are a lot of avatars, yes, but it seems that won't an issue now that the novelity value is beginning to fade. I checked right now and I couldn't find any regions there with more than four avatars and that's nothing. A few of the new houseboat regions they've added had still had fairly high avatar counts one of them as high as 8 - but that's still not enough to cause any serious problems on its own. I didn't see any time dilation figures below 0.995 (except right after I tp'ed in of course).

This however may be a little bit worrying:

1620764052_Skjermbilde(2237).jpg.cf0f2fe63dd2cdeec9a37e7f819e4841.jpg

Nothing unusual about these figures at first sight but keep in mind that this is a brand new region where the residents only have had time to start filling up their places. It was also the region with 8 avatars though and that may explain it. Even so, even though there's no reason to sound any alarm bells, it's certainly something to keep an eye on.

 

My, those numbers look good. :) Thx. 

Share this post


Link to post
Share on other sites
19 minutes ago, ChinRey said:

This however may be a little bit worrying:

Which part, the # scripts?

Share this post


Link to post
Share on other sites
Posted (edited)
22 minutes ago, ChinRey said:

This however may be a little bit worrying:

Which part, the # scripts?

Edited by Love Zhaoying

Share this post


Link to post
Share on other sites
On 5/19/2019 at 10:36 PM, Marianne Little said:

That's why an idle script would be best. Maybe I don't understand what idle means. You clearly think I mean a permanent end to them. I thought idle meant sleeping script that do nothing, not sending out anything, when not in use. 

 

idlesimtest1.thumb.png.202b0b18c87fe04d3383c367905c068a.png

A sim with no scripts and no script events. Script events per second, zero.

Scripts that are doing nothing, with no timers and no events, still use some script time. Not much.

I just did some testing in an empty sim. Arowana, which is a "vehicle testing sim" that's rarely used, normally has zero scripts running. It's a "homestead" sim, so it has limited resources. Results for a regular sim might be different.

 

scripts100a.thumb.png.29f16c030f943ca3ead9fb2759ea6960.png

Each cube has 10 default "New Script" scripts. The linkset has 10 cubes, so there are 100 scripts.

Script time used is now 0.522ms/frame. Still zero script events. None of these scripts are doing anything. They're just sitting there, waiting for a touch event. These are comparable to a resizer, applier, sitter, or color changer waiting to be used.

 

scripts1000a.thumb.png.995781f286071f30fb4e488731e3ab57.png

1000 scripts. Now 4.5ms/frame is being used to do nothing. Almost 10x the value for 100 scripts, as we'd expect. Again, zero events per second.

 

Share this post


Link to post
Share on other sites
Posted (edited)

scripts1500a.thumb.png.909a81b9d3203310ce811984d5d1f607.png

1500 scripts doing nothing. Now some throttling mechanism has activated. Note that "scripts run" has dropped to 84%, and "script time" only went up to 5.7ms. Something is keeping all those idle scripts from hogging all the script time. That's good.

 

scripts5000.thumb.png.4ff85f24ae10032dbdf4f0f174b502ab.png

5000 scripts doing nothing. This is high for a sim, although 4000 is not uncommon. I think the highest I ever saw was 13000. Breedables.

Note that script time is holding at 5.8ms/frame, about the same as with 1500 scripts. Clearly some limit has been reached. Only about 25% of scripts are running on each frame.

Whether this limit is for all scripts, or just idle scripts, is not clear. This may be a limit of a homestead sim.

What have we learned?

  • The cost of a script that is doing nothing is about 0.005ms/frame. This adds up.
  • There's some limit on how much script time idle scripts, or all scripts, can use, and 1000 idle scripts will reach it in a homestead sim.
  • At least for homestead sims, some limit is applied between 5 and 6 ms of script time per frame. This may mean that idle scripts are limited to a quarter of the possible script time. Or it may mean that homestead scripts are limited.

This is an experiment worth repeating in an empty non-homestead sim, to see if the limits are different. Or try doing this in an empty homestead sim, and then run something that uses script time actively and see if it gets all the time it needs.

 

Edited by animats
  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, ChinRey said:

It's still too much when we take into account that there may well be thousands of scripts running in a region and let's be absolutely clear: This is not how well behaved software works.

What impact do running but inactive scripts (e.g. a door script that's just waiting for someone to touch the door, or a chair waiting for someone to sit on it) have, as compared to a couple of normally-outfitted avatars just walking around chatting?     I ask because I don't know, but I suspect you'd need a whole lot of scripts to come anywhere close to the impact a couple of avs have just going about their everyday business.

OK, optimising script usage still makes sense and is good practice, but I don't see it as something about which to lose too much sleep.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...