Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Feature: Limit Number Of Scripts Worn By Avatars On Land & In Sims

Stacey Sugar
Registered User
Join date: 15 Mar 2005
Posts: 75
06-30-2006 22:14
Hi

I have been asked to submit a Feature Vote by Kenny Linden (his suggestion to my enquiry) with regards to the ability of parcel & sim owners to limit the number of active scripts an avatar wears on their land. This is because the more scripts on a sim the slower it runs and the more lag it generates.

In Refugio where The Barbie Club is located there are approximately 3,500 active scripts within the sim (as in permanent fixtures such as dance balls, gambling machines, door scripts, sit poses, etc.).

The Barbie Club is a top 10 most popular place in SecondLife and we can get up to 40 avatars on our land at one time.

With such a number of avatars in a sim at once time, this can increase the number of active scripts within the sim to over 7,500, which seriously drains the sims resources, and creates monumental ugly lag for everyone and also causes sim crashes especially during the auto-save process.

The scripts are caused by bling, particles, sexy walks, animation overriders and more seriously scripted weapons and shields, which I have heard are particularly nasty as some can have many hundreds of scripts.

Recently I have been administering my club, making sure that no one script is using up too much of the system resources. I've even been going round fixing the textures so we have smaller textures of 256x256 to make sure that clients FPS is good. I can control this, however I am not able to control the number of scripts worn by avatars on my land.

I am proposing a vote for LL to offer the following features to land owners (plot owners) and sim owners (island owners):

The ability to limit the number of scripts worn by each avatar on their land. If we could limit the number of scripts worn by each avatar to say 25 or 50, this would significantly speed up sims in general.

We don't want to outlaw scripts from the land, but limiting them will make sure that everyone enjoys their SL instead of being lagged out when enjoying the most popular of places.

I do hope you will discuss this proposal here, and of course lend your support to this SecondLife feature vote.

URL to Feature Vote:

http://secondlife.com/vote/index.php?get_id=1582

Luv

Stacey

xxx
_____________________
No Drama Please, I'm British
Aodhan McDunnough
Gearhead
Join date: 29 Mar 2006
Posts: 1,518
06-30-2006 22:25
I like it.

We can have an alteration in the land icons.

Green script icon = no script limitations
Orange script icon = scripts limited to 50 per avatar
Yellow script icon = script limited to 25 per avatar
Red script icon = no external scripts permitted.

A feature such as this will go a long way towards making people more responsible about resources. So many go overboard with the number of scripts on them maybe this will make them learn how to make their avatars more manageable. There is a feature called "Set scripts to not running in selection" that a lot should really learn to use. Maybe we'll see more use of llSetScriptState too.

My only concern with my colored icon proposal is that I now sure how we can have an effective representation that will also be easy to read for colorblind people. Maybe a number beside the icon? ( dash for no limit, then 50, 25, 0)
Seronis Zagato
Verified Resident
Join date: 30 Aug 2005
Posts: 454
06-30-2006 23:18
If you want to drop the lag dont reduce number of scripts. JUST kill all channel zero listeners from irresponsibly written AOs. Check other threads on channel zero listeners (theres 3 of them) for details of why they are so evil. Technical details have been posted.
_____________________
From: Johnny Mann
Just cause SL redefines what a videogame can be doesnt mean it isnt a game.
From: Ash Venkman
I beat SL. (The end guy is really hard.)
Seronis Zagato
Verified Resident
Join date: 30 Aug 2005
Posts: 454
06-30-2006 23:23
Ao: not saying a number limit would be bad, but what criteria would you use to determine which scripts get 'priority' in that queue if someone wears too many?

What about a script that changes a massive ammount of prim colors at once for a complex AV and there are about 100 different 'color handling' scripts that listen for link messages. The designer of that object was intelligent and used ONE listener (off channel) with the link msgs to handle sync issues. Thats a good design choice.

