Commit Graph

252 Commits (704c67527b738c99de9cc9a4108d7b3520a58caf)

Author SHA1 Message Date
UbitUmarov ad43cc6784 change llclient async udp packets processing. Removed the shared Jobengine that made only one thread do some packets for all users, and removed the FireAndForget, so each user could issue a unlimited number of threads. Added a new JobEngine per client, so each gets at most one thread,and that thread can be released if iddle (for 5 seconds ) 2017-06-13 19:04:18 +01:00
UbitUmarov 3ba63dde6e udp is not tcp. If mono versions have bronke udp sento, better update, also having 300 threads because object select is not funny 2017-06-13 12:17:39 +01:00
UbitUmarov e650a4ff16 remove excessive notion of paralelism 2017-06-13 08:56:21 +01:00
Melanie Thielker b16abc8166 Massive tab and trailing space cleanup 2017-01-05 19:07:37 +00:00
Melanie Thielker 69776aa70c Remove the AllowAlternatePorts option. It wasn't implemented anyway.
Instead, handle the port being 0 as "any port" and assign a random
port for regions in that case.
2016-12-13 19:47:26 +00:00
UbitUmarov b2c553b459 work around some warnings 2016-11-21 01:16:35 +00:00
UbitUmarov e281876ecd restore higher resolution clock on udpserver and lower uaeraccouts caching time 2016-11-18 03:25:29 +00:00
UbitUmarov d8812ba2d1 revert to lower resolution clock on udpserver for testing 2016-11-18 03:00:59 +00:00
UbitUmarov c349a1a5e7 also log estimated average Util.GetTimeStampMS() resolution 2016-11-09 11:21:46 +00:00
UbitUmarov 94d2422230 change the clock source on udp outgoing, remove some dead code 2016-11-09 10:21:02 +00:00
UbitUmarov abf423e361 be nicer to PIs (actually linux) 2016-07-12 23:23:47 +01:00
Melanie Thielker cdfbf78d07 Fields should be protected unless private is required 2016-06-14 01:27:48 +02:00
Melanie Thielker 68c73951ef Make the LLUDPServerShim inheritable. There is absolutely no reason for
this to be sealed!
2016-06-14 01:21:47 +02:00
UbitUmarov bdab95f1d2 dont try to process packets for deleted clients 2015-12-09 22:57:13 +00:00
UbitUmarov bbe55df6c6 disable useless and totally wrong incoming Pools 2015-12-09 22:32:48 +00:00
UbitUmarov f7a29ad8b5 minor cleanup 2015-12-09 16:42:24 +00:00
UbitUmarov 8314987474 tick region health a bit faster 2015-12-09 16:27:59 +00:00
UbitUmarov 3ca4b6f319 fix the queue type in use 2015-12-09 16:26:03 +00:00
UbitUmarov a8dc07ff5c removed a protocol breaking lludp debug option that no one should try, changed terrain send throotle to be by packets in queue, reduced odds of MTU violation on terrain send (still bad). Most UDP protocol implementations may not mind much, but our code still does 2015-09-22 18:39:59 +01:00
Robert Adams e5367d822b Merge of ubitworkvarnew with opensim/master as of 20150905.
This integrates the OpenSim refactoring to make physics, etc into modules.
AVN physics hasn't been moved to new location.
Does not compile yet.

