aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Monitoring/Watchdog.cs (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-11-25refactor: Move methods to start a monitored thread, start work in its own ↵Justin Clark-Casey (justincc)1-138/+11
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-25Move conditionals which control whether a task is placed in the JobEngine ↵Justin Clark-Casey (justincc)1-2/+37
inside Watchdog.RunJob() (renamed from RunWhenPossible) and generalize them.
2014-11-25Temporarily add root agent rez attachments work to job engine if it is ↵Justin Clark-Casey (justincc)1-4/+4
running rather than as a fire and forget. Experiment to see if serializing attachment rez and send initial data jobs improves other parts of sim performance.
2014-11-25Add experimental job engine to see if queueing some existing async work ↵Justin Clark-Casey (justincc)1-0/+18
during root agent entry to a region improves perf rather than always attempting to execute everything concurrently Job engine is controlled via "debug jobengine start|stop|status". Can only currently be enabled and disabled dynamically at runtime. Currently only applies to code sending initial region data (objects, other avatar data) to a client.
2014-09-26Fix long-lived thread name logging.Justin Clark-Casey (justincc)1-1/+1
2014-09-17Undo "Revert "Small changes to threading to send thread names to unmanaged ↵BlueWall1-6/+7
threads. Needs Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects."" Fix for break in next commit This reverts commit 376fab140227e92dbd841436509a97b87c9e7792.
2014-09-17Revert "Small changes to threading to send thread names to unmanaged ↵BlueWall1-7/+6
threads. Needs Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects." This reverts commit af286d5fcb688e8b64202b6deca4f249e9a2b6b8. Issue with Jenkins builds
2014-09-17Small changes to threading to send thread names to unmanaged threads. Needs ↵BlueWall1-6/+7
Mono 3.6+ to see thread names in utilities like top -H . Some formatting of the thread name to fin in the 16 byte limit on Linux. Please test on Windows to see if the work has any adverse effects.
2014-09-05For monitoring purposes, start non-timeout tasks (which do not currently use ↵Justin Clark-Casey (justincc)1-11/+49
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-03-21Add monitored thread last update times as stats in "show stats all"Justin Clark-Casey (justincc)1-0/+26
These have the format server.thread.<thread-name>
2013-08-05Add checks monitoring framework to provide alerts if certain conditions do ↵Justin Clark-Casey (justincc)1-0/+1
not hold. Not yet in use.
2012-11-16Add a first draft mechanism for the IncomingPacketsProcessedStat to show the ↵Justin Clark-Casey (justincc)1-1/+3
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.
2012-10-12Get Watchdog to log thread removalJustin Clark-Casey (justincc)1-1/+19
2012-08-18When reporting a thread timeout, create a copy of the info rather than ↵Justin Clark-Casey (justincc)1-1/+14
passing the original ThreadWatchdogInfo structure. This is to avoid the possibility of misleading reporting if a watchdog update outraces an alarm. Should address any remaining issues from http://opensimulator.org/mantis/view.php?id=6012
2012-08-15Don't enable the thread watchdog until all regions are ready.Justin Clark-Casey (justincc)1-5/+26
This is to avoid false positives when the machine is under heavy load whilst starting up.
2012-07-25Move Watchdog and MemoryWatchdog classes into OpenSim.Framework.Monitoring ↵Justin Clark-Casey (justincc)1-1/+1
with other monitoring code from OpenSim.Framework
2012-07-25Add experimental "OpenSim object memory churn" statistics to output of ↵Justin Clark-Casey (justincc)1-0/+3
region console "show stats" command This aims to capture the amount of memory that OpenSim turns over whilst operating a region. This memory is not lost - apart from leaks it is reclaimed by the garbage collector. However, the more memory that gets turned over the more work the GC has to do to reclaim it.
2012-07-05Log warning if time between invocations of the watchdog thread is twice the ↵Justin Clark-Casey (justincc)1-2/+22
timer setting. This is to help detect situations where thread timeout warnings are being generated because of general machine issues rather than deadlock, network or other problems.
2012-07-04refactor: rename Watchdog.WATCHDOG_TIMEOUT_MS to DEFAULT_WATCHDOG_TIMEOUT_MS ↵Justin Clark-Casey (justincc)1-3/+3
to reflect what it actually is
2012-06-07Allow the thread watchdog to accept an alarm method that is invoked if the ↵Justin Clark-Casey (justincc)1-17/+23
timeout is breached. This alarm can then invoke this to log extra information. This is used in LLUDPServer to show which client was being processed when incoming and outgoing udp watchdog alarms are triggered.
2012-02-24Take watchdog alarm calling back outside the m_threads lock.Justin Clark-Casey (justincc)1-3/+16
This is how it was originally. This stops a very long running alarm callback from causing a problem.
2012-02-24Rename Watchdog.GetThreads() to GetThreadsInfo() to reflect what it actually ↵Justin Clark-Casey (justincc)1-1/+1
returns and for consistency.
2012-02-24Stop spurious scene loop startup timeout alarms for scenes with many prims.Justin Clark-Casey (justincc)1-17/+40
On the first frame, all startup scene objects are added to the physics scene. This can cause a considerable delay, so we don't start raising the alarm on scene loop timeouts until the second frame. This commit also slightly changes the behaviour of timeout reporting. Previously, a report was made for the very first timed out thread, ignoring all others until the next watchdog check. Instead, we now report every timed out thread, though we still only do this once no matter how long the timeout.
2011-11-15fix build break on UserManagementModule.Justin Clark-Casey (justincc)1-4/+7
This also adds time since started to "show threads". Unfortunately these two changes got mixed in.
2011-11-15Add number of milliseconds since last update to "show threads"Justin Clark-Casey (justincc)1-1/+11
2011-11-12doh - correct build breakJustin Clark-Casey (justincc)1-6/+7
2011-11-12Add threads to the watchdog thread list before we start them.Justin Clark-Casey (justincc)1-5/+5
Hopefully this wil make "WATCHDOG: Asked to update thread ## which is not being monitored" messages." go away.
2011-10-25Restart the event queue worker threads that I accidentally disabled earlier ↵Justin Clark-Casey (justincc)1-2/+2
today in 8a0a78c. Also adds these to the watchdogs with very large timeouts (should really be infinite)
2011-10-25In Watchdog, add ability to specific timeout for a thread.Justin Clark-Casey (justincc)1-16/+56
This also changes the point of registration to the StartThread() call rather than the first Update()
2011-10-25Add m_threads dictionary locking to Watchdog.GetThreads()Justin Clark-Casey (justincc)1-1/+2
2011-10-25Add "threads abort <thread-id>" simulator console command that allows us to ↵Justin Clark-Casey (justincc)1-2/+23
abort a watchdog managed thread. This is for diagnostic purposes.
2010-09-14Fix "show threads" to show threads now being managed by ↵Justin Clark-Casey (justincc)1-2/+12
OpenSim.Framework.Watchdog
2009-10-26* Changed the watchdog timer to improve the speed of UpdateThread(), only ↵John Hurliman1-30/+30
track threads once the first call to UpdateThread() has been made, and allow re-tracking of threads that timed out but revived later * Added a commented out call to Watchdog.UpdateThread() in OdeScene. If it turns out that loading a large OAR file or some other operation is timing out the heartbeat thread, we'll need to uncomment it
2009-10-22Implemented a Watchdog class. Do not manually create Thread objects anymore, ↵John Hurliman1-0/+183
use Watchdog.StartThread(). While your thread is running call Watchdog.UpdateThread(). When it is shutting down call Watchdog.RemoveThread(). Most of the threads in OpenSim have been updated