diff options
author | Justin Clark-Casey (justincc) | 2011-10-13 23:47:37 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-10-13 23:47:37 +0100 |
commit | 4e7d4330c2b2c61e64c9f82efa7b824b717b2e4d (patch) | |
tree | d95daf64918aed46cb9723d7078ef45f026dd161 | |
parent | refactor: Put the frame update period when temporary objects are cleaned up i... (diff) | |
download | opensim-SC-4e7d4330c2b2c61e64c9f82efa7b824b717b2e4d.zip opensim-SC-4e7d4330c2b2c61e64c9f82efa7b824b717b2e4d.tar.gz opensim-SC-4e7d4330c2b2c61e64c9f82efa7b824b717b2e4d.tar.bz2 opensim-SC-4e7d4330c2b2c61e64c9f82efa7b824b717b2e4d.tar.xz |
Expose minimum frame time and update periods for experimentation.
Settings are at bottom of [Startup] in OpenSimDefaults.ini, override in OpenSim.ini to change
Defaults are the same as previously.
More information to come on opensim-dev shortly.
Feel free to tweak but if you do please don't expect any support unless feedback on certain tweaks is explicitly requested.
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 52 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 42 |
2 files changed, 75 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 225235a..f2b7014 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -162,17 +162,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
162 | /// </summary> | 162 | /// </summary> |
163 | protected DateTime m_lastFrameUpdate = DateTime.UtcNow; | 163 | protected DateTime m_lastFrameUpdate = DateTime.UtcNow; |
164 | 164 | ||
165 | // TODO: Possibly stop other classes being able to manipulate this directly. | ||
166 | private SceneGraph m_sceneGraph; | ||
167 | private volatile int m_bordersLocked; | ||
168 | // private int m_RestartTimerCounter; | ||
169 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing | ||
170 | // private int m_incrementsof15seconds; | ||
171 | private volatile bool m_backingup; | ||
172 | private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>(); | ||
173 | private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>(); | ||
174 | private Object m_heartbeatLock = new Object(); | ||
175 | |||
176 | private int m_update_physics = 1; | 165 | private int m_update_physics = 1; |
177 | private int m_update_entitymovement = 1; | 166 | private int m_update_entitymovement = 1; |
178 | private int m_update_objects = 1; | 167 | private int m_update_objects = 1; |
@@ -196,6 +185,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
196 | private int landMS; | 185 | private int landMS; |
197 | private int lastCompletedFrame; | 186 | private int lastCompletedFrame; |
198 | 187 | ||
188 | /// <summary> | ||
189 | /// Signals whether temporary objects are currently being cleaned up. Needed because this is launched | ||
190 | /// asynchronously from the update loop. | ||
191 | /// </summary> | ||
192 | private bool m_cleaningTemps = false; | ||
193 | |||
194 | private Object m_heartbeatLock = new Object(); | ||
195 | |||
196 | // TODO: Possibly stop other classes being able to manipulate this directly. | ||
197 | private SceneGraph m_sceneGraph; | ||
198 | private volatile int m_bordersLocked; | ||
199 | // private int m_RestartTimerCounter; | ||
200 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing | ||
201 | // private int m_incrementsof15seconds; | ||
202 | private volatile bool m_backingup; | ||
203 | private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>(); | ||
204 | private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>(); | ||
205 | |||
199 | private bool m_physics_enabled = true; | 206 | private bool m_physics_enabled = true; |
200 | private bool m_scripts_enabled = true; | 207 | private bool m_scripts_enabled = true; |
201 | private string m_defaultScriptEngine; | 208 | private string m_defaultScriptEngine; |
@@ -207,8 +214,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
207 | private bool m_firstHeartbeat = true; | 214 | private bool m_firstHeartbeat = true; |
208 | 215 | ||
209 | private object m_deleting_scene_object = new object(); | 216 | private object m_deleting_scene_object = new object(); |
210 | |||
211 | private bool m_cleaningTemps = false; | ||
212 | 217 | ||
213 | private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; | 218 | private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; |
214 | private bool m_reprioritizationEnabled = true; | 219 | private bool m_reprioritizationEnabled = true; |
@@ -220,8 +225,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
220 | private bool m_generateMaptiles; | 225 | private bool m_generateMaptiles; |
221 | private bool m_useBackup = true; | 226 | private bool m_useBackup = true; |
222 | 227 | ||
223 | // private Dictionary<UUID, string[]> m_UserNamesCache = new Dictionary<UUID, string[]>(); | ||
224 | |||
225 | #endregion Fields | 228 | #endregion Fields |
226 | 229 | ||
227 | #region Properties | 230 | #region Properties |
@@ -645,10 +648,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
645 | 648 | ||
646 | m_physics_enabled = !RegionInfo.RegionSettings.DisablePhysics; | 649 | m_physics_enabled = !RegionInfo.RegionSettings.DisablePhysics; |
647 | 650 | ||
648 | StatsReporter = new SimStatsReporter(this); | ||
649 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; | ||
650 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; | ||
651 | |||
652 | // Old | 651 | // Old |
653 | /* | 652 | /* |
654 | m_simulatorVersion = simulatorVersion | 653 | m_simulatorVersion = simulatorVersion |
@@ -741,6 +740,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
741 | RegionInfo.RegionSettings.TerrainImageID = tileID; | 740 | RegionInfo.RegionSettings.TerrainImageID = tileID; |
742 | } | 741 | } |
743 | } | 742 | } |
743 | |||
744 | MinFrameTime = startupConfig.GetFloat( "MinFrameTime", MinFrameTime); | ||
745 | m_update_backup = startupConfig.GetInt( "UpdateStorageEveryNFrames", m_update_backup); | ||
746 | m_update_coarse_locations = startupConfig.GetInt( "UpdateCoarseLocationsEveryNFrames", m_update_coarse_locations); | ||
747 | m_update_entitymovement = startupConfig.GetInt( "UpdateEntityMovementEveryNFrames", m_update_entitymovement); | ||
748 | m_update_events = startupConfig.GetInt( "UpdateEventsEveryNFrames", m_update_events); | ||
749 | m_update_objects = startupConfig.GetInt( "UpdateObjectsEveryNFrames", m_update_objects); | ||
750 | m_update_physics = startupConfig.GetInt( "UpdatePhysicsEveryNFrames", m_update_physics); | ||
751 | m_update_presences = startupConfig.GetInt( "UpdateAgentsEveryNFrames", m_update_presences); | ||
752 | m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain); | ||
753 | m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNFrames", m_update_temp_cleaning); | ||
744 | } | 754 | } |
745 | catch | 755 | catch |
746 | { | 756 | { |
@@ -778,6 +788,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
778 | m_log.Info("[SCENE]: Using the " + m_priorityScheme + " prioritization scheme"); | 788 | m_log.Info("[SCENE]: Using the " + m_priorityScheme + " prioritization scheme"); |
779 | 789 | ||
780 | #endregion Interest Management | 790 | #endregion Interest Management |
791 | |||
792 | StatsReporter = new SimStatsReporter(this); | ||
793 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; | ||
794 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; | ||
781 | } | 795 | } |
782 | 796 | ||
783 | /// <summary> | 797 | /// <summary> |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 9685467..9509ed9 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -115,6 +115,48 @@ | |||
115 | ; into a restart. | 115 | ; into a restart. |
116 | InworldRestartShutsDown = false | 116 | InworldRestartShutsDown = false |
117 | 117 | ||
118 | ; The minimum proportion of a second that any particular frame can take to execute. | ||
119 | ; Only change this if you really know what you're doing, and be prepared to change UpdatePhysicsEveryNFrames | ||
120 | ; (and other Frames params) to match! For instance, halving MinFrameTime to 0.0445 require | ||
121 | ; UpdatePhysicsEveryNFrames = 2 unless you don't mind your avatar walking like Benny Hill. | ||
122 | MinFrameTime = 0.089 | ||
123 | |||
124 | ; Send scheduled updates to objects in the scene | ||
125 | ; This must be a whole number | ||
126 | UpdateObjectsEveryNFrames = 1; | ||
127 | |||
128 | ; Send position/velocity, etc. updates to agents in the scene | ||
129 | ; This must be a whole number | ||
130 | UpdateAgentsEveryNFrames = 1; | ||
131 | |||
132 | ; Apply pending forces from physics calculations to an entity. | ||
133 | ; This must be a whole number | ||
134 | UpdateEntityMovementEveryNFrames = 1; | ||
135 | |||
136 | ; Send coarse location updates to viewers. In a classic viewer, this updates the minimap. | ||
137 | ; This must be a whole number | ||
138 | UpdateCoarseLocationsEveryNFrames = 50; | ||
139 | |||
140 | ; Update physics. Within each update physics also updates in a series of contigous mini-steps | ||
141 | ; This must be a whole number | ||
142 | UpdatePhysicsEveryNFrames = 1; | ||
143 | |||
144 | ; Clean up temp on rez objects. | ||
145 | ; This must be a whole number | ||
146 | UpdateTempCleaningEveryNFrames = 1000; | ||
147 | |||
148 | ; Send out the on frame event to modules and other listeners. This should probably never deviate from 1. | ||
149 | ; This must be a whole number | ||
150 | UpdateEventsEveryNFrames = 1; | ||
151 | |||
152 | ; Send terrain updates to viewers | ||
153 | ; This must be a whole number | ||
154 | UpdateTerrainEveryNFrames = 50; | ||
155 | |||
156 | ; Persitently store any objects which meet the PRIM STORAGE criteria | ||
157 | ; This must be a whole number | ||
158 | UpdateStorageEveryNFrames = 200; | ||
159 | |||
118 | ; ## | 160 | ; ## |
119 | ; ## PRIM STORAGE | 161 | ; ## PRIM STORAGE |
120 | ; ## | 162 | ; ## |