Jump to content
MajesV4

Script Time, and the Importance of Avatar Weight.

Recommended Posts

21 minutes ago, Marianne Little said:

I thought idle meant sleeping script that do nothing, not sending out anything, when not in use.

I understood what you meant. You would have thought that there ought to be a way of temporarily shutting a script down completely, without deleting it. I have the sneakiest of suspicions that it would need a script to do that.......

and so the problem would continue, ad infinitum! But maybe a single script could put a temporary lid on a whole set of scripts? That surely would make a saving.

As I have absolutely zilch knowledge of scripting, I'm sure the script whizkids will soon say yea or nay to that.

 

  • Like 2

Share this post


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

I understood what you meant. You would have thought that there ought to be a way of temporarily shutting a script down completely, without deleting it. I have the sneakiest of suspicions that it would need a script to do that.......

and so the problem would continue, ad infinitum! But maybe a single script could put a temporary lid on a whole set of scripts? That surely would make a saving.

As I have absolutely zilch knowledge of scripting, I'm sure the script whizkids will soon say yea or nay to that.

 

It is an option in edit to stop scripts running. We need a scripter that can come with some input.

Does it help to stop them, not remove?

With my zero script knowledge, I would think it does something. But what do I know....

Share this post


Link to post
Share on other sites
Posted (edited)

Whoa there ...

12 hours ago, MajesV4 said:

One thing I have noticed since getting my Linden Home is the lack of spare time in the new regions. Many people seem to be unaware that we are all very limited in terms of region resources and script time, "memory"; is perhaps the most limiting.

Everything else is run before scripts, f there isn't enough time in a (region, not local) frame to run all the scripts, then not all of them get run. This was done to prevent scripts being able to lag everything else. Scripts can lag scripts, but that's about it.

How important is it to have "spare time" .. not so much, If a script events occur a (region) frame or two late, you probably wont notice, unless your gawking at the stats floater.

The fix is to stop gawking at the stats floater.

If your scripts are taking a LOT longer than you would like to respond ... there is nothing you can do about it, because you're on a shared mainland region.

Again, the fix is not let it bother you.

If it gets REALLY bad (as in it takes tens of seconds for a menu to appear) .. file a support ticket.

Quote

SL Regions only have 128 megabytes of memory which equates to about 22 ms script time.

They do not.

We have no idea how much memory SL regions have, the only numbers we have are so old that those machines have probably been scrapped for parts by now. We do know that one region still gets one CPU core, but that's it. LL do not publish details of their datacenter.

X amount of memory never equates to some amount of time. That is not how that works.

Quote

When dealing with the Lab in the past concerning a severely over-scripted region. We were told each region should support approximately 4000 scripts. While script count is not the most important factor in region performance, and script counters can be very deceiving; it is at least a starting point to determine where a regions poor performance might be coming from.

The act of counting scripts is not free, the more you look, the worse it gets.

Also, it's not your region and the Lab are unlikely to take your word for the cause of a regions poor performance, should they ever end up actually investigating, which .. unless things are lagged to the point that the region is for all practical purposes unusable .. lets just say I wouldn't hold your breath

Quote

Minimal basic descriptive info giving you a tiny window onto a mess of complex systems. None of this data is logged locally, you do not have the tools to cook up charts or establish relationships .. you're literally watching numbers dance about and attempting to pattern match, with an organ that in billions of years of prior evolution has never been expected to do this or anything like it. This is why charts exist.

Quote

The important part is the scripts actual memory time usage. Some scripts use more than others. But we have very good tools to check  these things now days and simply disabling scripts not in use helps a lot.

No, we do not have good tools. We have very clumsy quick and dirty tools. We can look out the window and declare that it is indeed raining.

Actual memory profiling is exceptionally expensive and slow. LSL does include tools for profiling your own scripts, but this comes with the caveat that performance can be affected by a factor of 100. http://wiki.secondlife.com/wiki/LlScriptProfiler

Quote

Many items contain scripts that we never use once we have placed them on our sims.So what is using the most on our regions these days ..???... Boats? Planes? Flying Pickles ?

And they just sit there and consume an amount of memory, we can not know how much memory there is, but I think it's fair to assume LL aren't running SL out of a museum and have stretched for at least an order of magnitude more memory than those old old servers with 4GB of ram. Seriously, those aren't a thing anymore. A little lost memory in a script is insignificant next to everything else the simulator is running.