Merge branch 'osmaster' into mbworknew1
2015-09-08 04:54:16 -07:00
Diva Canto dac8edd5dd Transformed the LLUDP ad-hoc plugin into a region module. It works. 2015-09-03 15:59:06 -07:00
UbitUmarov a11edceb00 seems to compile ( tests comented out) 2015-09-02 19:54:53 +01:00
UbitUmarov 371c9dd2af bad merge? 2015-09-01 14:54:35 +01:00
Oren Hurvitz 20af31f18e Fixed mistakes related to confusion between Environment.TickCount (milliseconds) and TimeSpan.TicksPerXXX (10000 x milliseconds) 2015-08-11 07:35:40 +01:00
Melanie Thielker 7aa171e49f Maybe reduce incidence of ghost avatars 2015-06-12 03:16:09 +02:00
Justin Clark-Casey (justincc) 155da5aad2 Add debug ability to ignore reliably sent packets that are not acknowledged.
This is controlled via the console command "debug lludp client set process-unacked-sends true [<avatar-first-name> <avatar-last-name>]"
For debug purposes to see if this process for very bad connections is causing general outbound udp processing delays.
Relates to http://opensimulator.org/mantis/view.php?id=7393
2015-01-21 20:31:42 +00:00
Justin Clark-Casey (justincc) 55e081548c Fix bug where gathering the clientstack..OutgoingPacketsQueuedCount stat would fail with a casting exception for scenes with NPCs
Present since 51eb8fa (Oct 2 2014)
2015-01-13 19:27:29 +00:00
Justin Clark-Casey (justincc) 8e1e8a0920 Make the performance controlling job processing threads introduced in conference code use a generic JobEngine class rather than 4 slightly different copy/pasted versions. 2015-01-12 20:56:37 +00:00
Justin Clark-Casey (justincc) 86367d7219 refactor: Move methods to start a monitored thread, start work in its own thread and run work in the jobengine from Watchdog to a WorkManager class.
This is to achieve a clean separation of concerns - the watchdog is an inappropriate place for work management.
Also adds a WorkManager.RunInThreadPool() class which feeds through to Util.FireAndForget.
Also switches around the name and obj arguments to the new RunInThread() and RunJob() methods so that the callback obj comes after the callback as seen in the SDK and elsewhere
2014-11-25 23:56:32 +00:00
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) 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) 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) 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) 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) 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) 1d33a40f59 Add "debug lludp set scene-throttle-max <value>" console command to allow us to potentially set the scene max throttle on the fly. 2014-11-25 23:18:39 +00:00
Justin Clark-Casey (justincc) c8f5add2fc Add "show server throttles" command for showing server specific information about throttles
This is separate from the user-oriented "show throttles" command since one will often only want to know about varying client throttle settings.
Currently displays max scene throttle and adaptive throttles config if set.
2014-11-25 23:18:39 +00:00
Justin Clark-Casey (justincc) 51eb8facd6 Add OutgoingPacketsQueuedCount clientstack stat.
This is the total of queued outgoing packets across all connections, as also seen in the "show queues" command.
Gives some early indication of whether the simulator can't send all outgoing packets fast enough.
Though then one would want to check that this isn't due to a few bad client connections.
2014-11-25 23:18:39 +00:00
Justin Clark-Casey (justincc) 12daa3c3d9 refactor: Move LLUDPServer console commands into their own class. 2014-11-25 23:18:39 +00:00
Justin Clark-Casey (justincc) f0fd2fa325 refactor: rename "debug lludp throttle status" to "debug lludp throttle get" to match set command 2014-11-25 23:18:38 +00:00
Justin Clark-Casey (justincc) e144958e03 Add "debug lludp throttle set" command to allow setting of parameters at runtime
Can currently only set adaptive true|false, where adaptive = false
2014-11-25 23:18:38 +00:00
Justin Clark-Casey (justincc) cfc4055991 Make outboudn and packet inbox handling threads highest priority.
Will only have any affect under Windows or mono with a patch such as https://gist.github.com/justincc/31e52218d098529b4696 (not recommended) applied.
For assessment purposes.
2014-11-25 23:18:38 +00:00
UbitUmarov ba8e1efb43 sadly revert to resend terseUpdates enqueuing them back into entityupdates
queue. Viewers fail to handle correctly out of order updates with ugly visible
effects. Make sure these packets don't include acks so they aren't lost.
2014-10-31 23:34:43 +00:00
Melanie Thielker 12ebc92e55 Revert "*TEST* send udp sync. Stop uncontroled and hidden use of IO threads."
This reverts commit 8c41271b33.

Conflicts:

	OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
2014-10-13 23:52:19 +02:00
UbitUmarov 33ec073320 revert to async send, since past experience showed sync didn't work when
on mono
2014-10-13 22:46:58 +01:00
UbitUmarov 8c41271b33 *TEST* send udp sync. Stop uncontroled and hidden use of IO threads.
Testing this may require several people.
2014-10-13 13:17:48 +01:00
Justin Clark-Casey (justincc) 43520b3e8b Add "debug lludp throttle status" command to return status information about a client's throttle (currently just whether adaptive is enabled). 2014-10-02 22:30:44 +01:00
Justin Clark-Casey (justincc) 05508b5c56 Add "debug lludp throttle log <level> <avatar-first-name> <avatar-last-name>" to control extra throttle related debug logging. 2014-10-02 22:30:44 +01:00
Justin Clark-Casey (justincc) d3578e2662 Add "debug lludp data out" console command for logging outgoing data just before it's put on the wire.
Unlike "debug lludp packet" which logs at the point where OpenSim first asks the clientstack to send a certain outgoing packet, this logs immediately before the actual send.
For low-level debugging purposes.
2014-09-24 23:44:55 +01:00
Melanie Thielker 8014ce7f1a Fix a nullref in a debug message. If we have no SceneAgent, we can't output data from it. 2014-09-15 23:15:27 +02:00