Title: TRtcHttpClient Thread Usage Post by: DougB on September 10, 2014, 08:09:14 PM My application has created a total of 250 connections to a server to handle a specific load. From perfmon, I noticed that 180 threads have been created.
Out of curiosity, what is the ratio of threads to connections? Since this is using asynchronous Winsock, the number of threads seemed a bit high, but I assume it has been tuned to this value for a reason (I also created 1000 connections, and the number of threads created was about the same). Can the number of threads be adjusted or should it ever be adjusted? In any case, everything is performing very, very well! :) Thanks, Doug Title: Re: TRtcHttpClient Thread Usage Post by: D.Tkalcec (RTC) on September 11, 2014, 01:11:43 AM Default RTC Thread Pool configuration should work for most Applications, but it can be adjusted by changing global variables declared in the rtcThrPool.pas unit, before creating any RTC components (for example, when your Application starts). A new thread will be started if a new job has been placed in the thread job queue but there are no threads in the pool yet, or if all the threads from the pool are currenty busy and the maximum number of allowed threads (RTC_THREAD_POOL_MAX) has not been reached. Because starting and stopping a Thread is relatively expensive, but idle Threads in a RTC Thread Pool do not consume any CPU time, a Thread will be stopped only if the number of idle Threads has exceeded the allowed Thread Pool Oversize limit (RTC_THREAD_POOL_OVERSIZE).
Best Regards, Danijel Tkalcec |