Quote

In my experience avatars use the most region memory by far. People wearing silly things that weigh down their avatars and they likely don't even know it. I have had many tenants complain about region "lag" while they themselves were using over 10 megs of region resources. There is no reason to wear your adult private parts while you are trying to sail a boat, or fly a plane, or even converse with your neighbour 😉 Turn that crap off !

10mb is not a lot of memory. Not in 2019.

Also.. stop peeking at people's hidden naughty parts, that's just weird.

Quote

If we are going to have 20-30  residences per region we are going to have to make some compromises..

Nope, we're going to have to learn to deal with it, or spend more on a greater share of a regions resources elsewhere.

Quote

Adult furniture is also very script heavy but most can be turned off when not in use. A little awareness of your resource usage a a little consideration for your neighbours can go a long way :)

Adult furniture is no worse than regular furniture that avatars can sit on. Frisky animations are only frisky in the eye of the beholder, and none of the SL infrastructure has eyes (or at least it better not).

The worst scripted offenders tend to be the most innocuous. In my years of running a public (and adult) region, the very worst offender was a model of some joss sticks, It used a very complicated pattern of dancing hidden parts and emitters to produce a quasi smoke effect. It looked really pretty .. and was promptly deleted.

21 minutes ago, Marianne Little said:

It is an option in edit to stop scripts running. We need a scripter that can come with some input.

Does it help to stop them, not remove?

With my zero script knowledge, I would think it does something. But what do I know....

For 99.99% of scripts, the cost of unloading and loading has way more impact than the 64kb of memory use.

Stopping and starting is just more code that has to be run. Basically feel good bloat. Tinkering at this level is like trying to balance tire wear on your car by adjusting the position of candy in the glove box.

Probably best not to attempt to second guess the mono engine and let it do it's job.

 

Edited by CoffeeDujour
typos ..
  • Like 4
  • Thanks 5

Share this post


Link to post
Share on other sites

@CoffeeDujour

You have no idea what you're talking about. Obviously haven't spoke to anyone else who does either.

What are you a troll ?

Share this post


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

You have no idea what you're talking about. Obviously haven't spoke to anyone else who does either.

What are you a troll ?

you finally get a reasonable and right response but don't like it?... go back to your cave please.
The subjects is chewed... chewed and more chewed in the past, there is no need at all to have it repeated here again, most people won't read or act on it, except a few who think they'r gonna save sim performance, while they don't and only limit their great experience at their home.
 

Edited by Fox Wijaya
  • Like 3
  • Thanks 2

Share this post


Link to post
Share on other sites
1 minute ago, Fox Wijaya said:

you finally get a reasonable and right response but don't like it?... go back to your cave please.

Nothing right about it, we know  exactly how much memory is allocated to a region because we know how to do math and we can see the region statistics, educate yourselves or not, but don't act like you know something you don't.

It doesn't help anyone....

Share this post


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

Nothing right about it, we know  exactly how much memory is allocated to a region because we know how to do math and we can see the region statistics, educate yourselves or not, but don't act like you know something you don't.

No we really don't. The best we can do is guestimate the amount of memory that all the scripts on a region can potentially use, up to a maximum of 64kb

But that's not how mono works.

Mono scripts are only as big as they need to be. They can be 4kb or 40kb .. and we don't know, till we ask mono to check.

