|
Fitz Clary
Registered User
Join date: 25 Jun 2008
Posts: 2
|
05-04-2009 08:19
I've just rented a Homestead sim and have full EM abilitys, including the script usage menu which is great. I'm making an effort to keep scripts to a well managed level with it. The trouble is - or I should say are:
What's good? Obviously the less total time used by scripts the better but if I'm using 1.5 total MS is that good? How about 15? Is there a Sim Performance - Script Time Usage comparison chart or something like that <g>?
Next, is there anything that can give me a sort of history of script times? I noticed last night at one point a single object - which previously had been at .05 or so ms shot up to 1.5 for a moment then dropped back down. Obviously that's to be expected as avatars/objects in the sim interact with the scripted object, but I'd still like it if I could get a series of snap shots of script times over a 24 hour period.
Lastly in a broad sweeping general question, is there a list of best practices for the estate manager to keep performance as high as possible? And are there any tools or utilities out there that I should take a look at?
Thanks a bunch
|
|
Jahar Aabye
Registered User
Join date: 14 Mar 2007
Posts: 58
|
05-04-2009 09:58
If the total script time for the region is 1.5ms, that is excellent!
Here's how time works, in SL: A simulator refreshes at 45 frames per second. In order to keep this rate, a simulator must accomplish everything that it needs to do (scripts, physics, communication with the clients of connected agents, communication with the database, etc) in 22.2ms for each frame. If the amount of work that the simulator must do per frame takes longer than 22.2ms, it will no longer be able to run the simulation at 45 FPS, and must reduce its rate, which introduces what is euphemistically called "Time Dilation," or what the rest of us call "lag" (server-side lag, different from client-side rendering lag).
For this reason, it is difficult to put a precise number on what an optimal script tme is. Script time is one of several types of time measurements, and they all have to add up to 22.2ms or less. However, your script time of 1.5ms for the sim is excellent, because it leaves plenty of available processing time for the sim to accomplish everything else. The sim could still lag due to lots of physical collisions, for example, but having such a low script time means that you even have a bit of overhead should there be a lot of collisions.
15ms script time would be quite a lot, but if the sim was not dealing with a lot of other issues, then even that might not be a huge problem. However, if your script time was 15ms, then you would only have 7.2ms left over to handle physics, agents, database, images, etc. That would mean that it would be easier for a lot of people teleporting into or out of the sim, or crossing the sim border, or a lot of physical collisions to cause the sim to lag, since there is less free time for the sim to handle those things.
Think of the simulator as a waiter in a busy restaurant. He's taking orders from a bunch of customers and trying to make sure that the right food gets to the right table on time. If he has to deal with too many orders in too short a period of time, he'll start to make mistakes and things will slow down.
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
05-04-2009 10:24
If it's a homestead sim it's sharing that 22.2ms with three other sims. So you should try and target a total simulator time no more than 5.6ms.
|
|
Fitz Clary
Registered User
Join date: 25 Jun 2008
Posts: 2
|
05-05-2009 05:23
Ahh excellent to know. Data with no context leads to surly mice, awards for fjords, and the universe's worst poetry.
Now that I know what to look for, what's the best way to keep tabs on it? I can watch time dilation and FPS via a script (which of course will add to script times), but I don't think a script can tell me the amount of time other objects are consuming. Is there anything out that can there other than me clicking refresh a lot?
|