Jump to content

Scripting Limitations per Avatar


Laurie7983 Gothly
 Share

You are about to reply to a thread that has been inactive for 3937 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello!

I don't usually post here in the forums, thus I'm not sure where to put this exactly.  I run a sim which I want to keep script efficiency and script lag down to a minimum.  I've been looking into getting different sorts of script monitors tools for the sim for this reason.  I would greatly like to be pointed into the right direction on what limits I should set regarding avatar max scripts allowed and max memory allowed.

I'm thinking about setting the max memory allowed toor 5 MB but I have no justification for doing so besides gut feelings (I'm here to get more than gut feelings).  I have no earthly idea what to set the max scripts to; I'm guessing 120 is fine?  

As you can see I'm a bit lost and am going on what My experiences through SL have been with other script restricted sims.

Thanks for any replies!

Link to comment
Share on other sites

Don't bother.  Sim owners have gone way overboard with this monitor business and it really is mis-directed. The servers use whatever time is necessary to figure out where avatars are, handle rendering, communications, physics, ambient effects, and everything else.  Then, if there's any time left, they execute scripts.  That is, everything else that happens in a sim can cause scripts to lag, but scripts cannot cause the sim to lag.  The number of scripts that are competing for the servers' attention can make an avatar's own scripts lag, and they can make scripted objects respond slowly --- so doors might not open immediately when you click them, for example --- but they are not going to affect the way textures load, avatars move, chat messages appear, or anything else.  The greatest cause of sim lag is avatars, so the best way to reduce it is to limit the number of avatars on your sim.

Now, having said all of that, I still find it hard to believe that anyone really needs to have more than a couple dozen scripts going at once  (I usually have about 12-15) or use more than 2 Mb or memory (I carry maybe 300KB on a normal day).  A sim with lots of avs will have a boatload of lag whether they are lugging scripts around or not.  Yes, unnecessary scripts will compete with each other for what little server time is left, so they'll all slow down.  Keeping the number of scripts low won't make a difference to sim lag, but it will help scripts execute more efficiently.  Thing is, I see no evidence that script monitors do anything but annoy people and drive away potential customers.  If you must have a monitor, it makes more sense to me to use it as an educational tool than as a punishment. 

ETA: I keep seeing horror stories about people who were treated harshly because of some overly zealous land owner with a robust script monitor.  Here's today's >>> http://community.secondlife.com/t5/Second-Life-Server/Scripts-crashing-SIM/m-p/1926417#U1926417

Link to comment
Share on other sites

Give up this idea .

 

the memory of scripts can t be detected exactly outside scripts .

For instance , if you compile in mono this script :

default{    state_entry()    {        llOwnerSay("This script uses " +(string)llGetUsedMemory() + 
" but the reporters outside the object will report " +
(string) llGetObjectDetails(llGetKey(), [ OBJECT_SCRIPT_MEMORY])); }}

 You will get : 


[18:06] Object: This script uses 3876 but the reporters outside the object will report 65536

So , 20 X less 

Only the scripter can know really how much memory is used in HIS script. An another script can t detect the memory used by an another script 

 

About number of scripts : wrong idea too .

Scripts who don t work ... don t work ... and have no impacts .

And if you want to talk about thetime to load the scripts :

Someone can have 10 scripts different from 10 different Assets .  Someone can have 100 identical scripts  from only 1 Asset . The man with 10 scripts from 10 different assets will take more time to load the scripts when he will come in the sim

An external script can t know the assets used by an another object

Number of scripts doesn t mean number of assets

Link to comment
Share on other sites

Not all of it is necessarily true Rolig. Scripted wearable attachments do increase Avatar Rendering Cost and therefore do contribute to a sim lag. You can actually see how ARC changes depending upon a number of scripts in wearable attachments via info panel (turns on/off in Rendering) and if you wear resizeable hair and then take it off the difference is profound.

So the number of worn scripts matters. The used memory is a different story; it is more or less meaningless. I can write a few lines script that would either crash a sim or at least significantly impare it. On the other hand, a full 64K script if correctly written would add no lag at all.

  • Like 1
Link to comment
Share on other sites

I understand relatively what you are saying, and I thank you for the input.  It is both constructive and informative to how scripting works in SL.  I cannot, however, just let scripting go haywire on the sim.  Yes, scripting is the last used resource on the sim, yes it's impact to the sim is not exactly accurately measured (I do believe the agruements that it's not precise to any degree), but it is still a resource the sim has to contend with.  Just because it's last on the line and it's not recorded with any accuracy doesn't allievate the need for script controls.  As the arguement was made you could have a script have no impact to a script breaking a sim...I can see why there needs to be some measurement.  

I'm not convinced that not regulating scripts to some degree will not be a benefit to overall performence.  I think the best argument made to Me here is not put so much zeal in punishment of people in a system of scripts detecting scripts might not be as accurate as I want.  Will it show Me people who impact the sim the most via scripts, however?  My leaning is yes, it will.