When asked Mono will just say 64kb ! (or whatever the scripter has set via http://wiki.secondlife.com/wiki/LlSetMemoryLimit - which, you guessed it, just tells mono what to say .. it's just a number still can be much higher than the script actually uses).

Because otherwise mono has to serialize the script and do math. This is slow, and LL wont let us cripple the region by having mono dump the entire script pool and add up all the numbers just to make drama.

  • Like 7

Share this post


Link to post
Share on other sites

We don't need to know how  much scripts are using to calculate what is available...geez. disable scripts on the entire region and see for yourself.

Everyone always falls back to the mono argument, it's really irrelevant. But I will leave you girl/boys with it. Keep blaming the lab for the lag or try and help remedy the problem if you wish.

Carry on..

Share this post


Link to post
Share on other sites

SL is a mess of complex systems and there are a significant number of things that can cause, or create the appearance of, "lag". Region performance can not be boiled down to one or two numbers.

If you want a better performing region, don't have as many people on it .. but as that's beyond your control on a shared Linden Homes region, It is what it is. Deal with it, or don't. 

 

Share this post


Link to post
Share on other sites
13 hours ago, Gryphon Ronas said:

My laugh response is jovial at the moment, but also tempered with the knowledge that this is only too true.  :( 

 

Not entirely sure. As one who scripts myself, I can confirm that avi's, indeed, consume the most script resources, by far (which is why Homesteads aren't script-limited, but may only hold max 20 avi's) Adult furniture (for some bizarre reason I was going to type 'forniture', LOL: a Freudian slip between ''fornication' and 'furniture' perhaps?!) tend to take up heavy resources too, but it's only peak-load. Take all avi's out of a sim, start up your Region debug manager, and you would hardly even notice anything running (gross misprogramming notwithstanding). Tl;dr: they're unlikely to limit furniture script usage and the like; if anything at all, they might perhaps impose limits on avi script-usage, though (fancy shoes, hair, etc, with very heavy scripts in them). But even that I doubt.

Share this post


Link to post
Share on other sites
2 hours ago, 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.

 

Actually, 'idle' is what all scripts are by nature, as LSL is entirely event-driven. Aka, nothing is running, until an event occurs: (like a mouseclick, onrez, etc).

  • Like 3

Share this post


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

No we really don't. The best we can do is guestimate the amount of memory that all the scripts on a region can potentially use, up to a maximum of 64kb

 

You are entirely correct. :)

Also, LSL memory -- if I recall correctly (pun intended) -- is a very murky business, as not all memory that you think is being freed up, is actually directly released. Had something to do with the fact that 'pruning' memory, every time such a request is made, is actuallly quite CPU-intensive (and subsequently foregone in most cases).

Also, not sure what the OP is actually on about. Not wanting to sound like a meanie, but script memory, in the overall scheme of things, is as good as irrelevant. Script-execution time is far more important, of course; and, even then, it highly matters what the script does, of course (like a key frame motion sequence could be very hefty). So, the CPU load of a scripts is ultimately the only thing that truly matters.

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
24 minutes ago, kiramanell said:

 

Actually, 'idle' is what all scripts are by nature, as LSL is entirely event-driven. Aka, nothing is running, until an event occurs: (like a mouseclick, onrez, etc).

The scripts is idle, but they use resources? Ack, my poor brain. This is what I find so hard to understand.

Does "set scripts to not running" mean anything at all for performance regionwise/parcelwise? 

Share this post


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

The scripts is idle, but they use resources? Ack, my poor brain. This is what I find so hard to understand.

Does "set scripts to not running" mean anything at all for performance regionwise/parcelwise? 

 

An idle script -- for all purposes and intent -- uses as good as no resources, beyond the bit of memory it consumes; and even then -- pretty much like Windows memory management, come to think of it -- part of it may get swapped out of active cache when idle for a certain time (darn, if only I could find that paper on it again).

Setting a script to 'not running' is, IMHO, usually a rather pointless endeavor, as they're all event-driven to begin with, so they're not doing anything at all when you're not using them (like in furniture). Seriously, the impact on the region will be as good as zero doing so (if you could even measure the difference). Even scripts that seem to be running constantly (like steam out of a tea-pot), is usually just a particle effect, as you probably know (and thus, a few exceptions notwithstanding, entirely local: aka, only occuring in your own viewer).

Anyway, honestly, you're not going to help your sim by disabling scripts in your furniture. Avi script, otoh, with hair that is constantly (articificially) in motion, and shoes, etc, are the real killer. No avis, no lag. :) 

  • Like 2

Share this post


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

The scripts is idle, but they use resources? Ack, my poor brain. This is what I find so hard to understand.

Does "set scripts to not running" mean anything at all for performance regionwise/parcelwise? 

Not running does not remove the script from the pool, only taking it back to inventory would do that.

So you have a script that does nothing ... till the event it's waiting for happens (like a touch, or a bump, or inventory is added, etc etc) .. vs a script doing equally nothing and no possibility of ever doing anything.

Switching it off is the one way to guarantee it becomes an absolute waste of (abit a teeny amount) of resources.

  • Like 3

Share this post


Link to post
Share on other sites

