Serious Script Problem in Terminous
|
|
Persephone Phoenix
loving laptopvideo2go.com
Join date: 5 Nov 2004
Posts: 1,012
|
05-04-2005 13:42
In Terminous our SIM FPS is excruciatingly low. It very seldom gets above 50, and SIM FPS should be roughly twice that on average. Tesla Linden visited and told us that our SIM FPS was in fact pretty low and that it was caused by too many active scripts (700 in our sim). We were also told that sensors, listens, and timers were the worst causes of lag, but inefficient scripts were also an issue.
I have eliminated all but a handful of timers on our 11,000 property... leaving only a few lights that respond automatically to light cycles. We have no sensor scripts that i know of (eliminated stuff that noticed when visitors were there and gave names of visitors) though I do have a number of tipjars that indicate when staff are online or offline (are those sensors?) And we now have less than 20 open-listen poseballs (which seems reasonable for 11,000m). Any sense of what else we can do to eliminate lag and improve this awful FPS? I would be very very grateful to anyone who could actually help us with this situation.
Basically I was told that if I can get my neighbours onside to eliminate Lag, that is my only solution. (We had a sim crash and restart that helped only marginally and only shortly). What should I tell my neighbours to eliminate other than poseballs that hide/show? How many of these problem scripts could someone have, comfortably, on a 512 piece of property, say, without adding "more than his or her fair share" of a drain on CPU resources?
_____________________
Events are everyone's business.
|
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
05-04-2005 14:04
From: Persephone Phoenix Any sense of what else we can do to eliminate lag and improve this awful FPS? I would be very very grateful to anyone who could actually help us with this situation. Essentially, anything that forces the server to update or check something will cause lag. While it's easy to tell what does when you're a scripter, I understand it might not be as easy to see for you. Here's a short list, in no order, of the most common lag-inducers: 1) If it's moving constantly, and isn't using the newbie inventory rotation script (llTargetOmega is a client-side effect that doesn't lag. It makes up most spinning objects).
2) If it's changing color, size, or certain attributes rapidly and often.
3) If it's constantly calling a sensor. Examples of this are: followers, ban scripts, "guestbook" scripts, and certain physical movers.
4) If you see lots of scripts that aren't in the same object "communicating." Listeners that are used often cause lag.
5) Check the skies for any rogue scripts that might be hitting the sim hard.
6) Check the sim to see if anything is set as "physical" and is colliding with a surface. Physics is a BIG thing in Second Life, and can quickly bring a sim to its knees. If it doesn't need to be physical, it shouldn't be.
7) Watch the behavior of sim statistics (ctrl-shift-1) against what's going on in the sim. See if you can directly tie a lag spike to an event.From: Persephone Phoenix What should I tell my neighbours to eliminate other than poseballs that hide/show? Short of buying them out (which is a last resort), I hope you have good neighbors. You can refer them to the list above. From: Persephone Phoenix How many of these problem scripts could someone have, comfortably, on a 512 piece of property, say, without adding "more than his or her fair share" of a drain on CPU resources? This is a question that's lead to fierce debate. As a rule of thumb, someone with a 512m^2 shouldn't be sucking a sim dry - so if you see a lot of "griefer" stuff on the plot, report it to the Lindens.
_____________________
---
|
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
05-04-2005 14:14
Well, I just went tooling around Terminus out of curiosity. Though the sim's FPS is unusually low, it seems to handle itself pretty smoothly.
I also used the object update visualiser (debug menu, show updates) and the only scripts activly causing object updates that were above and beyond were the "bubbles" and "DryIce" particle scripts scattered around your waterfalls. I don't know why they're so busy, but culling them (or writing the script to be more efficient) might help.
Of course, Jeffrey's suggestions are fabulous as usual. Hope this all helps!
|
|
Persephone Phoenix
loving laptopvideo2go.com
Join date: 5 Nov 2004
Posts: 1,012
|
Particle Effects and Moving Water
05-04-2005 14:29
Aren't particle effects and moving water only able to cause client-side lag that is controllable through changing settings? Would either of these slow sim FPS?
_____________________
Events are everyone's business.
|
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
05-04-2005 17:43
From: Persephone Phoenix Aren't particle effects and moving water only able to cause client-side lag that is controllable through changing settings? Would either of these slow sim FPS? Yes. However, the two scripts I mentioned are causing updates. I dunno why. *shrug*
|
|
Legith Fairplay
SL Scripter
Join date: 14 Jul 2004
Posts: 189
|
05-04-2005 20:00
I think I've come to the conclusion the "active scripts" number is completely meaningless. (it tells you how many scripts are marked "running" if I'm correct.. anyone know more?) Either way it dose not account for script in some idle state, waiting for a long lived timer for example. Or a touch event. Even listens on an inactive channel produce no notable lag.
the important number is the "Run Tasks" item under Time.. I saw over 10ms on your sim.. ideal is abput 3 to 3.5 for a max point. (physics should also be in that range) as soon as the combined time of physics step and run tasks go beyond 6 or 7 your sim won't be very happy.
As for the number of scripts.. its hard to give a good answer.. but let me use your online status items for an example. If they have a timer that triggers every 30 seconds or so, and then pole the status of the user, and change the prims info if and only if the status changed.. they will produce practically no lag.
However if they just have the check in a while loop, constantly checking without sleeping.. it can produce a noticeable bit of lag.
This means I can have many objects with many scripts doing absolutely nothing despite the fact they are running.. or only one hundred scripts making many expensive calls constantly killing the sim.
I'll be glad to be in a lag free telehub sim.. at 150-200sim fps, a little higher than ideal in run task time, and a low physics time. I hope your sim gets better.
|
|
Persephone Phoenix
loving laptopvideo2go.com
Join date: 5 Nov 2004
Posts: 1,012
|
What Kinds of Items / Objects to Eliminate?
05-06-2005 15:55
We have too many running scripts in Terminous, and I am trying to meet with my neighbours to talk about ways to reduce these... or do something to reduce sim FPS. I am taking this on because the spa gets a lot of traffic, and so we are somewhat responsible for lag from avatars. I want to be as good a neighbour as possible and eliminate what I can in terms of things that cause lag. I am going to take a poster's advice and get rid of some of my update-causing particles, but this is, as far as I can tell, only causing client-side lag (still very frustrating, I am sure).
Of the objects below, can anyone tell me which are the worst offenders in terms of causing Lag? (understanding that given efficient scripts are better than inefficient ones in any category) This is for my benefit and for the benefit of neighbours who may want to know what they should consider eliminating to reduce lag.
Poseballs with Open Listens? Furniture with poseballs with Open Listens? Furniture / Poseballs with /9 or /5 or whatnot listens? Security Fences? Guest / Visitor Sensors that greet visitors? Guest / Visitor Sensors that greet visitors and email land owner? Running Water? Lights or other objects that turn on or move on timers? Vendor Machines that automatically scroll through items on a timer? Vendor Machines that are moved by pushing buttons? TVs with slides? TVs with streamed-in-video? Other?
I appreciate the fabulous advice I have gotten in this thread. Any more I can get in terms of prioritizing what to address in the sim would be really helpful. Thanks! ~ Persephone.
_____________________
Events are everyone's business.
|
|
Legith Fairplay
SL Scripter
Join date: 14 Jul 2004
Posts: 189
|
05-06-2005 16:36
I've added my opinion (ie what to go after first) to your list.. and below tried to describe the general issues to look for. From: Persephone Phoenix
Poseballs with Open Listens? (minor issue if no one is in say range of them) Furniture with poseballs with Open Listens? (as above) Furniture / Poseballs with /9 or /5 or whatnot listens? (unless something else is using these channels don't worry about them) Security Fences? (big problem) Guest / Visitor Sensors that greet visitors? (big problem) Guest / Visitor Sensors that greet visitors and email land owner? (big problem email probably doesn't add much though) Running Water? (most likely not a problem.. see below) Lights or other objects that turn on or move on timers? (depends on how often) Vendor Machines that automatically scroll through items on a timer? (just annoying remove them..) Vendor Machines that are moved by pushing buttons? (no problem at all) TVs with slides? (can give slow down.. but one isn't really an issue) TVs with streamed-in-video? (depends on how it is scripted.. streamed video its self causes no lag) Other?
I appreciate the fabulous advice I have gotten in this thread. Any more I can get in terms of prioritizing what to address in the sim would be really helpful. Thanks! ~ Persephone.
I think this is a good approximate order of importance: 1) reduce or eliminate scripts that run constantly.. while loop with some processing, check email constantly (and not on a timer), items waiting for user input, or that only run occasionally (even if that means a few lines of code every second) are not nearly as bad. 2) Security fences, the methods of looking at who is around are slow, to increase this problem they have little or no sleep time between calls. 3) Same goes for other sensors that great people constantly (however if these pole only every 5 or 10 seconds this might not be enough of an issue) 4) constantly moving objects (ie. things that quickly snap to place every 0.2 seconds), this includes objects changing state (texture actually changes, text changes, light turns on or off) don't worry much if updates are less than a min though. 5) High number of posballs and other listening objects in areas where there is a lot of communication on the channels they are running on. (a listener in a completely silent sim don't produce lag) Thus pos balls are probably not much of an issue be if many objects are communicating with each other problems might happen. 6) Automatic updating/chatting venders because of 4 and they are annoying  7) TVs with slides can be an animated texture, in which case they are fine.. but most are updating textures thus fall under 4.. but one TV updating every 30-60 seconds if the owner enjoys it is worth staying in existence.. if there is a wall of them you will have a problem.  Running water shouldn't cause lag.. but animated textures have been know to be buggy, thus its possible that a script is updating the texture often to make it behave, if this is too often the slowdown from problem 4 will happen 9) physical objects and movers. many physical movers update only occasionally thus adding little lag due to scripts. However they do cause the physics engine to be busy. However the physics time slice of your sim seemed reasonable when I was there.
|