Why not limit each person to a max ammount of 'script time' in the sim in general. With parcels in general getting so much 'script time' based on percentage of sim owned in total. Then avatars on a given parcel MUST use that parcels script time slot. And land owners can set percentage of that parcels script time available to owner / group / other.
_____________________
From: Johnny Mann
Just cause SL redefines what a videogame can be doesnt mean it isnt a game.
From: Ash Venkman
I beat SL. (The end guy is really hard.)
Jack Harker
Registered User
Join date: 4 May 2005
Posts: 552
06-30-2006 23:34
From: Seronis Zagato
Ao: not saying a number limit would be bad, but what criteria would you use to determine which scripts get 'priority' in that queue if someone wears too many?

What about a script that changes a massive ammount of prim colors at once for a complex AV and there are about 100 different 'color handling' scripts that listen for link messages. The designer of that object was intelligent and used ONE listener (off channel) with the link msgs to handle sync issues. Thats a good design choice.

Why not limit each person to a max ammount of 'script time' in the sim in general. With parcels in general getting so much 'script time' based on percentage of sim owned in total. Then avatars on a given parcel MUST use that parcels script time slot. And land owners can set percentage of that parcels script time available to owner / group / other.


I'd prefer something like this. I've been in a sim before, and had a big club move in next door, and lag my own place into uselessness. A ball can do the same, leaving the value of a person's land destroyed as one place uses up most of the processing resources in the sim as a whole.

Just like residents have to share a sims prims equally, depending on the size of their land, script time should also be shared equally.
Aodhan McDunnough
Gearhead
Join date: 29 Mar 2006
Posts: 1,518
07-01-2006 00:31
From: Seronis Zagato
Ao: not saying a number limit would be bad, but what criteria would you use to determine which scripts get 'priority' in that queue if someone wears too many?


Random would be good or maybe they're cycled and alotted 25 or 50 instructions per sweep.

Really, for people attending an event that is expected to have a lot of scripts involved it's very much in their best interests to add as little load as possible so that they can get maximum enjoyment from the event. If they don't want their scripts to slow down or if they don't want scripts getting random allotment it's a simple matter to pick the ones they want to keep and which to shut off. I would.

The host can also declare "X number of scripts in use, please reduce your avatar script load for maximum enjoyment."
Seronis Zagato
Verified Resident
Join date: 30 Aug 2005
Posts: 454
07-01-2006 16:40
Ok instructions per sweep pretty much goes back to how i invensioned it. After sleeping on it i just would REALLY REALLY like to have those 'owner / group / other' max resource values in about land. That would be so much more useful than simple 'allow' flags. But we have to wait till the script resources have the infrastructure to be throttled based on land before the land can throttle based on group.
_____________________
From: Johnny Mann
Just cause SL redefines what a videogame can be doesnt mean it isnt a game.
From: Ash Venkman
I beat SL. (The end guy is really hard.)
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
07-01-2006 17:31
I'd like to point out that beyond the first run bling scripts don't actually do anything. Once the bling is set to on, that's it on, remove the script and it keeps going. That's an issue for switching off or changing particle settings for a parcel, though we can already do that one client side (try it, I turned mine way down and it helped me).

I'm also a defender of idle scripts, but even the active ones are really difficult to police as most methods of having a script do something (thus making it active) are also laggy. I think script time would be best, but done like:

Simulator has X units of script time.
Each parcel gets Y units of script time for permanent, active objects in that parcel.
Left over script time is given to avatar attachments and/or parcels which need more time as needed.

