RTC Forums
November 24, 2024, 03:05:49 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Server thread count  (Read 4318 times)
DPerkins
RTC License
***
Posts: 37


« on: November 13, 2013, 02:31:45 PM »

Using Taskmanager I can see that my RTC server is currently using 69 threads.  Requests stopped arriving at the server 10 minutes ago, so wondered if there's a mechanism within RTC that will reduce that thread-count over time as it realises it no longer requires that number of threads.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: November 13, 2013, 02:45:36 PM »

Starting and stopping a Tread is an expensive operation and you can't reliably "predict" when more Threads will be required, so I wouldn't recommend closing threads - unless it is absolutely necessary. Most Web Servers will have 128 - 256 threads in use at all times, to ensure smooth operation.

RTC uses 64 threads for its Thread Pool and a few threads for messaging and synchronization, so you will see 69 threads in use by a Server that reached its peek. If you want to change that behavior and either increase the max number of threads that can be used, or start closing threads when they are not in use, you can change the value of a few global variables from the "rtcThrPool" unit  ...

  // Min. number of unused threads to keep active
  RTC_THREAD_POOL_PLUS:word=3;

  // Max. number of unused threads to keep active
  RTC_THREAD_POOL_OVERSIZE:word=2048;

  // Max. number of threads in our thread pool.
  RTC_THREAD_POOL_MAX:word=64;

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.024 seconds with 17 queries.