Jump to content

is there a limit on how many scripts you can use in a Linden home


MaxSilverDragon
 Share

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

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

Recommended Posts

To my knowledge there's not a set limit, but if the region you're on is experiencing some issues and complaints with lag, you risk getting ARd. I've found this guideline to be good- on about land> parcel details, main tab at the bottom, your script info for your parcel: under 10k memory usage, you're good, lower the better. 5-6k is average. Up to 15k, you want to be careful in any more additions. Over 20k, you're stepping into the danger zone and probably should adjust.

  • Like 3
  • Thanks 4
Link to comment
Share on other sites

I think you might be missing the point. No, there isn't a hard limit to the number of scripts you can use, but there IS a limit to how much processing time and memory the simulator can devote to everyone's scripts before performance degrades for everyone. So yes, you *do* need to worry because you have to share that sim with as many as two dozen other people. It's not just the number of scripts either. It's also what those scripts are doing. Someone can easily use a disproportionate  amount of simulator resources with just 351 prims of stuff. If that happens people can report it and they'll find a bunch of their stuff returned along with a warning for abusing the sim resources.

I had to do just that a few weeks ago when a neighbor in my sim on the mainland set up a giant breedables "mill" and had so many rezzed out constantly it drug the whole sim down to a crawl. 

  • Like 4
Link to comment
Share on other sites

Its also worth asking if every piece of furniture you rez HAS to be animated. I've seen this time and again, and once upon a time I was guilty of this myself. All my furniture HAD to have animations or give props or serve a function beyond just looking good. I didn't realise the implications of that on contributing to lag for myself or other people. And to be honest I didn't care. Now I do, and if we want a less laggy SL more people should too.

First ask yourself if you really need animations or scripts in everything you rez. Pay attention to what you know you will use and what is just there to look good. Do you anticipate entertaining a lot of people so you need all your 8 chairs to be usable? Do you really need to change the colour of your curtains once you have selected the one you want? Do you really need to be able to turn taps on in a bath if you don't ever intend to bathe in your house? Really take a look and think ahead. All those chairs and bathtubs and showers and toilets that no one uses contain scripts that aren't doing anything, just waiting. And that's wasted resources for a region that don't need to be there if you have no use for them.

Of course removing scripts from objects isn't something I'd recommend if you're not comfortable in doing so. People worry about breaking objects and that's understandable; once you remove scripts the object essentially becomes just a prop. I've read elsewhere on the forums the difference between stopping scripts versus removing and accounts seem to vary (since a lot of scripts are essentially "asleep" until we wake them up/trigger them to act, and some are just running in the back ground all the time). Experts could probably weigh in with more accurate advice, but me personally, I remove the scripts I don't need. That's because I take stock of what I use and don't use and remove the scripts of those I won't use, which means less scripts, which equates to better (however slight) performance for me and my neighbours. The added benefit to removing scripts and making furniture props is that a majority can be linked together to lower land impact. But since this topic isn't about linking I won't say anything more about it. Again I am speaking from personal experience because this above is exactly what I do in all my homes, whether it's in Bellisseria or when I was a rental tenant on other regions.

If you're going to remove scripts make sure you make a copy of the original object first so if something goes wrong you won't lose it.

If in doubt, practice first. A little research can help you decide what's best for you if you really are serious on reducing scripts and potentially lag.

If you want expert advice, ask an expert. I am not one of them. This is just my personal opinion and it helps me. You have to find a method that works for you. :) 

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, MaxSilverDragon said:

then I don't really have to worry I'm more concerned about running out of object space now than script memory space

You really don't have to worry about script memory usage.

Once upon a time way back when, LL would show off their new shiny servers and tell us all how much ram they had, they haven't done that for years and those old servers are now being used as door stops. (You can buy a cheap PC in walmart with more oompf than the last machines we knew the details for!). However, some like to cite those old numbers as though they are still relevant.

We have no idea what the machines in LL's data center look like. We can reasonably assume they aren't running a museum and are significantly better equipped than they were in 2008, not to mention all the infrastructure changes that have happened in that time moving stuff into the cloud.

 

When it comes to Linden homes, keep in mind that each full region doesn't have full resident use (like regular mainland or a private island may), this is primarily to give enough Li headroom for roads and the 'free' houses, it also gives quite a bit more headroom for scripts too.

