Title: Server thread count Post by: DPerkins 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.
Title: Re: Server thread count Post by: D.Tkalcec (RTC) 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 |