|
Dudeney Ge
EduNation Archipelago
Join date: 21 Jul 2006
Posts: 95
|
03-15-2007 13:37
Hi Folks,
Sorry if this has been covered before, but on a private island, looking at Estate, then Top Scripts, what would be considered an acceptable number of scripts and time taken? I realise this is probably a 'how long is a piece of string' question - but any guidelines?
DG
|
|
Element Smirnov
Registered User
Join date: 13 Oct 2006
Posts: 108
|
03-15-2007 13:44
not sure if this will answer your question, but it explains the stats.: http://secondlife.com/knowledgebase/article.php?id=174
|
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
03-15-2007 14:42
I tend to aim my scripting at each individual script being less than or equal to 0.005 throughout 99% of it's existence (activity spikes during complex user-initiated functions are sometimes unavoidable). Of course, 0.001 is always the goal...but that's not always attainable  I say any script that has a time rating of 0.01 or higher needs a serious look. Chances are it could have been done better.
_____________________
--AeonVox--Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
|
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
03-15-2007 15:06
I have a fully populated Island. I run about 1100 scripts doing on average 8ms script time. However I think this is probably less than average. I've seen sims with 4000-5000 scripts going. I think the best judge is, how laggy is the sim, and how much total script time. But what are good and bad numbers is open for interpretation.
|
|
Gaius Goodliffe
Dreamsmith
Join date: 15 Jan 2006
Posts: 116
|
03-15-2007 15:35
Guidelines: If you're not experiencing lag, don't worry about it. If you are, check the debug info to see what's causing it. On my own sim, noticeable lag and TD drops are almost invariably connected to network time (thanks to LL bandwidth or router saturation issues of late) or image/agent time (which I chalk up to load on LL's databases) or, every once in a while, physical collisions. Scripts are the least of my worries.
You listen to the fora and blog comments and you'd think scripted objects are a major cause of lag. They generally aren't. I'm not saying scripts can't or don't cause lag, but it's pretty far down on the list of things that do. Unless you're seeing problems, I wouldn't worry about it.
|
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
03-16-2007 08:31
In theory, any time the "Total Frame Time" gets to 22.3 ms, scripts start to feel the crunch and aren't given unrestricted use of the processor. So if you want to be sure your sim is running as smoothly as possible, you could try to keep the "Total Frame Time" just under 22.3 ms, by limiting the number of active scripts in your sim.
In practice, no matter how stingy you are with scripts, people will come in with 500 attached on their avatar and jump your Script Time up to 15ms/frame, and there's nothing you can really do about it.
In my experience, the biggest factor in script time is not what each individual script is doing (unless you've got a ton of heavy-processing scripts), but the total number of active scripts in the sim. That's because each active script has an overhead in script time per frame just because it exists, even if it's completely dormant and doing nothing (say, just a llSitTarget() call). In my sim (which is a class 3, so not as beefy as most "modern" sims), as soon as I get above 1500-2000 scripts, the Total Frame Time gets to its upper limit of 22.3ms, and scripts start to jostle for processor time. In practice, the sim can handle around 2500-3000 before my scripts really start to behave badly due to being unable to get enough processing time.
I do have several processor-heavy scripts in my sim, which make heavy use of physics, so your experience may be different. But from what I can tell, the best thing you can do to take care of your sim is to limit the number of scripts in the sim first, then consider how efficient they are. Remember that simple scripts with calls like llSitTarget() and llSetTextureAnim() don't need to be continually running to continue to have their effect. You can set these running once so that they have their effect, then uncheck that "running" box to prevent them from impacting the sim while they're doing nothing. I keep the script around and not running so that I can start it up again if I modify or duplicate the object.
Generally speaking, as I said above, the biggest script drain on your sim will be avatars with their 500 scripts in their attachments (I've seen some with as many as 1000!), and they'll be able to lag all of your scripts just by teleporting in. Do your best to keep the number of scripts in your builds to under 1000 if you possibly can. A sim with 4-5000 scripts is severely suffering, and you'll find that even simple scripts often get delayed on the order of several seconds, and get timer events 1 to 2 times a second at the fastest.
|
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
03-16-2007 08:33
Also of note: The Top Scripts list used to list ALL scripts in the sim (except those in avatars' attachments), but now it only lists a few hundred. Even when all scripts were listed, the "total time" figure was nowhere close to the Script Time stat, even when all avatars in the sim detached all scripted attachments. I think this is because the Top Scripts list doesn't take into account the processing time overhead that seems to be attached to every running script, regardless of whether it's doing anything.
Can we have mono yet?
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
03-16-2007 13:47
In my home (mainland) sim, the big performance killer seems to be image processing. I'll be testing scripts, sporadically getting sluggish response, and it's almost always the Images Time stat that's spiking, often up into whole seconds.
Do I understand correctly that this is the amount of sim time used for serving textures to clients as they are requested? And do I also understand correctly that the ongoing server-side restructuring will eventually relieve the individual sims of that responsibility?
|
|
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
|
03-17-2007 08:44
From: Deanna Trollop In my home (mainland) sim, the big performance killer seems to be image processing. I'll be testing scripts, sporadically getting sluggish response, and it's almost always the Images Time stat that's spiking, often up into whole seconds.
Do I understand correctly that this is the amount of sim time used for serving textures to clients as they are requested? And do I also understand correctly that the ongoing server-side restructuring will eventually relieve the individual sims of that responsibility? I know exactly what you mean. I see that in my sim all the time, and it sucks. I think the images time spike usually comes when someone teleports into the sim, which would make sense since they're suddenly requesting a ton of images. I think that the lindens are aware of this bug and have been pounding away on it for the better part of a year, but I'm not sure. Unfortunately, there's nothing you can really do about it.
|