Another thing to consider is that LL has set the regions in Bellisseria to allow 59 avatars instead of the usual of 40 for mainland regions.
This is going to have a knock on effect on busier regions as there will be more scripts, less memory and less time to run them all potentially.

  • Like 5
  • Thanks 1

Share this post


Link to post
Share on other sites
38 minutes ago, Gabriele Graves said:

Another thing to consider is that LL has set the regions in Bellisseria to allow 59 avatars instead of the usual of 40 for mainland regions.
This is going to have a knock on effect on busier regions as there will be more scripts, less memory and less time to run them all potentially.

i would rather see a bit lower avatar count on the residential sims, and perhaps the sims that are decorated for community purposes and hang outs at higher levels.( of course on those no houses/boats)

  • Like 1

Share this post


Link to post
Share on other sites
43 minutes ago, Gabriele Graves said:

Another thing to consider is that LL has set the regions in Bellisseria to allow 59 avatars instead of the usual of 40 for mainland regions.
This is going to have a knock on effect on busier regions as there will be more scripts, less memory and less time to run them all potentially.

 

That would certainly explain it. From 40 to 59 is a huge increase. Thx for the info.

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
On 5/20/2019 at 7:36 AM, Marianne Little said:

 I thought idle meant sleeping script that do nothing, not sending out anything, when not in use.

If you thought so, you  were right. That's what is supposed to mean.

"Busy waiting" or "Busy idling" is generally regarded as an anti-pattern (that is a symptom for poor coding and/or organizational structure) and although there are some situations where it can't be avoided, this shouldn't be one of them.

(I'd recommend everybody to take a look at the anti-patterns btw. Some of them are very programming specific but many are more general and good indications of how well any system or organization runs. It can be quite entertaining too - how about your boss at work? Is he doing seagull management? or micromanagement? Did he get there through the Peter principle? Don't overdo it though, relying too much on such lists can be an anti-pattern in itself.)

Edited by ChinRey
  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

Oh lord, not script memory again!   I try to stay out of this kind of discussion because I'm all too aware that even people with far more experience and knowledge than have I can't agree about the details of how script usage impacts, or doesn't, a region's performance, other than in the most general terms, for the reasons CoffeeDuJour suggests.

Briefly, though, I'd say first that we need to distinguish between script memory and script activity, both of which can impact a region's performance in different ways.  

Script memory can be an issue, but generally one that arises only because of  the impact on a region's performance caused by rezzing a scripted object and having the simulator load all and initialise that object's scripts.    This completely different from the impact caused by having that same scripted object running on the region.    So if someone is using a (by now, completely outdated) resizer or recolouring script in their hair or clothes, or any other attachment, that has a resizer script in every link, then that's certainly going to cause the region performance to take a noticeable hit at the moment the avatar rezzes on the region and the region has to load every single script in the av's hair or shoes (which is why, at something like a big fashion fair, with people arriving every few seconds, or trying to, it can become a real problem -- even though using a script counter to boot the av out of the region generally causes more problems than it solves, since by the time you expel the av, the damage caused by loading all those scripts has been done, and if the region is full, then all you do when you kick the av is free up a spot for someone else, whose scripts will also have to load when she or he arrives, thus increasing the demands on the simulator).

However, once the object has rezzed and the scripts are loaded, the damage is done, and the scripts themselves, if most of the time they're just sitting there waiting to be used -- e.g. recolouring scripts in furniture -- won't have much impact unless they're also doing something that make them unnecessarily active (doing something stupid like listening on the public chat channel, for instance).     

If I were a greifer intent on crashing simulators then most of the scripts I'd use for my malicious purposes would be quite short and simple, hardly using any memory at all.   It's what I've have them do -- particularly to the physics engine --  that would cause the problems, not how much memory they'd use doing it.

As a specific example, I can guarantee that if an av is wearing a scripted collar -- either OpenCollar or one of the proprietary kind -- then after the av has rezzed on the region and her collar scripts are loaded, the amount the collar impacts the region's performance depends almost entirely on whether the collar is set to listen on the public chat channel for commands or if the owner has set it to respond only to commands on a non-zero channel.    There's no scripted tool that will tell you that, though, or at least not readily in any way of which I'm aware.

