missyrideout Posted July 20, 2020 Share Posted July 20, 2020 What is sleep time? What does it mean when it is almost equal to script time for a region? It's not mentioned in the knowledge base article about the statistics bar. I've been dealing with a neighbor who has a ton of breedables, and while I know there is probably nothing I can do, and the question of what constitutes an AR'able "disturbance of the peace" is a separate topic.... I am still curious what this mysterious stat represents in terms of degraded performance . I've had other places on mainland regions where sleep time crept up and scripts run % went down over time until a reset. Any insights or information welcome! 1 Link to comment Share on other sites More sharing options...
Lindens Rider Linden Posted July 21, 2020 Lindens Share Posted July 21, 2020 The short answer is that sleep time is the mean amount of time in ms per simulator frame that the simulator has spent idling over the last minute. The long answer is that the simulators attempt to keep a constant number of processing frames (one cycle through the main loop) per second. This number is displayed in the statistics window as Sim FPS. This value is not the same as the Viewer's FPS. When the Sim FPS starts to fall below 45 you will begin to see lag events like delayed movement and rubber banding, among other symptoms. A single frame should take about 21ms. (21ms * 45) = ~1 second (less about 50ms overhead). If a single simulator frame takes less than that 21ms we need to add a few extra ms in order to maintain the constant rate. This extra time is reported as "Sleep Time" and tracks closely to "Spare Time". Every frame on the simulator is divided into a number of phases. The big ones are network message processing, advancing the state of the physics simulation, processing agents in the region and updating their interest lists, and executing scripts. The amount of time allowed per frame to execute scripts is capped. The simulator will attempt to execute all the scripts in the region in that allotted time slice, if it can not make it all the way through the list it will stop and pick up where it left off on the next frame (this gives you the "Scripts Run %" statistic.) Since the time for script execution is capped you can see situations where the % of scripts executed per frame begins to fall even though there is idle time reported on the simulator. 1 11 2 Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted July 21, 2020 Share Posted July 21, 2020 1 hour ago, Rider Linden said: The amount of time allowed per frame to execute scripts is capped. The simulator will attempt to execute all the scripts in the region in that allotted time slice, if it can not make it all the way through the list it will stop and pick up where it left off on the next frame (this gives you the "Scripts Run %" statistic.) Since the time for script execution is capped you can see situations where the % of scripts executed per frame begins to fall even though there is idle time reported on the simulator. Why is the script time capped even in situations where there is still spare time? Link to comment Share on other sites More sharing options...
Odaks Posted July 21, 2020 Share Posted July 21, 2020 (edited) 1 hour ago, Wulfie Reanimator said: Why is the script time capped even in situations where there is still spare time? Exactly! Why indeed? I was always under the impression that there was a simple pecking order. When the frame time ran out, the lower-down-the-list stuff just got shuffled to the next frame....or the one after that....etc. "Listen you horrible lot! I don't care that the queue is out the door and up the road, this is our official tea-break, right? You'll just have to come back at half-past." Edited July 21, 2020 by Odaks Irresistible joke. Link to comment Share on other sites More sharing options...
Profaitchikenz Haiku Posted July 21, 2020 Share Posted July 21, 2020 Best guess is, if you didn't cap script time and people began bitcoin mining or else wrote recursive functions that never reached the back-out point, the scripts would grab every bit of processing time they could. Link to comment Share on other sites More sharing options...
animats Posted July 21, 2020 Share Posted July 21, 2020 1 hour ago, Wulfie Reanimator said: Why is the script time capped even in situations where there is still spare time? In low-tier regions (homestead, open space) the simulator pauses to give up CPU time for the other sims sharing the CPU core. Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted July 21, 2020 Share Posted July 21, 2020 (edited) 1 hour ago, animats said: In low-tier regions (homestead, open space) the simulator pauses to give up CPU time for the other sims sharing the CPU core. I'm aware of that, but: 1) I don't think that's what was meant. 2) If that was meant, what if those others are idling too? 3) What about sims that don't have to share? @Profaitchikenz Haiku Recursive functions will run out of memory, and there is no way to write a script in such a way that it never gives up to the sim. Even infinite loops have breakpoints at the end of the iteration. Edited July 21, 2020 by Wulfie Reanimator Link to comment Share on other sites More sharing options...
NeoBokrug Elytis Posted July 22, 2020 Share Posted July 22, 2020 10 hours ago, Rider Linden said: The amount of time allowed per frame to execute scripts is capped. I have a technical question. Do upgraded private regions with an extra 10k prims also get 30% more allowed time per frame -- or is it just the extra LI? If not, would LL consider boosting the extra 30% allowed script time to go with the extra content on the region? 1 Link to comment Share on other sites More sharing options...
Ardy Lay Posted July 22, 2020 Share Posted July 22, 2020 Sometimes I suspect some people should buy a computer to run their programs on instead of fighting over simulator host resources and complaining that LSL isn’t suitable for rocket science. Other times I wanna see rockets in SL. I suppose making the simulators dynamically adjust to the various task loads on them gets complicated. Link to comment Share on other sites More sharing options...
Qie Niangao Posted July 22, 2020 Share Posted July 22, 2020 16 hours ago, Rider Linden said: The amount of time allowed per frame to execute scripts is capped. The simulator will attempt to execute all the scripts in the region in that allotted time slice, if it can not make it all the way through the list it will stop and pick up where it left off on the next frame (this gives you the "Scripts Run %" statistic.) Since the time for script execution is capped you can see situations where the % of scripts executed per frame begins to fall even though there is idle time reported on the simulator. Except on Homesteads, I don't see this cap. Normally, Script Time regularly exceeds 19 ms of a 22.2‾ ms frame. (Clearly it can't extend beyond the total frame duration or time would dilate.) Maybe there's a cap up there somewhere, but I don't see it. There may be instances where the sim gets into some blocking wait state. Most often, I see this when "Pump IO" gets inexplicably pegged, but maybe sometimes "Sleep Time" too? Not sure. Anyway, I've dealt with many breedable-infested regions, unfortunately, and they very rarely have any sleep time left in the frame at all, once "Scripts Run" gets below about 60% (and surprisingly few common breedables will make that happen). It's a clear and very widespread abuse of resources; the regions become practically unusable for anything but more breedable factory farms. 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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