Personally for a club I'd still disable all outside scripts so only your poseballs work. I can't personally think of a script you really need at a club and can't live without besides animation over-riders for avatars such as tinies or such. But the number of those you see in clubs, and who don't have full-sized avatars is...well none really, I don't know anyone with an abnormal av that doesn't have something good they could use instead.
_____________________
Computer (Mac Pro):
2 x Quad Core 3.2ghz Xeon
10gb DDR2 800mhz FB-DIMMS
4 x 750gb, 32mb cache hard-drives (RAID-0/striped)
NVidia GeForce 8800GT (512mb)
Jack Harker
Registered User
Join date: 4 May 2005
Posts: 552
07-01-2006 17:54
From: Haravikk Mistral
I'd like to point out that beyond the first run bling scripts don't actually do anything. Once the bling is set to on, that's it on, remove the script and it keeps going. That's an issue for switching off or changing particle settings for a parcel, though we can already do that one client side (try it, I turned mine way down and it helped me).

I'm also a defender of idle scripts, but even the active ones are really difficult to police as most methods of having a script do something (thus making it active) are also laggy. I think script time would be best, but done like:

Simulator has X units of script time.
Each parcel gets Y units of script time for permanent, active objects in that parcel.
Left over script time is given to avatar attachments and/or parcels which need more time as needed.

Personally for a club I'd still disable all outside scripts so only your poseballs work. I can't personally think of a script you really need at a club and can't live without besides animation over-riders for avatars such as tinies or such. But the number of those you see in clubs, and who don't have full-sized avatars is...well none really, I don't know anyone with an abnormal av that doesn't have something good they could use instead.


AO's for clubs. A decent walk is pretty important if you want to look good. Hugs and kisses. Also, a dance attachment.

Personally though I don't go much to clubs, although I think I'd make a point of going one that forbid bling. ;)
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
07-02-2006 03:05
While I admit that hugs and aos are nice novelties to have, they're not necessary in a club? Most of the time you don't spend hugging but dancing, which doesn't require script as you can play the animations from your inventory, or an object's inventory (thus HUD attachments can still be a handy way of organising common animations, heh).

The built-in walk and stand anims ought to suffice for the little amount of walking and standing you're going to do?

For the club's own ao dance system, it would be fine since it isn't an outside script.

I dunno, it's just that limiting scripts per avatar seems like it would nerf the few functions you may actually require them for, or carefully optimised scripts, while not guaranteeing the disabling of the scripts you really do want to be rid of.
_____________________
Computer (Mac Pro):
2 x Quad Core 3.2ghz Xeon
10gb DDR2 800mhz FB-DIMMS
4 x 750gb, 32mb cache hard-drives (RAID-0/striped)
NVidia GeForce 8800GT (512mb)
Angel Fluffy
Very Helpful
Join date: 3 Mar 2006
Posts: 810
07-02-2006 09:57
From: Seronis Zagato
Ao: not saying a number limit would be bad, but what criteria would you use to determine which scripts get 'priority' in that queue if someone wears too many?

What about a script that changes a massive ammount of prim colors at once for a complex AV and there are about 100 different 'color handling' scripts that listen for link messages. The designer of that object was intelligent and used ONE listener (off channel) with the link msgs to handle sync issues. Thats a good design choice.

Why not limit each person to a max ammount of 'script time' in the sim in general. With parcels in general getting so much 'script time' based on percentage of sim owned in total. Then avatars on a given parcel MUST use that parcels script time slot. And land owners can set percentage of that parcels script time available to owner / group / other.

A much better idea - but harder to put into practice as it would require process accounting to track the CPU time used by each script and a total for each av.... It'd be complicated.

How about specific measures to target the most laggy script functions?
For example, a checkbox for land parcels that stops all scripts listening on channel 0 from working?
Seronis Zagato
Verified Resident
Join date: 30 Aug 2005
Posts: 454
07-02-2006 15:58
From: Angel Fluffy
A much better idea - but harder to put into practice as it would require process accounting to track the CPU time used by each script and a total for each av.... It'd be complicated.

How about specific measures to target the most laggy script functions?
For example, a checkbox for land parcels that stops all scripts listening on channel 0 from working?