Under normal circumstances,  I think it's generally fair to say that unless there's something wrong with the script -- either it's carrying out one of a small range of specific tasks very badly indeed because it's been badly written  or because it's been deliberately scripted to cause a nuisance -- then if its activity or its memory use present a problem for the region, there's almost certainly something else wrong with the region that greatly magnifies the impact of whatever the script is doing.

Even using most tools to try to assess the impact of script activity are no help here, because,  unless you're actually the scripter, running controlled tests using development tools you wouldn't include in a finished product because of the tools' impact on performance,  all you see is a snapshot of the script's activity a short while ago.   So if you check on someone just after he arrives on the region, you'll see a lot of activity from his scripted attachments as they load and initialise, but if you check five minutes later,  you'll probably see hardly any activity from them.

And, of course, when LSL reports on the script activity and impact of something someone's sitting on, be it static furniture or a vehicle, it attributes to the object all the memory and activity of all the scripts the sitter is wearing.  So if you want to know the impact of your scripted furniture, measure it when no one is sitting there.

Pro-tip -- if your recolouring/retexturing/resizing scripts involve putting scripts in each child prim, they are badly outdated and almost certainly need replacing with a more modern and efficient script that handles it all from the root prim.    But even then, at least for scripted furniture that stays put in one region -- worn attachments are different because you keep on tping into new regions with them -- the main reason for updating the scripts is that the newer functions we can use to control all links from the root prim are far easier to write and maintain than were the multi-script workarounds they replace (particularly resizers, which were always a pain to write and are trivially simple).

ETA:  I would distinguish between recolouring and resizing scripts on the one hand and, on the other, scripts in child prims to open and close doors and windows.   While those can certainly be written all to work from one script in the root prim, if you have a complex structure, with several doors and windows all opening and closing independently, as you do with the houses and houseboats,  it's generally a lot simpler to use individual scripts to control each door or window.    I've tried doing it both ways in the past and controlling all doors and windows from one script is a lot more tricky to pull off than it sounds.

 

Edited by Innula Zenovka
  • Like 3
  • Thanks 3

Share this post


Link to post
Share on other sites
6 hours ago, Gabriele Graves said:

Another thing to consider is that LL has set the regions in Bellisseria to allow 59 avatars instead of the usual of 40 for mainland regions.
This is going to have a knock on effect on busier regions as there will be more scripts, less memory and less time to run them all potentially.

I wonder if you can put 59 avatars on one Resident parcel.

Share this post


Link to post
Share on other sites
22 hours ago, MajesV4 said:

SL Regions only have 128 megabytes of memory which equates to about 22 ms script time.

 

Okay, going to let the 'Wolf' out for a moment: those who like me, feel free to skip this one. :)

LOL. That's the best non-sequitur I've seen in years. 🤣 I mean, in what universe does the amount of server memory equate to script execution time!? (expressed in miliseconds). Sorry, but I'm inclined to say that comment alone disqualifies you from a meaningful discussion. That's like saying: "This car will go only 125 km/h, therefore it has pink seats."

And that 128 MB, did you just pull that number out of a hat?! Even the old class 5 servers had 300 MB. I believe the current ones (class 7, or higher even?) have at least several Gigabyte available per sim. (And it used to be 1 full Region per CPU core; they may have shifted the numbers a bit over time, though).

Also, the ridiculous non-sequitur notwithstanding, you can't just take an arbitrary number (even if it were the correct one), and divide it by something like the amount of scripts running in the Region, as, for one, multiple same scripts running on the sim actually share a memory pool. And even when you think you figured out the math, then you'll find the 'garbage collector' running (freeing up memory; but only when absolutely needed), leaving you in the dust again.

So, please don't tell CoffeeDujour that she doesn't know what she's talking about, k?! Cuz you're looking mighty silly doing so.

  • Like 3

Share this post


Link to post
Share on other sites
3 minutes ago, kiramanell said:

 

Okay, going to let the 'Wolf' out for a moment: those who like me, feel free to skip this one. :)

 

I am shocked. SHOCKED. Shook AND shocked! 

Kidding... rock on!

  • Like 1
  • Haha 3

Share this post


Link to post
Share on other sites
24 minutes ago, kiramanell said:

That's like saying: "This car will go only 125 km/h, therefore it has pink seats."

 

DCCF5235-26A0-4C1E-A949-37D7262A0CA5.gif

  • Haha 9

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...