Link to comment
Share on other sites

You are wrong : "its impact to the sim is not exactly accurately measure"

The measures by llGetObjectDetails are very far away from the reality .

You can have a script who takes 6Kbytes of memory , but your reporter will report 64kb of memory . it s not a "light error of accuracy" : it s an HUGE error of accuracy : You have  967% of margin error in this case ! And it s not the worst case !

To add , you can t have measures from scripts who have been created  from t the same asset :

the memory used in a script is the sum of its code used and its datas used . For several scripts from the same asset , the memory of code is instancied only one time , because it s the same code . The datas can be different between the scripts .

So you can have 50 scripts from the same asset , who take 6 kbytes : 5kbytes of code , 1 kbytes of data .

In the simulator , you will have 5 bytes of code  X 1 ( X1 because it s the same bytecode compiled ) + 1 kbytes of data X 50 = 55 kbytes . ( less than a big script )

Your reporter will report number of scripts in mono * 64 kBytes = 50* 64 Kbytes = 3200 Kbytes ( margin error (3200 -55)/55 = 5 700 %)

Your reporter is very far away from the reality .

There are NO WAY to create a reporter who will have a correct measure , even inaccurate because to have a correct measure , you will need to use llGetUsedMemory who can t be called for an external prim , and , so , you will need to change every scripts in the land and the attachments of avatars . Thing impossible to do because you won t have the rights

 

You write too

 it is still a resource the sim has to contend with.  

 No : ressources are usage of CPU of the sim  , network connections of the sim , bandwidth of the sim, I/O input,outputs disks of the sim  ..

You have no way to know if a script use these resources  or not , and if so , how much . You can t neither get an approximative idea . A script can use no ressources at all  because it s idle 

 

 

 To elaj 

Scripted wearable attachments do increase Avatar Rendering Cost and therefore do contribute
to a sim lag

 You ar wrong too :

EVERY attachments increase the avatar rendering cost  : scripted or not scripted 

If you attach an object without scripts , yyour ARC will increase;  you look your ARC , and next, you add the default "hello avatar"  script , your ARC is NOT Changed .

Your ARC will be changed only if your script changes the display of the object ( for instance a script who emits partcles  will change ARC because ARC increase when there are some particles . But if your script doesn t emit particles ( 99% of scripts ) your script won t change ARC . A prim can emit particles without script . ( you have deleted the script creating the emitter) and will have the same impact   .  ARC is not changed by scripts )

See ARC how is computed

By the way , ARC is more a lag viewer measure than a lag sim measure . So the owner of a land can t  take in consideration this measure to kick people . He doesn t know which graphic gard have the people

 

 

Link to comment
Share on other sites

If you really need to control the script impact on a region, you should never eject anybody for being overscripted unless you'll also ban them. If you're not absolutely sure that the person is ban-worthy, either don't do anything or suggest they script-down in-place until you can be sure they're ban-worthy.  That's because removing an overscripted avatar once they've arrived is a very expensive operation for the sim... so the very last thing you want is to lag the sim to eject them, then lag it again when they come back.

Also, for all the reasons described, determining whether somebody is so overscripted as to deserve banning (or a gentle hint) would be better based on an absurd script count than on reported memory use. Also, if the problem is so severe that you can justify a sophisticated (and itself resource-intensive) monitoring script, you might measure steady-state script time, but be advised that this metric is completely misleading until the avatar has been in the region constantly for at least a minute. [ETA: And by "steady-state" I mean several successive measurements over several minutes because the metric will temporarily skyrocket any time they add a combat meter, collar, tool HUD, or anything else with a few scripts.]

Link to comment
Share on other sites


Miranda Umino wrote:

 

See 

By the way , ARC is more a lag viewer measure than a lag sim measure . So the owner of a land can t  take in consideration this measure to kick people . He doesn t know which graphic gard have the people

 

 

Just for reference in case any one misses it, that Wiki entry is now obsolete and there is a note on the page that redirects to this article (pops).

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

Here is my input with script usage:  1)  What is more important to you--the usage of scripts or having respecdtable visitors on your land?  2)  SL is not RL.  If y ou piss off your visitors, they WILL NOT come back.  3)  Not all scripts are bad.  I believe that there still scirptors that cannot write a decent code to save their lives, but to run them off or spam them due to it is not right.  4)  Everything online is a social gathering.  Having spam bonbardments sayiing you are wearing too much scirpts is not a social event.  5)  Turn off the scirpt usage on the land parcel.  Most AOs will run under such lands that turn off scirpts.  6)  There is more than you in SL, and everyone hate to be treated bad due to scripts limits.  It is almost to the point I would report the person for abuse.  I canot have someone stop me in SL to tell me I cannot be there if I do not know the rules before hand.  I think LL needs to set regulations on this endevor.  We all haver rights, but like the laws in real life, we all have to treat everyone fairly.  Thank you.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3937 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...