The best tip is when placing multiple copies of the same object (like a chair), don't rez each one by one, shift copy them. Keep the number of animating things down (animating as in the thing itself animates .. like pets / critters), and don't leave stuff out you rarely use (like a greedy table that only see's a game once a blue moon).

A couple of breedables are technically fine, but they will attract unwanted attention (deserved or not) from neighbors who like to peek over the fence.

I would not recommend removing scripts.

I would not recommend watching the script stats like a hawk. The best performance metric is perceptual .. when you interact with the thing, does it do the thing in a satisfactory manner. If not .. well .. this is shared land, your ability to debug script usage is practically zero, and you can't expect a Linden to come out and start inspecting everything, they just don't do that.

  • Like 4
  • Thanks 2
  • Confused 1
Link to comment
Share on other sites

Right now, 3000-5000 scripts doing nothing can use up most of a region's script time. That's really a bug. At Server User Group, we're told that efforts are underway to reduce the overhead of idle scripts substantially. I hope LL succeeds at this.

This problem wasn't fully realized until recently. Then some people found sims with no avis and nothing much going on in sim overload. Some others discovered that you can put an empty sandbox into script overload with a few thousand scripts that are sitting there doing nothing. This is getting attention from LL because it's a huge server load that costs them and benefits nobody. Discussed previously in another topic.

So I'd suggest not putting massive efforts into removing idle scripts at this time.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

  • Moles
7 hours ago, MaxSilverDragon said:

if there is what's the limit so I don't accidentally go over it

There isn't, but there's a general rule against abusing region resources.   However, it's unlikely that in the normal course of events you'd do that, unless you're planning on keeping a menagerie of breedable critters or something similar.

  • Like 4
  • Thanks 10
Link to comment
Share on other sites

5 hours ago, animats said:

Right now, 3000-5000 scripts doing nothing can use up most of a region's script time. That's really a bug. At Server User Group, we're told that efforts are underway to reduce the overhead of idle scripts substantially. I hope LL succeeds at this.

This problem wasn't fully realized until recently. Then some people found sims with no avis and nothing much going on in sim overload. Some others discovered that you can put an empty sandbox into script overload with a few thousand scripts that are sitting there doing nothing. This is getting attention from LL because it's a huge server load that costs them and benefits nobody. Discussed previously in another topic.

So I'd suggest not putting massive efforts into removing idle scripts at this time.

On a side note, I always roll my eyes when I tp someplace that has 8, 10 or even 15 thousand active scripts on the sim but they have a scanner that puts my name on some billboard of shame and pings me with a message like "Uh, if you could remove some of your scripted attachments to help reduce lag that would be greaaaat."

  • Haha 5
Link to comment
Share on other sites

32 minutes ago, Tomomi Fukai said:

On a side note, I always roll my eyes when I tp someplace that has 8, 10 or even 15 thousand active scripts on the sim but they have a scanner that puts my name on some billboard of shame and pings me with a message like "Uh, if you could remove some of your scripted attachments to help reduce lag that would be greaaaat."

Especially since those gadgets usually just count scripts - not script time - I have been named and shamed by people using one quarter of my scipt number but using almost double my script time, ... *sigh*

Edited by Fionalein
  • Like 3
Link to comment
Share on other sites

3 hours ago, Tomomi Fukai said:

On a side note, I always roll my eyes when I tp someplace that has 8, 10 or even 15 thousand active scripts on the sim but they have a scanner that puts my name on some billboard of shame and pings me with a message like "Uh, if you could remove some of your scripted attachments to help reduce lag that would be greaaaat."

How to create a perfect lag storm on a busy region that's up against it's cap, like a shopping event.

  1. Avatar enters region and it's state is loaded, all scripts get going, the eagle has landed. This is the single most expensive event a region undertakes.
  2. Script checker pokes the mono engine and determines the avatar is over some arbitrary limit and ejects them.
  3. The avatar is unloaded and packaged up to be sent to another region. This is the second most expensive region event.
  4. Another avatar immediately enters step 1.

This maximizes the time a region spends in the load/unload phase. Script performance on the region looks horrific .. because the region has no time to run any scripts, it's too busy spinning the revolving door as fast as it can. Toss in some massive spikes in UDP traffic with each entry & exit, a room with 60 people and 300 vendors each showing half a dozen 1024 textures .. everyone's connection will be completely saturated compounding a stressed region with massive client side lag.

Nailed it.

  • Like 6
  • Thanks 2
Link to comment
Share on other sites

12 hours ago, CoffeeDujour said:

The best tip is when placing multiple copies of the same object (like a chair), don't rez each one by one, shift copy them

In my continual quest for SL understanding ---- What is the difference in rezzing a new copy from inventory versus copying one that is already rezzed?  

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, LittleMe Jewell said:

In my continual quest for SL understanding ---- What is the difference in rezzing a new copy from inventory versus copying one that is already rezzed?  

(Theoretically) slightly lower script memory use. The shift copy and original will use the same memory for their code and only have separate working / variable space, rather than there being two full copies of everything.

  • Thanks 6
  • Confused 1
Link to comment
Share on other sites

  • Moles
1 hour ago, CoffeeDujour said:

(Theoretically) slightly lower script memory use. The shift copy and original will use the same memory for their code and only have separate working / variable space, rather than there being two full copies of everything.

Are you sure about that?    I don't necessarily disagree, since all I know is what I've read in the Wiki:

Quote

Mono tip: Mono can do bytecode sharing. Thus multiple copies of scripts with the same asset id will only take up as much room as one instance. Imagine some script that you use a dozen times on your land. If each of the objects containing the script is separately compiled from text source, you will use up a dozen times the script's size of memory. But if instead you simply drag a copy of the single, already compiled script into each of the dozen objects, then no matter how many copies exist they only take up the size of one script (plus data) in memory.

http://wiki.secondlife.com/wiki/Mono#Mono_benefits

That suggests to me that (so long as the script is compiled in Mono, of course) every instance of the object you create on the region -- whether by drag-copy or by rezzing from inventory -- should use the same bytecode.

But this isn't something I know much about since I don't often attend the relevant usergroups and I don't think the Wiki article has been updated since 2008, so I am perfectly prepared to learn something new here.

  • Like 4
  • Thanks 5
Link to comment
Share on other sites

I vaguely remember something from way back when that a shift drag copy is not the same as a fresh object rez, which is not the same as dropping a compiled script from inventory directly into a target object either. I remember doing some tests back when I had a region before I had built anything on it, but I didn't write anything down (that has survived at least)

I'm kinda eeeeeeehhhhh ... as it has been many years and even if correct, the memory saving is trivial in the grand scheme of things (stuff like OS reboots or core system updates could shift memory usage by significantly more than the amounts involved here). 

Happily be proven wrong if that means we get some up to date accurate information about this sort of thing.

Edited by CoffeeDujour
  • Like 4
  • Thanks 1
Link to comment
Share on other sites

CIL bytecode can be precompiled, loaded and executed and when so then the runtime JIT compiler is not required. From what I remember of the Linden chat at the time the LSL Mono engine can do this also.  Drag/copy and dragging a previously compiled (saved) script from inventory does this

  • Thanks 4
Link to comment
Share on other sites

  • Moles
5 hours ago, Mollymews said:

CIL bytecode can be precompiled, loaded and executed and when so then the runtime JIT compiler is not required. From what I remember of the Linden chat at the time the LSL Mono engine can do this also.  Drag/copy and dragging a previously compiled (saved) script from inventory does this

That was how I've always  understood it, too, but since there have been plenty of things I'd always thought were true about LSL that later turned out not to be quite the case, I'm always prepared to listen to explanations of how the wiki is mistaken or misleading.

  • Like 2
  • Thanks 2
Link to comment
Share on other sites

On 7/19/2019 at 9:41 AM, CoffeeDujour said:

The best tip is when placing multiple copies of the same object (like a chair), don't rez each one by one, shift copy them.

 

That method has one drawback, though: scripts will reset. Especially on seats, where you spent time to do the whole 'Adjust' thingy (and you don't have access to the AVpos or similar config file), a scripts reset will cause all those stored positions to be lost. That won't happen if you rez straight from inventory.

  • Like 1
  • Thanks 3
Link to comment
Share on other sites

30 minutes ago, Quartz Mole said:

That was how I've always  understood it, too, but since there have been plenty of things I'd always thought were true about LSL that later turned out not to be quite the case, I'm always prepared to listen to explanations of how the wiki is mistaken or misleading.

i would have to look it up in the chat archives to be absolutely sure about what was said. But as I remember when the conservation with the Linden in it about all this was being had, my understanding was that the Linden was meaning that CIL bytecode was being precompiled (ahead-of-time) into native code. And it was the native code that was being loaded and executed when we drag a saved/compiled LSL script into a new object

the wiki says that 2 same scripted objects can share the same executable bytecode. Which as read would imply that the CIL bytecode is being instantiated on load startup by the JIT

i have never seen the source for the LSL Mono runtime virtual machine, so I can't be sure which of these methods are being used. It could be that both are used. Dependent on some unknown to us, as users, conditions or circumstances

  • Thanks 4
Link to comment
Share on other sites

I suppose one could script a chair such that positions are not lost on Reset; depends on what is re-initialized in the Reset event handler.  Always safest to transcibe them to a notecard, if the object will give them to you.

I think using shift-drag to copy sittable objects can be risky because prim properties (like the sit target and particles) are not copied.  At least, that's how it used to work. (Remember, when you shift-copy the one you've moved is the original one, and the one left behind is the copy).  You can script around that; animation scripts that preserve and reset the sit target on every sit take care of that for you.  Just don't be amazed if a shift-copy of a simple chair doesn't work so well.

  • Like 1
Link to comment
Share on other sites

I am not good with numbers. I am always confused. What is "memory used: 10182 kb"

That is not k?

kb is lower than k?

On 7/19/2019 at 6:37 AM, Morena Tully said:

To my knowledge there's not a set limit, but if the region you're on is experiencing some issues and complaints with lag, you risk getting ARd. I've found this guideline to be good- on about land> parcel details, main tab at the bottom, your script info for your parcel: under 10k memory usage, you're good, lower the better. 5-6k is average. Up to 15k, you want to be careful in any more additions. Over 20k, you're stepping into the danger zone and probably should adjust.

I always run into problems when I can't count on my fingers and toes.

😵

  • Like 1
  • Haha 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1741 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...