Channel zero is a seperate issue (and seperate, already available thread). And no cpu time checks would really be needed. Every 'static' LSL function (setPos, getPos, linkmsg) could be given its average 'completion time' stamp and that precomputed value would be what is used to determine total usage for any given event. The non static parts could be given an avg computation value based on number of lines / complexit or even analysis to figure it out more accurately. Dynamic functions like list management could be given an avg value based off number of elements.

The majority of these would be inexpensive table lookups and most of them could be computed at compile time with only the dynamic functions needing run time evaluation. Then as an event is being checked if it should compute or not its computed time would just be compared to how much resource is available. That is a lot cheaper than cpu time management as this could be more preemptive instead of post-emptive.

- Edit -

For the record even WITH script throttling id still ban all chan 0 listeners from o utside sources as an additional measure due to the pure idiocy of most implimentations.
_____________________
From: Johnny Mann
Just cause SL redefines what a videogame can be doesnt mean it isnt a game.
From: Ash Venkman
I beat SL. (The end guy is really hard.)
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
07-02-2006 17:47
I really don't have a problem with this suggestion except for a few specific caveats.
1) There is no llSetLinkPrimitiveParams (and llSetPrimitiveParams is very limited in what attributes it can controll).
2) There is no client side script interface.

The first is a problem which limits what can be done. It means if you want a highly dynamic object you have to have a link message script in every prim. For example, I have writen a posable tail, instead of using hidden prims for each pose, I use a script in each prim to reposition it; currently I have a dozen positions, with no limit to the number possible (they are stored and read from notecards).

The second forces alot of work to be done on the sim. Complex huds (like one I recently wrote) with dynamic content must run on the sim side, eating sim resources; and because of the previous reason, this problem is amplified. In the previous mentioned HUD, it ended up using about 100 scripts; half were in dynamic prims (like the tail script mentioned before) and the other half were in XyText type prims.

Untill these two issues are addressed, I cannot in good conscience support this feature request.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
Parcel Script Priorities
07-03-2006 16:48
I have a better idea.

Per-parcel script priorities.

