Commit Graph

14148 Commits (41f2f3132bdcbfb8020c7fd6e5f3b7e48c75b1cf)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 41f2f3132b For monitoring purposes, start non-timeout tasks (which do not currently use a threadpool) via Watchdog.RunInThread() rather than Util.RunThreadNoTimeout()
The functionality is the same but this allow us to monitor such tasks via "show threads" and abort them for test purposes, etc.
Also extends thread names to provide more info (e.g. SendInitialDataToClient says what client the task is for).
2014-09-05 23:20:59 +01:00
Justin Clark-Casey (justincc) e4d16e6795 Make LLUDP output queue refill thread active by default, since load tests have shown that this has better scalability.
For testing, previous behaviour can be restored with the console command "debug lludp oqre stop" at runtime.
2014-09-04 18:24:59 +01:00
Justin Clark-Casey (justincc) 73e20b7f5f For processing outbound http requests in the XMLRPCModule, start the thread through Watchdog for monitoring and stat purposes. 2014-09-04 00:22:30 +01:00
Justin Clark-Casey (justincc) 0692ebfbc6 Start long-lived thread in IRCConnector via watchdog rather than indepedently, so that it can be seen in "show threads" and stats 2014-09-04 00:00:51 +01:00
Justin Clark-Casey (justincc) 4b04d22899 Don't need to check separate physics status in bulletsim update since that method is only run for an indepndent thread anyway.
Also remove bulletsim monitored thread from watchdog on shutdown.
2014-09-03 23:53:04 +01:00
Justin Clark-Casey (justincc) 6e6512eb4a Make bulletsim thread alarm if no update for 5 seconds.
The cost is minimal (also done for scene loop) at the benefit of telling us if this thread simply stops for some reason.
2014-09-03 23:43:59 +01:00
Justin Clark-Casey (justincc) 29400538b7 minor: fix indenting from previous commit b08ab1e 2014-09-03 23:37:20 +01:00
Justin Clark-Casey (justincc) b08ab1e375 If BulletSim is running on its own threads, start this thread via the thread watchdog.
This allows us to see the presence of the permanent thread via the "show threads" console comand.
Also adds the region name to the thread name.
2014-09-03 23:35:18 +01:00
Kevin Cozens 40c579addf Don't show the ScrLPS data twice in the WebStats based statistics page. 2014-09-03 14:17:37 -04:00
Justin Clark-Casey (justincc) ac866a1c46 Add [EntityTransfer] AllowAvatarCrossing setting to determine whether avatars are allowed to cross regions at all.
Defaults to true.  For test purposes.
2014-09-03 00:25:56 +01:00
Justin Clark-Casey (justincc) d582db6132 Fix recent regression from 473c5594 where camera started to judder on moving vehicles.
Other parts of OpenSimulator are relying on SP.Velocity == 0 for vehicles.
So add and use SP.GetWorldVelocity() instead when we need vehicle velocity, along the same lines as existing SP.GetWorldRotation()
2014-09-02 23:39:52 +01:00
Justin Clark-Casey (justincc) 473c559478 As per the LL grid, if an avatar is sitting then return it's velocity relative to the region rather than relative to its seat.
Resolves http://opensimulator.org/mantis/view.php?id=7175
2014-08-30 01:09:33 +01:00
Justin Clark-Casey (justincc) bb7c88805a As per the LL grid, for attachments make llGetObjectDetails() OBJECT_VELOCITY return the avatar's velocity and not always Vector3.Zero.
This completes http://opensimulator.org/mantis/view.php?id=7177
2014-08-30 00:58:47 +01:00
Justin Clark-Casey (justincc) 4d8bc007e2 minor: fix wrong indentation in previous commit 0cc3cd 2014-08-30 00:54:36 +01:00
Justin Clark-Casey (justincc) 0cc3cdfb4e As per the LL grid, for attachments make llGetObjectDetails() OBJECT_ROT return the avatar's rotation.
This is already the behaviour of OBJECT_POS.
Partially satisfies http://opensimulator.org/mantis/view.php?id=7177
2014-08-30 00:48:59 +01:00
Justin Clark-Casey (justincc) a02dae566c Fix issue where moving a seated avatar would not adjust their subsequent stand position.
Addresses http://opensimulator.org/mantis/view.php?id=7299
2014-08-30 00:26:18 +01:00
Justin Clark-Casey (justincc) 099212167b Implement STATUS_BLOCK_GRAB_OBJECT in llSetStatus()/llGetStatus() and correct effect of STATUS_BLOCK_GRAB
As per http://wiki.secondlife.com/wiki/LlSetStatus
Setting STATUS_BLOCK_GRAB_OBJECT prevents or allows move of a physical linkset by grab on any prim.
Setting STATUS_BLOCK_GRAB prevents or allows move of a physical linkset by grab on a particular prim.
Previously, setting STATUS_BLOCK_GRAB would prevent drag via all prims of the linkset.
2014-08-29 23:40:21 +01:00
Justin Clark-Casey (justincc) 1b75ec5647 Ignore whitespace when reading serialized XML objects.
This was previously effectively being done by XmlDocument in the multiple passes through the XML.
This change tells XmlReader to ignore whitespace.  This also means changing arguments to use XmlReader instead of XmlTextReader (a descendent of XmlReader) directly.
XmlReader.Create() has been the recommend way to create XML readers since .NET 2.0 as per MS SDK and is the only way to specific ignore whitespace settings.
2014-08-29 19:08:23 +01:00
Justin Clark-Casey (justincc) 3555c0c3f3 Fix recent regression test TestDeserializeXmlObjectWithOtherParts() which was not meant to indent the input xml 2014-08-29 18:14:47 +01:00
Justin Clark-Casey (justincc) 305c3e668a Add regression test for deserializing xml objects with more than one non-root part. 2014-08-29 18:06:29 +01:00
Justin Clark-Casey (justincc) 1a3ffda852 minor: Eliminate more unnecessary code copying individual parameters for Vector3 copying in Scene - this is not necessary as Vector3 is a value type 2014-08-28 18:37:34 +01:00
Justin Clark-Casey (justincc) f132f642b2 On code section that rezzes single objects and attachments, reduce CPU use by reading asset XML a single time with a stream reader rather than multiple times.
Reading large XML documents (e.g. complex attachments) is CPU expensive - this must be done as few times as possible (preferably just once).
Reading these documents into XmlDocument is also more resource intensive than using XmlTextReader, as per Microsoft's own publication "Improve .NET Application Performance and Scalability"
Optimization of other cases will follow if this change is successful.
2014-08-28 18:15:33 +01:00
Justin Clark-Casey (justincc) b1ff78f4d8 Don't allow update timer to invoke another scene update if the previous is still active. 2014-08-26 18:52:09 +01:00
Justin Clark-Casey (justincc) bafa82eb12 Remove race conditions from where SP.AbsolutePosition could change between the various property checks. 2014-08-26 18:25:14 +01:00
Justin Clark-Casey (justincc) 42bb122232 Fix frame times when updating scene on timer. 2014-08-26 18:13:38 +01:00
Justin Clark-Casey (justincc) 64f640f901 Implement experimental non-default mechanism to update scene via a timer rather than a persistent thread with sleep.
This is to see if an inaccuracy in sleep times under load is responsible for increase in frame times even when there is spare time still available.
Can currently only be activated by setting "debug scene set update-on-timer true".
Can be switched between timer and thread with sleep updates whilst the scene is running.
2014-08-26 18:13:38 +01:00
Justin Clark-Casey (justincc) 4e03d352c3 Extend drop command to "debug lludp drop <in|out>..." to allow drop of inbound packets.
For test/debug purposes.
2014-08-19 18:43:21 +01:00
Justin Clark-Casey (justincc) 298376d5c7 Add "debug lludp drop out <add|remove> <packet-name>" console command for debug/test purposes.
This drops all outbound packets that match a given packet name.
Can currently only be applied to all connections in a scene.
2014-08-19 18:34:17 +01:00
Justin Clark-Casey (justincc) 88b2fc61ff Add clientstack.<scene>.OQRERequestsWaiting stat
Only present if OQRE is enabled
2014-08-19 00:42:19 +01:00
Justin Clark-Casey (justincc) 84cea46c10 Add experimental OutgoingQueueRefillEngine to handle queue refill processing on a controlled number of threads rather than the threadpool.
Disabled by default.  Currently can only be enabled with console "debug lludp oqre start" command, though this can be started and stopped whilst simulator is running.
When a connection requires packet queue refill processing (used to populate queues with entity updates, entity prop updates and image queue updates), this is done via Threadpool requests.
However, with a very high number of connections (e.g. 100 root + 300 child) a very large number of simultaneous requests may be causing performance issues.
This commit adds an experimental engine for processing these requests from a queue with a persistent thread instead.
Unlike inbound processing, there are no network requests in this processing that might hold the thread up for a long time.
Early implementation - currently only one thread which may (or may not) get overloaded with requests.  Added for testing purposes.
2014-08-19 00:17:12 +01:00
Justin Clark-Casey (justincc) b375f86f11 Make LLUDPServer.Scene publicly gettable/privately settable instead of protected so that other logging code in the clientstack can record more useful information
Adds some commented out logging for use again in the future.
No functional change.
2014-08-19 00:17:12 +01:00
Kevin Cozens 321816b32c Prevent exception if inventory item in llGiveInventory() call doesn't exist. 2014-08-18 16:00:49 -04:00
Justin Clark-Casey (justincc) e0c6bfa81e If a user moves back in sight of a child region before the agent has been closed on teleport, don't unnecessarily resend all avatar and object data about that region. 2014-08-15 21:47:34 +01:00
Justin Clark-Casey (justincc) 91e1aaa5d4 On teleport to a region that already has a child agent established (e.g. a neighbour) don't resend all the initial avatar and object data again.
This is unnecessary since it has been received (and data continues to be received) in the existing child connection.
2014-08-15 21:47:34 +01:00
Kevin Cozens 626536b8cc Added RestrictEmail to make llEmail only send to avatars email address if true. 2014-08-14 02:40:06 -04:00
Justin Clark-Casey (justincc) 4c781db572 Make RootTerseUpdatePeriod and ChildTerseUpdatePeriod configurable in [InterestManagement] in OpenSim.ini for experimental purposes.
If n > 1 for RootTerseUpdatePeriod only every n terse update is actually sent to observers on same region, unless velocity is effectively zero (to stop av drift).
If n > 1 for ChildTerseUpdatePeriod only every n terse update is sent to observers in other regions, unless velocity is effectively zero.
Defaults are same as before (all packets are sent).
Tradeoff is reduction of UDP traffic vs fidelity of observed av mvmt.
Increasing n > 1 leads to jerky observed mvmt immediateley for root, though not on child, where experimentally have gone to n = 4 before jerkiness is noticeable.
2014-08-14 01:39:26 +01:00
Justin Clark-Casey (justincc) 6ea82ad48a Make some existing reprioritization values changeable outside the scene for test purposes, and use more consise property syntax.
No functional change.
2014-08-14 01:16:58 +01:00
Justin Clark-Casey (justincc) bc0895c758 On entity transfer of scene presence, replace polling sleep in SP.WaitForUpdateAgent() with a triggered event instead.
Rapid polls are more expensive than triggered events (several polls vs one trigger) and may be problematic on heavily loaded simulators where many threads are vying for processor time.
A triggered event is also slightly quicker as there is no maximum 200ms wait between polls.
2014-08-13 23:45:51 +01:00
Justin Clark-Casey (justincc) 0d2a25b477 Remove redundant origin region lock in SP.CompleteMovement()
This is already going to be correctly set by WaitForUpdateAgent() earlier on in that method, which is always called where a callback to the originating region is required.
2014-08-13 23:11:32 +01:00
Justin Clark-Casey (justincc) 0db6f3a2bd Only set up the UnackedMethod for an outgoing message if that message is actually meant to get an ack (because it's reliable). 2014-08-13 22:57:14 +01:00
Melanie Thielker 37921c66e5 Avination's Dynamic Floater Module. This works with Singularity viewer only.
It's WIP in that a dialog builder is on it's way. For now, the XML needs to
be handmade.
2014-08-12 01:04:29 +02:00
Justin Clark-Casey (justincc) 8738445eb7 Move the inventory request lock introduced in git master a58152bd to HGInventoryBroker to preserve that behaviour there but allow 2 simultaneous inv requests (chiefly WebFetch) rather than 1
This lock serialized all requests and made the inventory throttling in WebFetch redundant.
By moving this lock, two simultaneous requests may now take place which may help with http://opensimulator.org/mantis/view.php?id=7054
2014-08-09 00:52:51 +01:00
Justin Clark-Casey (justincc) 30f1b424bb Change RootRotationUpdateTolerance from 0.01 to 0.1 in code as well. 2014-08-08 23:47:53 +01:00
Justin Clark-Casey (justincc) 36f01dce2d Change MaxPoolThreads default in code as well from 15 to 300 2014-08-08 23:47:03 +01:00
BlueWall 2924d250ab Fix short help string for show region command. 2014-08-06 21:41:53 -04:00
BlueWall 10a8d2852e OpenSimExtras
Move the experimental extra features functionality into the GridService. This sends default values for map, search and destination guide, plus ExportSupported control to the region on startup. Please watch http://opensimulator.org/wiki/SimulatorFeatures_Extras for changes and documentation.
2014-08-06 17:25:12 -04:00
Oren Hurvitz e36e416637 Fixed crash when using Allowed/Denied Viewers, and the viewer's name is shorter than one of the test strings
This fixes http://opensimulator.org/mantis/view.php?id=7294
2014-08-06 19:02:15 +03:00
Justin Clark-Casey (justincc) 78ccadb27e Add RootPositionUpdateTolerance, RootRotationUpdateTolerance, and RootVelocityUpdateTolerance parameters to [InterestManagement] in OpenSimDefaults.ini
These govern when AgentUpdates are sent to observers on position, rotation and velocity changes to an avatar (including the avatar themselves).
Higher values reduce AgentUpdate traffic but at a certain level will degrade smoothness of avatar and perceived avatar movement.
2014-08-06 00:53:14 +01:00
Justin Clark-Casey (justincc) 961cb9cc77 refactor: Rename recent new Client*UpdateTolerance to Root*UpdateTolerance for better accuracy and consistency with other similar parameters 2014-08-06 00:35:26 +01:00
Oren Hurvitz dc2471fedd Fixed premature closing of the connection in DataSnapshotManager 2014-08-05 19:09:11 +03:00