aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add proper method doc and comments to m_dataPresentEvent (from d9d9959)Justin Clark-Casey (justincc)2013-07-231-2/+13
|
* Add clientstack.InboxPacketsCount stat. This records the number of packets ↵Justin Clark-Casey (justincc)2013-07-231-0/+13
| | | | | | waiting to be processed at the second stage (after initial UDP processing) If this consistently increases then this is a problem since it means the simulator is receiving more requests than it can distribute to other parts of the code.
* Add clientstack.OutgoingUDPSendsCount stat to show number of outbound UDP ↵Justin Clark-Casey (justincc)2013-07-231-3/+15
| | | | packets sent by a region per second
* Record raw number of UDP receives as clientstack.IncomingUDPReceivesCountJustin Clark-Casey (justincc)2013-07-231-0/+13
|
* Add AverageUDPProcessTime stat to try and get a handle on how long we're ↵Justin Clark-Casey (justincc)2013-07-231-2/+17
| | | | | | | | taking on the initial processing of a UDP packet. If we're not receiving packets with multiple threads (m_asyncPacketHandling) then this is critical since it will limit the number of incoming UDP requests that the region can handle and affects packet loss. If m_asyncPacketHandling then this is less critical though a long process will increase the scope for threads to race. This is an experimental stat which may be changed.
* Added check for user movement specification before discarding an incomingRobert Adams2013-07-221-1/+2
| | | | | | AgentUpdate packet. This fixes the problem with vehicles not moving forward after the first up-arrow. Code to fix a potential exception when using different IClientAPIs.
* Fixed the stats in show client stats. Also left some comments with ↵Diva Canto2013-07-211-0/+2
| | | | observations about AgentUpdates.
* Make the check as to whether any particular inbound AgentUpdate packet is ↵Justin Clark-Casey (justincc)2013-07-211-2/+15
| | | | | | significant much earlier in UDP processing (i.e. before we pointlessly place such packets on internal queues, etc.) Appears to have some impact on cpu but needs testing.
* Hack in console command "debug lludp toggle agentupdate" to allow ↵Justin Clark-Casey (justincc)2013-07-211-0/+24
| | | | | | | | AgentUpdate in packets to be discarded at a very early stage. Enabling this will stop anybody from moving on a sim, though all other updates should be unaffected. Appears to make some cpu difference on very basic testing with a static standing avatar (though not all that much). Need to see the results with much higher av numbers.
* Fix up a temporary debugging change from last commit which stopped "lludp ↵Justin Clark-Casey (justincc)2013-07-211-2/+1
| | | | stop out" from actually doing anything
* Do some simple queue empty checks in the main outgoing udp loop instead of ↵Justin Clark-Casey (justincc)2013-07-211-2/+2
| | | | | | | always performing these on a separate fired thread. This appears to improve cpu usage since launching a new thread is more expensive than performing a small amount of inline logic. However, needs testing at scale.
* try Hacking in an AutoResetEvent to control the outgoing UDP loop instead of ↵Justin Clark-Casey (justincc)2013-07-181-2/+8
| | | | | | a continuous loop with sleeps. Does appear to have a cpu impact but may need further tweaking
* Revert the revertDiva Canto2013-07-151-0/+2
| | | | | | Revert "Trying to hunt the CPU spikes recently experienced." This reverts commit ac73e702935dd4607c13aaec3095940fba7932ca.
* Trying to hunt the CPU spikes recently experienced.Diva Canto2013-07-151-2/+0
| | | | | | Revert "Comment out old inbound UDP throttling hack. This would cause the UDP" This reverts commit 38e6da5522a53c7f65eac64ae7b0af929afb1ae6.
* Moved SendInitialDataToMe to earlier in CompleteMovement. Moved ↵Diva Canto2013-07-131-1/+1
| | | | | | | | TriggerOnMakeRootAgent to the end of CompleteMovement. Justin, if you read this, there's a long story here. Some time ago you placed SendInitialDataToMe at the very beginning of client creation (in LLUDPServer). That is problematic, as we discovered relatively recently: on TPs, as soon as the client starts getting data from child agents, it starts requesting resources back *from the simulator where its root agent is*. We found this to be the problem behind meshes missing on HG TPs (because the viewer was requesting the meshes of the receiving sim from the departing grid). But this affects much more than meshes and HG TPs. It may also explain cloud avatars after a local TP: baked textures are only stored in the simulator, so if a child agent receives a UUID of a baked texture in the destination sim and requests that texture from the departing sim where the root agent is, it will fail to get that texture. Bottom line: we need to delay sending the new simulator data to the viewer until we are absolutely sure that the viewer knows that its main agent is in a new sim. Hence, moving it to CompleteMovement. Now I am trying to tune the initial rez delay that we all experience in the CC. I think that when I fixed the issue described above, I may have moved SendInitialDataToMe to much later than it should be, so now I'm moving to earlier in CompleteMovement.
* Comment out old inbound UDP throttling hack. This would cause the UDPRobert Adams2013-07-091-0/+2
| | | | | | | reception thread to sleep for 30ms if the number of available user worker threads got low. It doesn't look like any of the UDP packet types are marked async so this check is 1) unnecessary and 2) really crazy since it stops up the reception thread under heavy load without any indication.
* Add --default option to "debug lludp packet" command to allow packet logging ↵Justin Clark-Casey (justincc)2013-07-041-17/+52
| | | | to be performed immediately from client start
* change "debug packet" command to "debug lludp packet" to conform with other ↵Justin Clark-Casey (justincc)2013-07-041-0/+59
| | | | | | | "debug lludp" options also moves the implementing code into LLUDPServer.cs along with other debug commands from OpenSim.cs gets all debug lludp commands to only activate for the set scene if not root
* Second take at HGTP-mesh bug: delay sending the initial data only for agents ↵Diva Canto2013-05-141-1/+7
| | | | that are coming via TP (root agents)
* Revert "HGTP-mesh bug: the mesh download requests were going to the ↵Diva Canto2013-05-141-0/+3
| | | | | | departing sims for a little while. This was also true for local TPs. BUt for local TPs the assets are on the same server, so it doesn't matter. For HGTPs, it matters. This potential fix moves sending the initial data to later, after the client has completed the movement into the region. Fingers crossed that it doesn't mess other things up!" This reverts commit f32a21d96707f87ecbdaf42c0059f8494a119d31.
* HGTP-mesh bug: the mesh download requests were going to the departing sims ↵Diva Canto2013-05-141-3/+0
| | | | for a little while. This was also true for local TPs. BUt for local TPs the assets are on the same server, so it doesn't matter. For HGTPs, it matters. This potential fix moves sending the initial data to later, after the client has completed the movement into the region. Fingers crossed that it doesn't mess other things up!
* refactor: Remove IClientNetworkServer.NetworkStop() in favour of existing ↵Justin Clark-Casey (justincc)2013-04-161-5/+0
| | | | | | | Stop(). This was an undocumented interface which I think was for long defunct region load balancing experiments. Also adds method doc for some IClientNetworkServer methods.
* Fix server statistics always reporting zero for total network bytes in/out.Robert Adams2013-03-151-19/+32
| | | | Clean up some parameter code in Statistics.Binary.
* Add a first draft mechanism for the IncomingPacketsProcessedStat to show the ↵Justin Clark-Casey (justincc)2012-11-161-0/+1
| | | | | | delta over time. The chief motivation for this is to be able to tell whether there's any impact on incoming packet processing from enabling extra packet pooling.
* Make PacketPool class stats pull stats instead of push stats so they can be ↵Justin Clark-Casey (justincc)2012-11-151-0/+54
| | | | lifted up into LLUDPServer and be distiguished by scene name
* Add IncomingPacketsProcessedCount stat for diagnostics.Justin Clark-Casey (justincc)2012-11-151-14/+89
| | | | Also puts some packet processing counts in a container named after the scene so that stats can be collected from more than one scene.
* Make it possible to turn the base UDP object packet pools on and off whilst ↵Justin Clark-Casey (justincc)2012-10-231-17/+86
| | | | | | running via the "debug lludp pool <on|off>" console command. For debug purposes. This does not currently apply to the higher LLUDP packetpool.
* Add object count stats for new IncomingPacket and UDPPacketBuffer pools if ↵Justin Clark-Casey (justincc)2012-10-231-0/+14
| | | | | | | | they are enabled. Add count stats for existing LLUDP pool. This introduces a pull stat type in addition to the push stat type. A pull stat takes a method on construction which knows how to update the stat on request. In this way, special interfaces for pull stat collection are not necessary.
* Explicitly return only the incoming AgentUpdate packet as this is the only ↵Justin Clark-Casey (justincc)2012-10-171-2/+15
| | | | one we pool atm, rather than attempting to return all incoming packets.
* If RecycleBaseUDPPackets = true, also pool IncomingPackets to reduce memory ↵Justin Clark-Casey (justincc)2012-10-171-1/+24
| | | | churn
* Add optional pool for the UDPPacketBuffer objects that handle all incoming ↵Justin Clark-Casey (justincc)2012-10-161-18/+24
| | | | | | | | UDP data. Even when an avatar is standing still, it's sending in a constant stream of AgentUpdate packets that the client creates new UDPPacketBuffer objects to handle. This option pools those objects. This reduces memory churn. Currently off by default. Works but the scope can be expanded.
* Make it possible to separate start and stop lludp packet processing from the ↵Justin Clark-Casey (justincc)2012-10-161-14/+102
| | | | | | | console for debug processes. This is controlled via the "debug lludp start <in|out|all>" and "debug lludp stop <in|out|all>" region console commands. The command "debug lludp status" will show current status.
* Add AgentUpdate to PacketPool. This is the most common inbound packet from ↵Justin Clark-Casey (justincc)2012-10-121-2/+19
| | | | viewers.
* Fix packetpool for ImprovedTerseObjectUpdate packets.Justin Clark-Casey (justincc)2012-10-111-0/+2
| | | | | These were neither being returned or in many places reused. Getting packets from a pool rather than deallocating and reallocating reduces memory churn which in turn reduces garbage collection time and frequency.
* Lock on AgentCircuitData during Scene.AddClient() and RemoveClient() to ↵Justin Clark-Casey (justincc)2012-10-101-7/+7
| | | | | | prevent an inactive connection being left behind if the user closes the viewer whilst the connection is being established. This should remove the need to run the console command "kick user --force" when these connections are left around.
* Read PacketPool config in LLUDPServer with other config params rather than ↵Justin Clark-Casey (justincc)2012-10-051-0/+9
| | | | | | | in Scene. This is to resolve previous build break. This unnecessarily but harmlessly reads and sets the parameter multiple times - scene was doing the same thing.
* Rename OpenSim.Framework.Statistics to OpenSim.Framework.Monitoring.Justin Clark-Casey (justincc)2012-07-251-1/+1
| | | | This better reflects the long-term purpose of that project and matches Monitoring modules.
* Prevent race conditions between two threads that call LLClientView.Close() ↵Justin Clark-Casey (justincc)2012-07-191-15/+14
| | | | simultaneously (e.g. ack timeout and an attempt to reconnect)
* Stop redundantly passing in the endpoint to the LLClientView constructor.Justin Clark-Casey (justincc)2012-07-121-1/+1
| | | | This can always be retrieved via the LLUDPClient and is so done in various places already.
* refactor: rename Watchdog.WATCHDOG_TIMEOUT_MS to DEFAULT_WATCHDOG_TIMEOUT_MS ↵Justin Clark-Casey (justincc)2012-07-041-2/+2
| | | | to reflect what it actually is
* Add region name to UseCircuitCode log messagesJustin Clark-Casey (justincc)2012-06-151-4/+4
|
* Remove accidental timeout left in during earlier debugging. Has been in ↵Justin Clark-Casey (justincc)2012-06-121-1/+1
| | | | since two commits ago (b099f26)
* Set IClientAPI.IsActive = false early on client removal due to ack timeout ↵Justin Clark-Casey (justincc)2012-06-121-29/+35
| | | | | | | | rather than using IsLoggingOut flag. IsActive is more appropriate since unack timeout is not due to voluntary logout. This is in line with operations such as manual kick that do not set the IsLoggingOut flag. It's also slightly better race-wise since it reduces the chance of this operation clashing with another reason for client deactivation (e.g. manual kick).
* If the simulator closes a root agent due to ack timeout, then send the ↵Justin Clark-Casey (justincc)2012-06-121-2/+20
| | | | client a kick message with that reason, in case it is somehow still listening.
* Instead of retrieving the known client again in LLUDPServer.RemoveClient(), ↵Justin Clark-Casey (justincc)2012-06-081-21/+10
| | | | | | check the IsLoggingOut flag instead. This is slightly better thread-race wise
* If logging a client out due to ack timeout, do this asynchronously rather ↵Justin Clark-Casey (justincc)2012-06-081-8/+18
| | | | | | | than synchronously on the outgoing packet loop. This is the same async behaviour as normal logouts. This is necessary because the event queue will sleep the thread for 5 seconds on an ack timeout logout as the client isn't around to pick up the final event queue messages.
* Add regression test for client logout due to ack timeout.Justin Clark-Casey (justincc)2012-06-081-4/+6
|
* Remove null checks at top of LLUDPServer.ProcessInPacket(). Neither packet ↵Justin Clark-Casey (justincc)2012-06-081-8/+1
| | | | nor client are ever null.
* Store already retrieve IClientAPI in IncomingPacket structure for later use ↵Justin Clark-Casey (justincc)2012-06-081-13/+13
| | | | | | rather than doing another retrieve on dequeue. Instead of checking whether the client still exists by trying to retrieve again from the client manager, this patch gets it back from IncomingPacket and checks the IClientAPI.IsActive state.
* Log warning if we try to remove a UDP client that has already been removed.Justin Clark-Casey (justincc)2012-06-071-0/+6
|