Commit Graph

22102 Commits (c7f6e248e8544200871a1bf814f34e2ee0f9d977)

Author SHA1 Message Date
Justin Clark-Casey (justincc) d6c9705a3b Add incoming packet async handling engine to queue some inbound udp async requests.
This is to reduce the potential for overload of the threadpool if there are many simultaneous requets in high concurrency situations.
Currently only applied to AvatarProperties and GenericMessage requests.
2014-11-25 23:23:11 +00:00
Justin Clark-Casey (justincc) 1c5c6af274 Add missing class from recent commit 69abade 2014-11-25 23:23:10 +00:00
Justin Clark-Casey (justincc) f54c70741b Add "show threadpool calls active" console debug command.
This shows named threadpool calls (excluding timer and network calls) that are currently queued or running.
Also shows total of labelled and any anonymous calls.
2014-11-25 23:23:10 +00:00
Justin Clark-Casey (justincc) 1d19e1bbd0 Add naive implementation of controlled incoming HG attachments to manage load.
Instead of processing all incoming attachment scene object concurrently, process them consecutively to eliminate potential overload from this source.
This is a naive implementation because it does not currently account for slow foreign asset services.
Although it may take longer, this approach may also improve attachment visibility for HG avatars
since the scene object is now always added to the scene after receiving assets from the foreign service and not before.
2014-11-25 23:23:10 +00:00
Justin Clark-Casey (justincc) ec8d21c434 Label all threadpool calls being made in core OpenSimulator. This is to add problem diagnosis.
"show threadpool calls" now also returns named (labelled), anonymous (unlabelled) and total call stats.
2014-11-25 23:23:10 +00:00
Justin Clark-Casey (justincc) 72cb1cc7d6 Add "show threadpool calls" command to show count of all labelled smartthreadpool calls 2014-11-25 23:23:10 +00:00
Justin Clark-Casey (justincc) 8c9f82b035 Just for now, don't alert the user or log if we couldn't change their server-side preferences due to no e-mail address being sent.
This is to avoid user confusion in the oscc rehearsal as they are often not aware that this fails because no e-mail is set.
Also may be failing in the hypergrid case, though this may also be a config issue.
This is meant as a temporary solution.
2014-11-25 23:23:10 +00:00
justincc aed4e96cf8 Update libomv to cedac55
This resolves an issue with pCampbot where some bots would occasionally connect with the same UDP source port.
This sometimes led to console messages where bots would report receiving packets multiple times that weren't marked as resends.
DLLs built under windows
2014-11-25 23:23:10 +00:00
Justin Clark-Casey (justincc) 5d5ea9234f Stop Mono 3.2.8 from binding a UDP socket to a port already in use.
At least on Mono 3.2.8 (but not under Windows), one can bind multiple UDP sockets to the same port by default.
Different simulators cannot demultiplex each other's messages, so a set of confusing non-obvious errors arise if this occurs.
This change prevents such multiple binding.
2014-11-25 23:23:09 +00:00
Justin Clark-Casey (justincc) b53be022f2 On pCampbot, if we add the none (n) behaviour then make it actually stop any bots in motion.
Previously, adding this behaviour after physics (p) would leave the bot to drift off for ever in its last movement direction.
2014-11-25 23:23:09 +00:00
Justin Clark-Casey (justincc) 3a1ce2715a Add "wearables check" console command
This checks that all the wearable assets and any assets for a given logged in avatar exist in the asset service
2014-11-25 23:23:09 +00:00
Justin Clark-Casey (justincc) 9b09dd3575 Add "wearables show" console command.
This shows summary wearables information (shape, hair, etc.) for all avatars in the scene or specific information about a given avatar's wearables.
Similar to the existing "attachments show" command.
2014-11-25 23:23:09 +00:00
Justin Clark-Casey (justincc) 5ab5d7fe47 Fix recent regression where adaptive throttles stopped adjusting.
Extends regression tests to test response of adaptive throttles to ack'ed and expired packets.
2014-11-25 23:22:20 +00:00
Justin Clark-Casey (justincc) b2e377f168 Fix setting of max scene throttle so that setting it restricts the child client throttles properly.
In "show throttles", also renames 'total' column to 'actual' to reflect that it is not necessarily the throttles requested for/by the client.
Also fills out 'target' in non-adapative mode to the actual throttle requested for/by the client.
2014-11-25 23:22:20 +00:00
Justin Clark-Casey (justincc) b114f5626e Add request drip rate to assertions for token bucket regression tests 2014-11-25 23:22:20 +00:00
Justin Clark-Casey (justincc) 8a949f0ee1 Add regression tests for token buckets on their own 2014-11-25 23:22:20 +00:00
Justin Clark-Casey (justincc) ec3b43d28d Make regression throttle tests consistently test target and max throttle settings.
As part of this also refactors code to put all throttle asserts in a single regression test method
2014-11-25 23:22:20 +00:00
Justin Clark-Casey (justincc) 548abb3b47 minor: In "show client stats" command, properly handle the case where a client has made no AgentUpdate requests (as is the case with agents that have only even been child) rather than throwing an exception 2014-11-25 23:22:20 +00:00
Justin Clark-Casey (justincc) a9dde81753 minor: Correct letter accidentally added to copyright notice on top of Scene.cs (almost five years ago!) 2014-11-25 23:22:20 +00:00
Justin Clark-Casey (justincc) b7ef6009a7 In Scene.AddNewAgent(), avoid a situation where an exception can result in a client being added to the manager without IClientAPI.SceneAgent being set.
This is done by adjusting the order of code so that SceneAgent will always be set before adding the client.
Various parts of the code (rightly) assume that a a client registered to the manager will always have a SceneAgent set no matter what.
2014-11-25 23:22:20 +00:00
Justin Clark-Casey (justincc) e6af551007 For now, send all non-full terse updates for ones own avatar directly to the LLUDP client stack rather than queueing internally within LLClientView.
When an HG avatar enters a scene, it delays processing of entity updates.  Could be crowding out by other updates or something else.
This delay in ones own av mvmt updates results in mvmt lag experienced on the client.  Avoiding the internal LLClientView for these packets appears to resolve this issue.
Appears most noticeably for avatars with attachments, though has also been seen on those without sometimes.  Hasn't been observed for non-HG avatars in general.
Will be investigating exactly what the problem is, at which point there will be a more permanent solution.
2014-11-25 23:22:20 +00:00
Justin Clark-Casey (justincc) 10095c1a58 Add "debug lludp throttles get/set request" and get current
This allows one to set the requested throttle (which normally comes from the client) as opposed to the max.
2014-11-25 23:22:19 +00:00
Justin Clark-Casey (justincc) 61d6bd78b3 Change the word order of some debug lludp settings for readability
On server, scene-throttle-max becomes max-scene-throttle and likewise max-new-client-throttle
On clients, throttle-max becomes max
2014-11-25 23:22:19 +00:00
Justin Clark-Casey (justincc) 44dc58cc7f Add "debug lludp get/set new-client-throttle-max" to allow default new client throttle to be set separately from existing clients.
"debug lludp throttles get/set throttle-max" now only gets and sets current max client throttles
2014-11-25 23:22:19 +00:00
Justin Clark-Casey (justincc) 68d0c4d37b Add "debug lludp get" command which currently just shows scene-throttle-max to mirror "debug lludp set"
Information is also available in "show server throttles" but that's more for non-debug info rather than attempting to get and set parameters on the fly for debug purposes.
2014-11-25 23:22:19 +00:00
Justin Clark-Casey (justincc) 336790e7b4 Add some more llGiveInventory() regression tests 2014-11-25 23:22:19 +00:00
Justin Clark-Casey (justincc) 1eb3e6cc43 When inserting missing CreatorData in the HGAssetMapper, do the rewrite on a streaming xml basis rather than loading it all into memory via XmlDocument.
This is because objects with lots of parts can have a lot of xml to load into memory, and this has been seen to have a noticeable performance impact.
Whereas streaming has been seen to reduce the impact in normal serialization.
Implmentation is messy but I couldn't see a better way of doing it when you can't assume that you know the exact structure of the input XML.
2014-11-25 23:21:38 +00:00
Justin Clark-Casey (justincc) f7ab3e20bc Add regression test TestPostAssetRewrite() to check results of HGAssetMapper.Post() object asset rewriting, 2014-11-25 23:21:38 +00:00
Justin Clark-Casey (justincc) 6c043dd6ff If an exception makes it to the top of a JobEngine request, catch and log instead of letting it terminate the simulator... 2014-11-25 23:21:38 +00:00
Justin Clark-Casey (justincc) 16a5e15443 Allow GetMesh capability to be served directly by a server like GetTexture
To do this required GetMesh to be converted to a BaseStreamHandler
Unlike GetTexture connector, no redirect URL functionality yet (this wasn't present in the first place).
2014-11-25 23:21:38 +00:00
Justin Clark-Casey (justincc) 281969093f Start JobEngine by default in simulator for now. 2014-11-25 23:21:38 +00:00
Justin Clark-Casey (justincc) 1c9529aa9e If JobEngine is active, then use it to copy/rez attachments for an avatar entering the scene that isn't initially logging on. This will execute tasks consecutively rather than concurrently.
This has two aims
1) Reduce initial teleport failures when a foreign Hypergrid user enters a region by not holding up the teleport for attachment rez (this can be particularly costly when HG gets all assets in the object graph.
2) Reduce server load that may impact other simulator activities.
This complements existing JobEngine options that perform initial login attachment rez and appearance send in consecutive tasks.
2014-11-25 23:21:38 +00:00
Justin Clark-Casey (justincc) 90f9cea07b minor: be consistent about reporting errors out of HttpServerBase 2014-11-25 23:21:38 +00:00
Justin Clark-Casey (justincc) f4424bdfcf If the port entry in [Network] for a server is missing, then actually tell the user that's the problem rather than simply exiting silently.
Also exit with Environment.Exit(), not by aborting the thread.
2014-11-25 23:21:38 +00:00
Justin Clark-Casey (justincc) 8ddcd16c69 Add an IConfigSource constructor to HGAssetBroker so that it can be instantiated directly for potentially handling some capabilities directly in services with HG active 2014-11-25 23:21:38 +00:00
Justin Clark-Casey (justincc) d33964222a Fix an issue where specifying both max client and server outgoing UDP throttles would cause client throttles to be lower than expected when total requests exceeded the scene limit.
This was because specifying a max client throttle would always request the max from the parent server throttle, no matter the actual total requests on the client throttle.
This would lead to a lower server multiplier than expected.
This change also adds a 'target' column to the "show throttles" output that shows the target rate (as set by client) if adaptive throttles is active.
This commit also re-adds the functionality lost in recent 5c1a1458 to set a max client throttle when adaptive is active.
This commit also adds TestClientThrottlePerClientAndRegionLimited and TestClientThrottleAdaptiveNoLimit regression tests
2014-11-25 23:21:38 +00:00
Justin Clark-Casey (justincc) ead32de790 Use automatic properties for Parent and TotalDripRequest in TokenBucket to make code analysis easier. No functional change. 2014-11-25 23:21:37 +00:00
Justin Clark-Casey (justincc) 40314b56f2 Remove the unnecessary intermediate total token bucket.
This only had one child, which is the 'adaptive' token bucket.
So from testing and currently analysis, we can use that bucket directly which simplifies the code.
2014-11-25 23:21:37 +00:00
Justin Clark-Casey (justincc) 93f3444de1 minor: remove warnings from unused fields in LocalGridServicesConnector 2014-11-25 23:21:37 +00:00
Justin Clark-Casey (justincc) dacd0ecfee minor: Remove unused field from EntityTransferModule 2014-11-25 23:21:37 +00:00
Justin Clark-Casey (justincc) a98b514184 minor: remove compiler warning from unused field in SimulatorFeaturesModule 2014-11-25 23:21:37 +00:00
Justin Clark-Casey (justincc) 0d77796584 minor: resolve warnings from unused fields in XBakesGet and Post handlers 2014-11-25 23:21:37 +00:00
Justin Clark-Casey (justincc) d5ead532cb Remove compiler warning from UserProfilesHandlers 2014-11-25 23:21:37 +00:00
Justin Clark-Casey (justincc) 07a7f941e5 minor: remove warning in BasicHttpAuthentication by commenting out unused remove_me parameter (which looks like it might still be potentially useful for logging) 2014-11-25 23:21:37 +00:00
Justin Clark-Casey (justincc) df031fe8be extend TestClientThrottleRegionLimited for 2 clients after testing 1. Renames to TestSingleClientThrottleRegionLimited() 2014-11-25 23:21:37 +00:00
Justin Clark-Casey (justincc) dce98acb69 Add regression test TestClientThrottleRegionLimited() for testing simple behaviour of throttles where a region-wide total outbound limit is in place. 2014-11-25 23:21:37 +00:00
Justin Clark-Casey (justincc) 075f718f3f factor out common throttle setting byte[] array construction in ThrottleTests. 2014-11-25 23:21:37 +00:00
Justin Clark-Casey (justincc) 9cdd38d0cf Add regression test TestClientThrottleLimited() for throttle behaviour when a max client total limit is enforced server-side 2014-11-25 23:21:37 +00:00
Justin Clark-Casey (justincc) fc878a33ed refactor: consistently put all test classes in the OpenSim.Tests.Common package rather than some in OpenSim.Tests.Common.Mock
the separate mock package was not useful and was just another using line to always add
2014-11-25 23:21:37 +00:00
Justin Clark-Casey (justincc) af0a851eba minor: disable logging in regression test TestClientThrottleSetNoLimit 2014-11-25 23:18:40 +00:00