From: someone

  • All avatars get equal script priority.

    [ ] All avatars get equal script time - divides avatar's script priority by their share of the parcel's scripts.

  • Group members get [50]% of script time.

  • Group officers get [75]% of script time.

  • All others get [25]% of script time.
  • Angel Fluffy
    Very Helpful
    Join date: 3 Mar 2006
    Posts: 810
    07-12-2006 15:00
    From: Argent Stonecutter
    I have a better idea.

    Per-parcel script priorities.


    I like your idea, though I'd tweak it to something like :
    1) under normal conditions, spread priority between :
    land owning avatar/group scripts : X
    scripts set to group : Y
    other scripts : Z
    1) when sim time dilation _____ is reached, use a different set of priorities :
    land owning avatar/group scripts : X
    scripts set to group : Y
    other scripts : Z

    That's allow guest scripts where possible but let you aggressively limit them when the area starts to lag.
    _____________________
    Volunteer Portal (FAQs!) : https://wiki.secondlife.com/wiki/Volunteer_Portal

    JIRA / Issue Tracker : http://jira.secondlife.com (& http://tinyurl.com/2jropp)
    Argent Stonecutter
    Emergency Mustelid
    Join date: 20 Sep 2005
    Posts: 20,263
    07-12-2006 17:11
    From: Haravikk Mistral
    While I admit that hugs and aos are nice novelties to have, they're not necessary in a club?
    A club is exactly where every socially oriented tool you've got *is* important, from gestures through AOs through hug scripts.
    Argent Stonecutter
    Emergency Mustelid
    Join date: 20 Sep 2005
    Posts: 20,263
    07-12-2006 17:15
    From: Angel Fluffy
    That's allow guest scripts where possible but let you aggressively limit them when the area starts to lag.
    If the area isn't lagging (that is, there's always spare script time in each frame), then this algorithm wouldn't even come into play since only the few scripts that were overrunning the frame because they were doing something computationally intensive would even be deferred.
    Anthony Hocken
    Registered User
    Join date: 16 Apr 2006
    Posts: 121
    08-12-2007 13:51
    Well one year on and the features proposed in this thread still havent been implemented. And it's probably one of the most important requests to improve the Second Life experience.

    I like Argent's proposal. I was going to suggest something similar.

    Preventing the problem from happening in the first place is the hardest part, and it relies on server code being more robust *grits teeth*. But at the least we need to be able to see where the lag is being caused so sim owners can act on it. So where you have region debug options to view the objects ordered by how heavy scripts are, we need something for avatars too. And I dont think this is as hard to implement as some think. We can already get a lag rating indirectly for an avatar if they're sitting on an object. We just need this ability for avatars that are not sitting. Couple that with a script function to read the lag value of any avatar in the sim and we can manage it proactively.

    Or simply have more robust code that allows us to walk and type at all times, and all scripts are throttled as needed to allow that. That’s where 99% of the frustration comes in. Then just give priority to objects owned by the land owner and problem essentially solved for the most part.

    When you battle with lag issues on a daily basis and we see Linden Labs doing practically nothing whatsoever to address this it becomes so unbelievably frustrating.

    I think one of the biggest contributors is jewelry made by people that know nothing about scripting. They take one script and drop it in a prim and it listens on channel 0 for a command to change colour or enable bling or whatever. Then the maker drops that same script into all the other prims of the jewelry. You end up with potentially hundreds of listeners all created by one object worn by one person which single-handedly brings a sim to a crawl. Even if it doesnt use channel 0 it's still a huge problem. I’ve seen this happen when all the lag was caused by one jewelry item. Said item was taken off and the sim’s time dilation returned to normal. Item was put back on and issue immediately returned.
    Ed Gobo
    ed44's alt
    Join date: 20 Jun 2006
    Posts: 220
    08-12-2007 18:50
    Mono is getting closer and should fix all this. Babbage has said it will run faster by q couple of orders of magnitude. Interesting to see if he can pull it off without too many glitches.
    Haravikk Mistral
    Registered User
    Join date: 8 Oct 2005
    Posts: 2,482
    08-13-2007 10:11
    Just because it runs faster doesn't mean someone won't still waste more than their fair share of script time with a 200+ script avatar with an overload of effects on it. Are there any JIRA proposals? The performance meta-issue can be found at:
    http://jira.secondlife.com/browse/VWR-864

    But it has nothing that looks like these script limiting ideas. I'm all for Argent's priority based scheme so long as it makes sure that land-based scripts still get priority. At the same time it would be nice for parcel-size based priority as well so people with 50% of the sim can be guaranteed to have up to 50% of land-based script cycles if they need it. This way a 512m plot club with 5000 scripts on it only gets good performance if the rest of the sim is idle.
    _____________________
    Computer (Mac Pro):
    2 x Quad Core 3.2ghz Xeon
    10gb DDR2 800mhz FB-DIMMS
    4 x 750gb, 32mb cache hard-drives (RAID-0/striped)
    NVidia GeForce 8800GT (512mb)
    Lindal Kidd
    Dances With Noobs
    Join date: 26 Jun 2007
    Posts: 8,371
    08-13-2007 12:41
    I'm a selfish little airhead. I wanna keep ALL my scripts.

    LL should increase server performance to handle the load...and baby, I'm the girl who crashes sims with her hairdo.

    But, I'm worth it.
    Anthony Hocken
    Registered User
    Join date: 16 Apr 2006
    Posts: 121
    Solution!
    08-13-2007 16:27
    From: Lindal Kidd
    I'm a selfish little airhead. I wanna keep ALL my scripts.

    LL should increase server performance to handle the load...and baby, I'm the girl who crashes sims with her hairdo.

    But, I'm worth it.


    Well that makes the algorithm MUCH easier...

    ------

    if Avatar == "Lindal Kidd" then
    ScriptAllocation = 5%

    ------